Skip to content

Instantly share code, notes, and snippets.

@pushlink
Last active August 29, 2015 14:18
Show Gist options
  • Save pushlink/cd407bb3b60746087794 to your computer and use it in GitHub Desktop.
Save pushlink/cd407bb3b60746087794 to your computer and use it in GitHub Desktop.
public class PushLinkSetup extends Application {
@Override
public void onCreate() {
super.onCreate();
PushLink.start(this, R.drawable.icon, "yourApiKey");
}
}
//Don't forget the AndroidManifest.xml <application android:name=".PushLinkSetup" ... >
//Parameters:
// 1 - Android context
// 2 - Notification icon
// 3 - User apiKey available after sign up
//OBS1: PushLink only will stop when the application process goes down!
//OBS2: You can call PushLink.start anywhere in the UI Thread (not in your own Thread), but we recommend the way above.
//OBS3: If PushLink.start was called twice the second call will be ignored!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment