java - Getting Multiple Notifications Per Push -



java - Getting Multiple Notifications Per Push -

when send out force notification, 5 of same notifications appear on device. reason why? here application.java , manifest:

public class application extends android.app.application {

public application() { } @override public void oncreate() { super.oncreate(); parse.setloglevel(parse.log_level_verbose); // initialize parse sdk. parse.initialize(this, "__removed key security___", "__removed key security___"); // specify activity handle pushes default. pushservice.setdefaultpushcallback(this, splashactivity.class); parseinstallation.getcurrentinstallation().saveinbackground(); }

and manifest:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.bordengrammar.bordengrammarapp" android:versioncode="1" android:versionname="1" > <!-- opengl map --> <uses-feature android:glesversion="0x00020000" android:required="true" /> <!-- permmisions --> <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.receive_boot_completed" /> <uses-permission android:name="android.permission.vibrate" /> <uses-permission android:name="android.permission.get_accounts" /> <uses-permission android:name="com.google.android.c2dm.permission.receive" /> <uses-permission android:name="android.permission.write_external_storage" /> <uses-permission android:name="com.google.android.providers.gsf.permission.read_gservices" /> <uses-permission android:name="android.permission.access_coarse_location" /> <uses-permission android:name="android.permission.access_fine_location" /> <uses-permission android:name="android.permission.call_phone" /> <!-- maps --> <permission android:name="com.bordengrammar.bordengrammarapp.permission.maps_receive" android:protectionlevel="signature" /> <uses-permission android:name="com.bordengrammar.bordengrammarapp.permission.maps_receive" /> <!-- force notifcation --> <permission android:name="com.bordengrammar.bordengrammarapp.permission.c2d_message" android:protectionlevel="signature" /> <uses-permission android:name="com.bordengrammar.bordengrammarapp.permission.c2d_message" /> <!-- android 3.0+ --> <uses-sdk android:minsdkversion="11" android:targetsdkversion="17" /> <!-- main settings application --> <application android:name=".application" android:allowbackup="true" android:description="@string/des" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/theme.example" > <!-- splash screen --> <activity android:name=".splashactivity" android:label="@string/app_name" android:theme="@style/fullbleedtheme" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <!-- main activity --> <activity android:name=".mainactivity" android:label="@string/app_name" > </activity> <!-- force stuff --> <receiver android:name=".bgswidgetprovider" android:icon="@drawable/ic_launcher" android:label="bgs widget" > <intent-filter> <action android:name="android.appwidget.action.appwidget_update" /> <category android:name="android.intent.category.default" /> <category android:name="android.intent.category.alternative" /> </intent-filter> <intent-filter> <action android:name="com.bordengrammar.bordengrammarapp.bgswidgetservice.moody" /> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_info" /> </receiver> <!-- other activitys --> <activity android:name=".aboutactivity" android:label="@string/title_activity_about" > </activity> <activity android:name=".settingsactivity" android:label="@string/title_activity_settings" > </activity> <activity android:name=".linkactivity" android:label="view link" > <meta-data android:name="android.support.parent_activity" android:value="mainactivity" /> </activity> <!-- meta-data (keys etc) --> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <meta-data android:name="com.google.android.maps.v2.api_key" android:value="aizasyb7vi7qbh0ui0jc5a_cjkecg2-jb6mqj0w" /> <activity android:name=".twitteractivity" android:label="@string/title_activity_twitter" android:parentactivityname=".mainactivity" > <meta-data android:name="android.support.parent_activity" android:value="mainactivity" /> </activity> <activity android:name=".privacyactivity" android:label="@string/title_activity_privacy" android:parentactivityname=".mainactivity" > <meta-data android:name="android.support.parent_activity" android:value="mainactivity" /> </activity> <meta-data android:name="com.crashlytics.apikey" android:value="3100c5a6401376fafb134b3000e78233a9a7f693" /> <!-- widget --> <activity android:name=".licenses" android:label="@string/title_activity_licenses" android:parentactivityname=".mainactivity" > <meta-data android:name="android.support.parent_activity" android:value="mainactivity" /> </activity> <!-- force 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.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.bordengrammar.bordengrammarapp" /> </intent-filter> </receiver> </application> </manifest>

login parse.com , go dashboard, , check info browser, there see table , info parse installation class. seems have duplicate rows same device token in parse installation table. may run cron job remove duplicates , maintain lastly updated one

java android push-notification parse.com

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -