Last active
August 29, 2015 14:09
-
-
Save CHLibrarian/0e3b504ba329611a5d4b to your computer and use it in GitHub Desktop.
ContextHub Application Services Register Push (Android)
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 NotifyMeApp extends Application { | |
| @Override | |
| public void onCreate() { | |
| super.onCreate(); | |
| // Register with ContextHub | |
| ContextHub.init(this, "YOUR-APP-ID-HERE"); | |
| /* Initialize push service with your GCM sender id, the device alias, | |
| tags, the activity to launch when a notification is opened, and a | |
| custom notification handler */ | |
| String[] tags = new String[]{"tag-1", "tag-2"}; | |
| Push.init(this, "YOUR-GCM-PROJECT-ID-HERE", "My Device", tags, MainActivity.class, new MyNotificationHandler()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment