Skip to content

Instantly share code, notes, and snippets.

View jaisonfdo's full-sized avatar

Jaison Fernando jaisonfdo

View GitHub Profile
@jaisonfdo
jaisonfdo / MixPanelHelper.java
Created November 9, 2016 12:22
Track events with Mixpanel in Android.For more information, check out my detailed guide here : http://droidmentor.com/track-events-mixpanel-android/
import android.content.Context;
import android.util.Log;
import com.mixpanel.android.mpmetrics.MixpanelAPI;
import org.json.JSONException;
import org.json.JSONObject;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
@jaisonfdo
jaisonfdo / SocialConnection.java
Last active September 4, 2021 16:24
Connect social media account in a single line of code in Android.For more information, check out my detailed guide here : http://droidmentor.com/connect-social-media-account/
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.text.TextUtils;
import android.widget.Toast;
/**
@jaisonfdo
jaisonfdo / AlertDialogHelper1.java
Last active October 5, 2019 06:45
It is the utility class contains set of utility methods to show dialogs and returns their clicks using callback methods.For more information, check out my detailed guide here : http://droidmentor.com/show_alertdialog_android/
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Looper;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
/**
@jaisonfdo
jaisonfdo / build.gradle (Module : app)
Last active January 9, 2019 06:04
It helps you to Automatically Sign Your APK using build.gradle in Android Studio. For more information, check out my detailed guide here : http://droidmentor.com/sign-apk-automatically/
apply plugin: 'com.android.application'
ext.majorVersion = 1
ext.minorVersion = 0
ext.patchVersion = 1
ext.preRelease = "Alpha"
ext.minSdkVersion = 16
android {