Skip to content

Instantly share code, notes, and snippets.

View jaisonfdo's full-sized avatar

Jaison Fernando jaisonfdo

View GitHub Profile
@jaisonfdo
jaisonfdo / FirebaseAuthPhone
Created March 20, 2020 04:53
Firebase Auth - Password-less Phone - Demo
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.firebase:firebase-auth:19.2.0'
<uses-permission android:name="android.permission.INTERNET"/>
// Initialize Firebase Auth
FirebaseAuth mAuth;
@jaisonfdo
jaisonfdo / FirebaseAuth
Last active March 9, 2020 12:26
Firebase Auth - Password-less Email - Demo
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.firebase:firebase-auth:19.2.0'
<uses-permission android:name="android.permission.INTERNET"/>
private FirebaseAuth mAuth;
mAuth = FirebaseAuth.getInstance();
@jaisonfdo
jaisonfdo / SharedPreferenceDemo.java
Last active February 10, 2020 12:00
Shared preference API explanation sample code snippet
getSharedPreferences(FILE_NAME, MODE);
SharedPreferences appSharedPrefs;
appSharedPrefs = context.
getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE);
SharedPreferences.Editor prefsEditor;
@jaisonfdo
jaisonfdo / FaceDetection.java
Last active November 29, 2018 02:39
MLKit face detection demo explanation code snippet
implementation 'com.google.firebase:firebase-ml-vision:18.0.1'
implementation 'com.google.firebase:firebase-ml-vision-face-model:17.0.2'
<meta-data
android:name="com.google.firebase.ml.vision.DEPENDENCIES"
android:value="face" />
// To initialise the detector
@jaisonfdo
jaisonfdo / BarCodeScannerDemo.java
Last active November 9, 2018 17:48
MlKit demo sample code snippets
implementation 'com.google.firebase:firebase-ml-vision:18.0.1'
<meta-data
android:name="com.google.firebase.ml.vision.DEPENDENCIES"
android:value="barcode" />
// To initialise the detector
@jaisonfdo
jaisonfdo / APIHelper.java
Last active October 21, 2018 07:38
DemoAppsSampleCode
// Make HTTP Calls
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
// Used to convert Java Objects into their JSON
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
public class UserDetails {
private Details details;
@jaisonfdo
jaisonfdo / RemoteConfigDemo.java
Created October 20, 2018 18:08
FirebaseRemoteConfig Code snippet
// To get the version code from the auto generated file
final int versionCode = BuildConfig.VERSION_CODE;
// Hashmap which contains the default values for all the parameter defined in the remote config server
final HashMap<String, Object> defaultMap = new HashMap<>();
defaultMap.put(FB_RC_KEY_TITLE, "Update Available");
defaultMap.put(FB_RC_KEY_DESCRIPTION, "A new version of the application is available please click below to update the latest version.");
defaultMap.put(FB_RC_KEY_FORCE_UPDATE_VERSION, ""+versionCode);
defaultMap.put(FB_RC_KEY_LATEST_VERSION, ""+versionCode);
@jaisonfdo
jaisonfdo / MainActivity.java
Created May 30, 2017 17:47
This gist is used to implement Chrome Custom Tab in your Android app. For further details :
package com.droidmentor.chromecustomtab;
import android.app.PendingIntent;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.support.customtabs.CustomTabsIntent;
import android.support.v4.content.res.ResourcesCompat;
import android.support.v7.app.AppCompatActivity;
@jaisonfdo
jaisonfdo / AndroidManifest.xml
Last active September 16, 2018 18:50
This gist is used to create an implement launcher screen in Android app. For further details : http://droidmentor.com/create-launch-screen/
<activity
android:name=".SplashActivity"
android:theme="@style/splash_theme"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
apply plugin: 'com.jfrog.bintray'
version = libraryVersion
if (project.hasProperty("android")) { // Android libraries
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}