Skip to content

Instantly share code, notes, and snippets.

Jaison Fernando jaisonfdo

View GitHub Profile
@jaisonfdo
jaisonfdo / FirebaseAuthPhone
Created Mar 20, 2020
Firebase Auth - Password-less Phone - Demo
View FirebaseAuthPhone
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 Mar 9, 2020
Firebase Auth - Password-less Email - Demo
View FirebaseAuth
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 Feb 10, 2020
Shared preference API explanation sample code snippet
View SharedPreferenceDemo.java
getSharedPreferences(FILE_NAME, MODE);
SharedPreferences appSharedPrefs;
appSharedPrefs = context.
getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE);
SharedPreferences.Editor prefsEditor;
@jaisonfdo
jaisonfdo / FaceDetection.java
Last active Nov 29, 2018
MLKit face detection demo explanation code snippet
View FaceDetection.java
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 Nov 9, 2018
MlKit demo sample code snippets
View BarCodeScannerDemo.java
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 Oct 21, 2018
DemoAppsSampleCode
View APIHelper.java
// 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 Oct 20, 2018
FirebaseRemoteConfig Code snippet
View RemoteConfigDemo.java
// 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
This gist is used to implement Chrome Custom Tab in your Android app. For further details :
View MainActivity.java
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 Sep 16, 2018
This gist is used to create an implement launcher screen in Android app. For further details : http://droidmentor.com/create-launch-screen/
View AndroidManifest.xml
<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>
View bintray.gradle
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
}
You can’t perform that action at this time.