I am very new to android app development. I am using parse.com for my backend, and I have followed the tutorial https://www.parse.com/tutorials/android-push-notifications to set up push notifications. However, whenever I send a notification using parse notification console (on the website) or from an android device, I do not receive any notification. Secondly, on the parse notification console, each notification shows 0 as pushes sent. And when I checked the registration ID in the deviceToken field of the app's current ParseInstallation, it is empty. Even GCMSenderID is empty. So I am suspecting that my app is not getting registered properly, but installationID field is not empty. I have added all permissions and credentials in the manifest file.
Please help me. It will be a big help. Thank you :)
Here's my Manifest file:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!--
IMPORTANT: If you change the package name of this sample app, change
"com.parse.tutorials.pushnotifications.permission.C2D_MESSAGE" in the
lines below to match the new package name.
-->
<permission
android:name="com.parse.swipeit.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.parse.swipeit.permission.C2D_MESSAGE" />
<application
android:name="com.parse.swipeit.Application"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.parse.swipeit.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<!--
IMPORTANT: If you change the package name of this sample app,
change "com.parse.tutorials.pushnotifications" in the lines
below to match the new package name.
-->
<category android:name="com.parse.swipeit" />
</intent-filter>
</receiver>
</application>
This part is important.
<!-- IMPORTANT: Change "com.parse.starter" to match your app's package
name. -->
You need to use the Google developer console to enable the Google Cloud Messaging api for you. For that, you'll need to use your own unique valid package name (that only belongs to you and no one else).
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments