parse.com - Parse GCM push notifications not working on Android 6.0 Marshmallow Developer Preview 3 -
i have registered necessary permissions, services, , broadcast receivers in androidmanifest.xml
, have parse push notifications working on pre android m devices. getting error (posted below) in android 6.0 marshmallow developer preview 3 running on nexus 5. user registering , can view in parse dashboard on parse.com, pushtype
, devicelasttokenmodified
undefined
. can't think issue parse sdk considering working fine on pre android m devices. issue android m's permission changes, except none of permissions requesting fall under category ask user grant it.
here error::
08-30 19:29:19.671 11848-11848/com.example.app v/com.parse.manifestinfo﹕ cannot use gcm push because app manifest missing required declarations. please make sure these permissions declared children of root <manifest> element: <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /> <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" /> <permission android:name="com.richardlucasapps.eaglescribe.permission.c2d_message" android:protectionlevel="signature" /> <uses-permission android:name="com.richardlucasapps.eaglescribe.permission.c2d_message" /> also, please make sure these services , broadcast receivers declared children of <application> element: <service android:name="com.parse.pushservice" /> <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" /> <category android:name="com.richardlucasapps.eaglescribe" /> </intent-filter> </receiver> 08-30 19:29:19.671 11848-11848/com.example.app v/com.parse.manifestinfo﹕ using none push.
here how initializing parse , setting push notifications:
public class myapplication extends application { @override public void oncreate() { super.oncreate(); parse.setloglevel(parse.log_level_verbose); parse.initialize(this, applicationid, clientid); parseuser.enableautomaticuser(); parseuser.getcurrentuser().increment("runcount"); parseuser.getcurrentuser().saveinbackground(); parseinstallation parseinstallation = parseinstallation.getcurrentinstallation(); parseinstallation.put("user", parseuser.getcurrentuser()); parseinstallation.saveinbackground() } }
here condensed version of androidmanifest.xml
file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.example.app” > <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.wake_lock" /> <uses-permission android:name="android.permission.vibrate" /> <uses-permission android:name="android.permission.receive_boot_completed" /> <uses-permission android:name="android.permission.get_accounts" /> <uses-permission android:name="com.google.android.c2dm.permission.receive" /> <!-- important: change "com.parse.starter.permission.c2d_message" in lines below match app's package name + ".permission.c2d_message". --> <permission android:name="com.example.app.permission.c2d_message" android:protectionlevel="signature" /> <uses-permission android:name="com.example.app.permission.c2d_message" /> <application android:name=".global.myapplication"> <!-- parse notification push service --> <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.parsepushbroadcastreceiver" android:exported="false" > <intent-filter> <action android:name="com.parse.push.intent.receive" /> <action android:name="com.parse.push.intent.delete" /> <action android:name="com.parse.push.intent.open" /> </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" /> <category android:name="com.example.app” /> </intent-filter> </receiver> </application>
update parse library using in project. using 1.9.4 , updated parse 1.10.1 , android marshmallow device registering , receiving push notifications.
Comments
Post a Comment