GCM Generates new registration IDs for the same phone - android

I'm using one device for testing and I'm getting a lot of new registration IDs from it. Not every time the app is built, but sometimes. I'm not sure what the deal is. How do I get it to use the same id? Isn't that what is supposed to happen?
Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="company.android.phone.TheApp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<!-- for push notifications -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- App receives GCM messages. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- GCM connects to Google Services. -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- For performance testing a trace file is saved to the SD card -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<permission android:name="company.android.phone.TheApp.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="company.android.phone.TheApp.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<supports-screens
android:resizeable="true"
android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="false"
android:anyDensity="true" />
<application
android:icon="#drawable/app_icon"
android:label="#string/app_name" >
<receiver android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="company.android.phone.TheApp" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="company.android.phone.TheApp" />
</intent-filter>
</receiver>
<activity
android:name=".SplashActivity"
android:theme="#style/Theme.Splash"
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:label="#string/app_name"
android:windowSoftInputMode="stateVisible|adjustPan"
android:name=".TheAppActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".MainActivity"
android:windowSoftInputMode="stateVisible|adjustPan"
android:screenOrientation="portrait" />
<activity android:name=".WebViewActivity"
android:windowSoftInputMode="stateVisible|adjustPan"
android:screenOrientation="portrait" />
<service android:name=".GCMIntentService" />
</application>
</manifest>

You have no warranty that your Registration Id will always be the same for your device.
The registration ID lasts until the Android application explicitly
unregisters itself, or until Google refreshes the registration ID for
your Android application.
For more info look here "Enabling GCM":
http://developer.android.com/guide/google/gcm/gcm.html

Related

Android - application not found error for some users after update

I have an android app on play store. I just released a new version but some of users report that after update they cant open application because they get application not installed error but they can open application through market by touching on open button. On new version i used same .jks file, I changed AndroidManifest.xml because i wanted to change main activity from .MainActivity to .Landing so mainActivity is no longer main. Maybe problem happens because of that? By the way not all users effected from this problem. Here is old and new AndroidManifest files and could you please check these files? Maybe another row cause that problem?
Solitions;
- Some users restart their phone and it works
- But some users cant fix by restarting their phone, so they remove and install again to fix it
But why this happens to some users?
OLD AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.example"
android:versionCode="9"
android:versionName="2.0.0"
android:installLocation="internalOnly"
>
<uses-sdk android:minSdkVersion="10" />
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true"/>
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission android:name="com.test.example.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.test.example.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.android.vending.BILLING" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
>
<!--This meta-data tag is required to use Google Play Services.-->
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<activity android:name=".MainActivity" android:label="#string/app_name" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Contact" android:windowSoftInputMode="adjustNothing" android:screenOrientation="portrait"></activity>
<activity android:name=".Notes" android:screenOrientation="portrait"></activity>
<receiver
android:name=".GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.test.example" />
</intent-filter>
</receiver>
<service android:name=".GcmIntentService" />
<!--Include the AdActivity configChanges and theme. -->
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
</application>
</manifest>
NEW AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.example"
android:versionCode="10"
android:versionName="2.0.1"
android:installLocation="internalOnly"
>
<uses-sdk android:minSdkVersion="10" />
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true"/>
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission android:name="com.test.example.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.test.example.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.android.vending.BILLING" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
>
<!--This meta-data tag is required to use Google Play Services.-->
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<activity android:name=".Landing" android:label="#string/app_name" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Contact" android:windowSoftInputMode="adjustNothing" android:screenOrientation="portrait"></activity>
<activity android:name=".Notes" android:screenOrientation="portrait"></activity>
<activity android:name=".MainActivity" android:windowSoftInputMode="adjustNothing" android:screenOrientation="portrait"></activity>
<receiver
android:name=".GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.test.example" />
</intent-filter>
</receiver>
<service android:name=".GcmIntentService" />
<!--Include the AdActivity configChanges and theme. -->
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
</application>
</manifest>
Your MainActivity is no longer a MAIN/LAUNCHER activity. Are you sure it's not just a matter of old shortcuts disappearing/failing to launch because of this?
The difference between users may be caused by having different launcher apps (various manufacturers or manually installed). If you have some helpful users, you could ask them to:
check the app drawer for the app, and
take a bugreport and send it to you (so that we may be able to see some logs of a failed launch)

