Unable To Send Push Notification To Android Phone From Parse.com
I am new to android development and parse.com. I am trying to send a push notification from the web console (parse.com) to android emulator. Though I get a success on the web conso
Solution 1:
Try the following:
<?xml version="1.0" encoding="utf-8"?><manifestxmlns:android="http://schemas.android.com/apk/res/android"package="com.parse.starter"android:versionCode="1"android:versionName="1.0" ><uses-sdkandroid:minSdkVersion="9"android:targetSdkVersion="21" /><uses-permissionandroid:name="android.permission.INTERNET" /><uses-permissionandroid:name="android.permission.ACCESS_NETWORK_STATE" /><uses-permissionandroid:name="android.permission.WAKE_LOCK" /><uses-permissionandroid:name="android.permission.VIBRATE" /><uses-permissionandroid:name="android.permission.RECEIVE_BOOT_COMPLETED" /><uses-permissionandroid:name="android.permission.GET_ACCOUNTS" /><uses-permissionandroid:name="com.google.android.c2dm.permission.RECEIVE" /><!--
To retrieve OAuth 2.0 tokens or invalidate tokens to disconnect a user. This disconnect
option is required to comply with the Google+ Sign-In developer policies
--><uses-permissionandroid:name="android.permission.USE_CREDENTIALS" /><!-- To auto-complete the email text field in the login form with the user's emails --><uses-permissionandroid:name="android.permission.READ_PROFILE" /><uses-permissionandroid:name="android.permission.READ_CONTACTS" /><uses-permissionandroid:name="android.permission.READ_CALL_LOG" /><applicationandroid:name=".ParseApplication"android:allowBackup="true"android:icon="@drawable/ic_launcher"android:label="@string/app_name" ><serviceandroid:name="com.parse.PushService" /><receiverandroid:name="com.parse.ParseBroadcastReceiver" ><intent-filter><actionandroid:name="android.intent.action.BOOT_COMPLETED" /><actionandroid:name="android.intent.action.USER_PRESENT" /></intent-filter></receiver><receiverandroid:name="com.parse.ParsePushBroadcastReceiver"android:exported="false" ><intent-filter><actionandroid:name="com.parse.push.intent.RECEIVE" /><actionandroid:name="com.parse.push.intent.DELETE" /><actionandroid:name="com.parse.push.intent.OPEN" /></intent-filter></receiver><receiverandroid:name="com.parse.GcmBroadcastReceiver"android:permission="com.google.android.c2dm.permission.SEND" ><intent-filter><actionandroid:name="com.google.android.c2dm.intent.RECEIVE" /><actionandroid:name="com.google.android.c2dm.intent.REGISTRATION" /><!-- IMPORTANT: Change "com.parse.starter" to match your app's package name. --><categoryandroid:name="com.pase.starter" /></intent-filter></receiver><!--
IMPORTANT: Change "com.parse.starter.permission.C2D_MESSAGE" in the lines below
to match your app's package name + ".permission.C2D_MESSAGE".
--><permissionandroid:name="com.parse.starter.permission.C2D_MESSAGE"android:protectionLevel="signature" /><uses-permissionandroid:name="com.parse.starter.permission.C2D_MESSAGE" /><uses-permissionandroid:name="android.permission.WRITE_EXTERNAL_STORAGE"android:maxSdkVersion="18" /><uses-permissionandroid:name="android.permission.READ_PHONE_STATE" /><uses-permissionandroid:name="android.permission.READ_EXTERNAL_STORAGE"android:maxSdkVersion="18" /></application></manifest>
I'm not in Android Studio right now so I can't test it, but I think it should work !
Post a Comment for "Unable To Send Push Notification To Android Phone From Parse.com"