android - google cloud messaging errors on some devices -
i'm developing android app should use gcm deliver notifications.
at moment, i'm encountering problems devices <= android 4.0.4.
with galaxy nexus (4.3), nexus 7" (4.3) , fujitsu tablet (4.1.1) receive correctly broadcast gcm , show notification.
but htc incredible s (4.0.4) , htc flyer (3.2) application doesn't receive nothing. trying debug mode in eclipse, infact, application run on these devices doesn't enter in onreceive() method.
here's androidmanifest.xml
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.xxx.yyy" android:versioncode="3" android:versionname="1.2" > <uses-sdk android:minsdkversion="8" /> <uses-feature android:glesversion="0x00020000" android:required="true" /> <uses-feature android:name="android.hardware.camera"></uses-feature> <uses-permission android:name="android.permission.call_phone" /> <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_coarse_location" /> <uses-permission android:name="android.permission.access_fine_location" /> <uses-permission android:name="android.permission.access_location" /> <uses-permission android:name="android.permission.access_gps" /> <uses-permission android:name="android.permission.read_phone_state" /> <uses-permission android:name="android.permission.get_accounts" /> <uses-permission android:name="android.permission.access_network_state"/> <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.read_external_storage" /> <uses-permission android:name="android.permission.get_accounts" /> <uses-permission android:name="android.permission.wake_lock" /> <uses-permission android:name="com.google.android.c2dm.permission.receive" /> <permission android:name="com.seven.carserverapp.permission.c2d_message" android:protectionlevel="signature" /> <uses-permission android:name="com.example.gcmpush.sevenit.permission.c2d_message" /> <permission android:name="com.xxx.yyy.permission.maps_receive" android:protectionlevel="signature"/> <uses-permission android:name="com.xxx.yyy.permission.maps_receive"/> <application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <receiver android:name=".gcmbroadcastreceiver" android:permission="com.google.android.c2dm.permission.send" > <intent-filter> <action android:name="com.google.android.c2dm.intent.receive" /> <category android:name="com.xxx.yyy" /> </intent-filter> </receiver> <!-- production key --> <meta-data android:name="com.google.android.maps.v2.api_key" android:value="googleapikey"/> <activity android:name="xxx.yyy.splashscreen" android:label="@string/app_name" android:screenorientation="portrait" android:nohistory="true" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name="mappa" android:label="@string/title_filiali" android:screenorientation="portrait"></activity> <activity android:name="parlacon" android:label="@string/title_contattirapidi" android:screenorientation="portrait"></activity> <activity android:name="configurazione" android:label="@string/title_login" android:screenorientation="portrait"></activity> <activity android:name="imieidati" android:label="@string/title_datianagr" android:screenorientation="portrait"></activity> <activity android:name="chisiamo" android:label="@string/title_noleggio" android:screenorientation="portrait"></activity> <activity android:name="companyprofile" android:label="@string/title_companyprofile" android:screenorientation="portrait"></activity> <activity android:name="grandiaziende" android:label="@string/title_grandiaziende" android:screenorientation="portrait"></activity> <activity android:name="pmi" android:label="@string/title_pmi" android:screenorientation="portrait"></activity> <activity android:name="professionitsti" android:label="@string/title_professionisti" android:screenorientation="portrait"></activity> <activity android:name="faq" android:label="@string/title_faq" android:screenorientation="portrait"></activity> <activity android:name="guidaapp" android:label="@string/title_guidaapp" android:screenorientation="portrait"></activity> <activity android:name="ilmionoleggio" android:label="@string/title_ilmionoleggio" android:screenorientation="portrait"></activity> <activity android:name="main" android:label="@string/app_name" android:screenorientation="portrait"></activity> <activity android:name="newssingola" android:label="@string/title_news" android:screenorientation="portrait"></activity> <activity android:name="km" android:label="@string/title_inskm" android:screenorientation="portrait"></activity> <activity android:name="kmresoconto" android:label="@string/title_elencokm" android:screenorientation="portrait"></activity> <activity android:name="manuale" android:label="@string/title_manuale" android:screenorientation="portrait"></activity> <activity android:name="contattaconsulente" android:label="@string/title_contattaconsulente" android:screenorientation="portrait"></activity> <activity android:name="mainpublic" android:label="@string/app_name" android:screenorientation="portrait"></activity> <activity android:name="previsioneconsegna" android:label="@string/title_prevconsegna" android:screenorientation="portrait"></activity> <activity android:name="centriassistenza" android:label="@string/title_centriassistenza" android:screenorientation="portrait"></activity> <activity android:name="centriassistenzamappa" android:label="@string/title_centriassistenza" android:screenorientation="portrait"></activity> <activity android:name="centroassistenzasingolo" android:label="@string/title_centriassistenza" android:screenorientation="portrait"></activity> <activity android:name="servizicontratto" android:label="@string/title_servizicontratto" android:screenorientation="portrait"></activity> </application> </manifest>
quote manifest :
<permission android:name="com.seven.carserverapp.permission.c2d_message" android:protectionlevel="signature" /> <uses-permission android:name="com.example.gcmpush.sevenit.permission.c2d_message" />
the permission should your_package.permission.c2d_message
, , should same in <permission>
element , <uses-permission>
element.
Comments
Post a Comment