Unity Android Push Notifications - Outdated Device

I am having trouble getting Push Notifications to work in my Unity application on Android. I have followed the steps in the Parse documentation, including setting up the AndroidManifest.xml. The device registers an installation, which I can see on the dashboard. However, when using the dashboard to create a Push the delivery report always says "PPNS - OUTDATED DEVICE" for my tablet.
I followed the instructions for creating the AndroidManifest.xml file from here:
https://www.parse.com/apps/quickstart#parse_push/unity/android/existing
Do I need to set the "GCMSenderId" value of the installation? The documentation was kind of ambiguous on that.
Here are the contents of my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
android:installLocation="preferExternal"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
<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.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:protectionLevel="signature"
android:name="com.unity3d.player.permission.C2D_MESSAGE" />
<uses-permission android:name="com.unity3d.player.permission.C2D_MESSAGE" />
<application
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:debuggable="true"> <!-- SET TO FALSE FOR RELEASE BUILD -->
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<service android:name="com.parse.ParsePushService" />
<receiver android:name="com.parse.ParsePushBroadcastReceiver"
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.unity3d.player" />
</intent-filter>
</receiver>
</application>
</manifest>
OK, so I've figured it out. I had a few things wrong with the manifest file, but the most important thing was changing the package name from the default of "com.unity3d.player". I had another test Unity app on the device using the same default package name, and I believe that because it was installed first it was intercepting the notifications.
Anyway, here is my AndroidManifest.xml file for anyone else having trouble with Parse Push using Unity3D and Android devices.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yourcompany.yourproductname"
android:installLocation="preferExternal"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
<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:protectionLevel="signature"
android:name="com.yourcompany.yourproductname.permission.C2D_MESSAGE" />
<uses-permission android:name="com.yourcompany.yourproductname.permission.C2D_MESSAGE" />
<application
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:debuggable="true"> <!-- SET TO FALSE FOR RELEASE BUILD -->
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<service android:name="com.parse.ParsePushService" />
<receiver android:name="com.parse.ParsePushBroadcastReceiver"
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.yourcompany.yourproductname" />
</intent-filter>
</receiver>
</application>
</manifest>
Note that you would replace all instances of "com.yourcompany.yourproductname" with whatever package name you want to use.

Parse.com Push Notification Service with cocos2d-javascript native project

I am trying to add push notification from the parse.com service which has its android sdk and following settings to cocos2d-JS project
Add parse sdk to lib ( I added it to runtime-src/proj.android/lib) and added as build path
Call Parse.initialize from the onCreate method of your Application class to set your application id and client key:
public void onCreate() {
Parse.initialize(this, "app_key", "client_key");
}
For this , I created a package name of com.mycompany.myapp in runtime-src/proj.android/src/
Now android manifest where I have to following things
<?xml version="1.0" encoding="UTF-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" android:versionCode="1" android:versionName="1.0" package="com.mycompany.myapp">
<uses-sdk android:minSdkVersion="9"/>
<uses-feature android:glEsVersion="0x00020000"/>
<application android:name="MyApplication" android:debuggable="false" android:icon="#drawable/icon" android:label="#string/app_name">
<!-- Tell NativeActivity the name of our .so -->
<meta-data android:name="android.app.lib_name" android:value="cocos2djs"/>
<activity android:configChanges="orientation" android:label="#string/app_name" android:name="org.cocos2dx.javascript.AppActivity" android:screenOrientation="portrait" android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="com.flurry.android.FlurryFullscreenTakeoverActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode"
android:hardwareAccelerated="false" >
</activity>
<!-- Flurry permissions and settings -->
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<!-- parse.com Requires this -->
<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" />
<!--
IMPORTANT: Change "com.parse.starter" to match your app's package name.
-->
<category android:name="com.mycompany.myapp" />
</intent-filter>
</receiver>
<!-- End of the receivers for Push Notifications -->
</application>
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- Required for Android Id -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- Required for InApp -->
<uses-permission android:name="com.android.vending.BILLING" />
<!-- Parse push notifications permisison -->
<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 the lines below
to match your app's package name + ".permission.C2D_MESSAGE".
-->
<permission android:protectionLevel="signature"
android:name="com.mycompany.myapp.permission.C2D_MESSAGE" />
<uses-permission android:name="com.mycompany.myapp.permission.C2D_MESSAGE" />
<!-- end of permission for parse push notif -->
</manifest>
But still this app is not getting registered for notification , I am trying to use parse.com push service with cocos2d-JS native project anyone where am I going wrong?

