-
-
Save pushlink/8f27af5cf2a0ed2e2e4a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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