Skip to content

Instantly share code, notes, and snippets.

@pushlink
Forked from celiovasconcelos/config.java
Last active August 29, 2015 14:18
Show Gist options
  • Save pushlink/8f27af5cf2a0ed2e2e4a to your computer and use it in GitHub Desktop.
Save pushlink/8f27af5cf2a0ed2e2e4a 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", "yourDeviceID");
}
}
//Don't forget the AndroidManifest.xml <application android:name=".PushLinkSetup" ... >
//Parameters:
// 1 - Android context
// 2 - Notification icon
// 3 - User apiKey available after sign up
// 4 - Unique device ID. Very important. See http://push-link.com/idguide.xhtml
//OBS1: PushLink only will stop when the application process goes down!
//OBS2: You must call PushLink.start in the UI Thread. Don't call it inside a BroadcastReceiver.
//OBS3: Extends android.app.Application, becouse certainly it will be called when your process start/restart.
//OBS4: 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