Android gcm push notifications working perfectly on emulator but not on device?

GCM server side is working fine. GCM Client side is working fine for emulator but not for device.
GCM SERVICE IS WORKING FINE FOR EMULATOR.
Below is my manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.spidertechnologiesllp.yay"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- Creates a custom permission so only this app can receive its messages. -->
<permission
android:name="com.spidertechnologiesllp.yay.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.spidertechnologiesllp.yay.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Permission to vibrate -->
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:allowBackup="true"
android:icon="#drawable/yayicon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.spidertechnologiesllp.yay.YayTabActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name=".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.spidertechnologiesllp.yay" />
</intent-filter>
</receiver>
<service
android:name=".GCMNotificationIntentService"/>
<activity
android:name="com.spidertechnologiesllp.yay.YayPredictionActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.spidertechnologiesllp.yay.YayOptionsActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.spidertechnologiesllp.yay.YayLoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity android:name="com.facebook.LoginActivity" >
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/app_id" />
</application>
</manifest>
STRUGGLING SINCE 2 DAYS.
ANY HELP WOULD BE APPRECIATED !!!
Youdint not place permission in com.spidertechnologiesllp.permission is missing
Replace this in manifest file
<permission
android:name="com.spidertechnologiesllp.yay.permission.C2D_MESSAGE"
android:protectionLevel="signature" />

Error in Manifest while using GCM for push Notification

I have started working on GCM Notification
after a lot of goggling i checked out code through which i can get registration id from GCM Server so i used
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
GCMRegistrar.checkDevice(this);
GCMRegistrar.checkManifest(this);
final String regId= GCMRegistrar.getRegistrationId(this);
if (regId.equals("")) {
GCMRegistrar.register(this, "338056690461");
}
else{
Log.v(TAG, "Already registered");
}
But When i run My Application i get error on `CheckMAnifest()`
this means i have error in my manifest but accordint to me my manifest is correct please have alook to my Exception as well as manifest
Exception it gives
java.lang.IllegalStateException: Application does not define permission PushNotification.Pop.permission.C2D_MESSAGE
and manifest i have used is
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="PushNotification.Pop"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />
<permission
android:name="PushNotification.Pop.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="PushNotification.Pop.permission.C2D_MESSAGE" />
<!-- App receives GCM messages. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- GCM connects to Google Services. -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application android:debuggable="true" android:label="#string/app_name" >
<activity
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name="com.google.android.gcm.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="PushNotification.Pop" />
</intent-filter>
</receiver>
<service android:name=".GCMIntentService" />
</application>
</manifest>
Please suggest me where i am going wrong your help would be greatfull
Thanks in advance :)
try to copy and paste this
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="PushNotification.Pop"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="17"/>
<!-- GCM connects to Internet Services. -->
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH" />
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="PushNotification.Pop.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="indieswebs.magento.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<application android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
>
<activity android:name="PushNotification.Pop.MainActivity"
android:label="#string/app_name_title"
android:clearTaskOnLaunch="true"
android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<!-- Receives the registration id. -->
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="PushNotification.Pop" />
</intent-filter>
</receiver>
<service android:name="PushNotification.Pop.GCMIntentService" />
</application>
</manifest>
or
I got answer for this issue. Just delete "gen"folder . It build automatically. Application will work fine.

Categories

Resources