Skip to content

Instantly share code, notes, and snippets.

View jaisonfdo's full-sized avatar

Jaison Fernando jaisonfdo

View GitHub Profile
@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 / 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
}