This repository was archived by the owner on Mar 26, 2026. It is now read-only.
Repository navigation
3. Enabling Push Notifications
prabhjot-singh edited this page Nov 7, 2015
·
7 revisions
#Steps for Enabling Push Notifications
##1. Register App with Google Cloud Messaging
To enable Push Notifications, get Sender ID and Server API Key from [Google] (https://developers.google.com/cloud-messaging/android/start)
##2. Register GCM Server API Key with Pyze
Go to your Pyze App Portfolio page and enter Server API Key obtained in #1 above in your App's settings
##3. Enable Push Messaging in your App
Enabling Push messaging in your app required additions to your Manifest File and an additional decleration in code when initializing Pyze
###Manifest File Additions
####Before the Application Tag
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission android:name="**myfullpackagename**.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="**myfullpackagename**.permission.C2D_MESSAGE" />
####In the Application Tag
<activity android:name="com.pyze.android.library.push.PyzePushTrackingActivity"
android:exported="true"/>
<service android:name="com.pyze.android.library.push.PushRegistrationIntentService" />
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="**myfullpackagename**" />
</intent-filter>
</receiver>
<service
android:name="com.pyze.android.library.push.PushListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service
android:name="com.pyze.android.library.push.PushInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID"/>
</intent-filter>
</service>
Pyze.setSenderID("701387964525");