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)
Related
I currently have an app on the Play Store and have created a version for Android Auto.
The Android Auto version works correctly on the DHU (Desktop Head Unit).
To test it on a real device (vehicle), I have created an Internal Test in Play Store, and in it, I have added the original app together with the Android auto bundle.
When I install it from the Play Store, the app does not appear in the list of available for Android Auto.
I suppose it has to do with the configuration of my "manifest" files, but I don't see where the error could be.
Has anyone had the same problem?
--- CODES UPDATED AFTER FIRST ANSWER -----
This is the "manifest" of the Android Auto app.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.recursoseducativos.programameudis_auto">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="32" />
<application
android:allowBackup="true"
android:appCategory="maps"
android:icon="#mipmap/ic_launcher"
android:label="Prográmame-udis"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.Prográmameudis" >
<meta-data
android:name="com.google.android.gms.car.application"
android:resource="#xml/automotive_app_desc"/>
<meta-data
android:name="androidx.car.app.minCarApiLevel"
android:value="1"/>
<service
android:name=".programameudisservice"
android:exported="true">
<intent-filter>
<action android:name="androidx.car.app.CarAppService" />
<category android:name="androidx.car.app.category.NAVIGATION"/>
</intent-filter>
</service>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="androidx.car.app.MAP_TEMPLATES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.hardware.location.network" />
<uses-permission android:name="android.hardware.location.gps" />
<queries>
<package android:name="com.google.android.apps.maps" />
</queries>
<uses-feature android:name="android.hardware.wifi" android:required="false"/>
<uses-feature android:name="android.hardware.screen.portrait" android:required="false"/>
<uses-feature android:name="android.hardware.screen.landscape" android:required="false"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
</manifest>
automotive_app_desc.xml
<?xml version="1.0" encoding="utf-8"?>
<automotiveApp xmlns:tools="http://schemas.android.com/tools">
<uses name="template" />
</automotiveApp>
And here is the "manifest" of the phone app (original app)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.programame_udis">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.permission.CAMERA" android:required="false"/>
<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.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name="net.recursoseducativos.programame_udis.canvas_manuscrito"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent"
/>
<activity
android:name="net.recursoseducativos.programame_udis.axenda_parte"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity
android:name=".aplicacion.alumnado_parte"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity
android:name=".aplicacion.diario_parte"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity
android:name=".aplicacion.partes_udi"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity
android:name=".aplicacion.arquivos"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity
android:name=".aplicacion.configuracion"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity
android:name="com.canhub.cropper.CropImageActivity"
android:exported="true"
android:theme="#style/Base.Theme.AppCompat" />
<activity
android:name=".aplicacion.cabecera_elector"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity android:name=".barcodescanner.lector_qr_camara"
android:exported="true"
/>
<activity android:name=".aplicacion.axenda"
android:exported="true"
/>
<activity
android:name=".aplicacion.alumnado"
android:windowSoftInputMode="stateVisible"
android:exported="true"
/>
<activity android:name=".aplicacion.diario"
android:exported="true"
/>
<activity android:name=".aplicacion.aplicacion"
android:exported="true"
/>
<activity android:name=".login.MainActivity"
android:theme="#style/SplashTheme"
android:background="#color/negro"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name="net.recursoseducativos.programame_udis.AlarmBroadcastReceiver" />
</application>
</manifest>
I have tested with and without <uses-permission and uses-feature in the Android Auto app, but ever the same result, no way to launch it in the car, because is not available in the android auto list.
Thanks in advance.
Can you add the contents of the automotive_app_desc.xml file? Also, you should declare the minimum Car App API level as a <meta-data> element in the manifest.
I don't understand why, I just try to push a beta version on google play and I have no compatible devices on this version (look at the screenshot). So when I download the apps, it's install me the current production version but not the beta like expected.
I have no problem to install it on my devices on dev mod with android studio so I know that this app working on my phone.
Someone can help me ? Thanks
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lgondor.simpledice"
>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.camera2.full" />
<uses-feature android:name="android.hardware.sensor.accelerometer" />
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true">
</supports-screens>
<application
android:allowBackup="true"
android:icon="#drawable/icon_small_shadow"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name="com.lgondor.simpledice.MainActivity"
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="com.lgondor.simpledice.AddCustomDiceActivity"
android:screenOrientation="portrait">
</activity>
<activity android:name="com.lgondor.simpledice.ManageSwitchActivity"
android:screenOrientation="portrait">
</activity>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
<service android:name="com.lgondor.simpledice.services.WearService">
<intent-filter>
<action android:name="com.google.android.gms.wearable.MESSAGE_RECEIVED" />
</intent-filter>
</service>
</application>
</manifest>
I'm using Google Maps in my Android app and I'm seeing the following message on some older devices:
I understand the nature of this message and that updating will resolve this issue.
However I would like to avoid users seeing this all together, and just want the map to load on all devices.
Here's what my dependencies look like:
Please note that I added individual parts of Google Play services that I needed rather than the full library as I started receiving an error from Android Studio about too many lines of code - this was the work around as I just have to many libraries as it seems.
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.android.vending.BILLING" />
<!-- Creating Permission to receive Google Maps -->
<permission android:name="com.xyzapp.it.supportmapfragment.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<!-- Permission to receive Google Maps -->
<uses-permission android:name="com.xyzapp.it.supportmapfragment.permission.MAPS_RECEIVE"/>
<!-- Permission to read Google Services -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!--Maps API needs OpenGL ES 2.0. -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<supports-screens
android:anyDensity="true"
android:resizeable="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<application
android:name=".xyzappitApp"
android:hardwareAccelerated="true"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/AppBaseTheme" android:largeHeap="true" >
<activity android:name=".SplashActivity" 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=".TabHostActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:icon="#drawable/app_icon" android:exported="true" />
<activity android:name=".StatusActivity" android:screenOrientation="portrait" />
<activity android:name=".StatusDetailsActivity" android:screenOrientation="portrait" />
<activity android:name=".MyAlertsActivity" android:screenOrientation="portrait" />
<activity android:name=".AlertLinesActivity" android:screenOrientation="portrait" />
<activity android:name=".AlertDetailsActivity" android:screenOrientation="portrait" />
<activity android:name=".PreferencesActivity" android:screenOrientation="portrait" android:theme="#style/ActionBarStyle" />
<activity android:name=".RouteListActivity" android:screenOrientation="portrait" />
<activity android:name=".StopListActivity" android:screenOrientation="portrait" />
<activity android:name=".StopTimesActivity" android:screenOrientation="portrait" />
<activity android:name=".UpgradeActivity" android:screenOrientation="portrait" />
<activity android:name=".TransfersActivity" android:screenOrientation="portrait" />
<activity android:name=".TransfersDetailsActivity" android:theme="#style/MyDialog" android:screenOrientation="portrait" />
<activity android:name=".ShareActivity" android:theme="#style/MyDialog" android:screenOrientation="portrait" />
<activity android:name=".ShareDetailsActivity" android:theme="#style/MyDialog" android:screenOrientation="portrait" />
<activity android:name=".MapActivity" android:configChanges="orientation|keyboardHidden" />
<activity
android:name="com.mopub.mobileads.MoPubActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.mobileads.MraidActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.common.MoPubBrowser"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.mobileads.MraidVideoPlayerActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<service android:name=".Service.NotificationService" />
<receiver android:name="com.xyzapp.it.Receiver.MyAlarmReceiver" />
<receiver android:name="com.xyzapp.it.Receiver.ConnectionChangedReceiver" android:exported="false">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<receiver android:name="com.xyzapp.it.Receiver.BootCompletedReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<uses-library android:name="com.google.android.maps" />
<meta-data android:name="com.crashlytics.ApiKey" android:value="123456" />
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="123456" />
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<meta-data android:name="com.google.android.gms.analytics.globalConfigResource" android:resource="#xml/global_tracker" />
</application>
Ideally I would like to know how to have the map just load and not force the user to update as my minSDK=10 and the app supports Android 2.3 devices and up.
Even if that means targeting a lower version of Google Play services to support SDK 10+ I'm ok with that solution.
Thanks!
However I would like to avoid users seeing this all together, and just want the map to load on all devices.
Then don't use Maps V2. Instead, use some other mapping solution (e.g., Open Street Map).
Otherwise, there is no "magic" dependency that will avoid this dialog on all devices. While you are welcome to use some older version of that play-services-maps dependency, there is no guarantee that ~1.5 billion devices will all support that particular version of the Play Services engine without any updates.
I have two android projects, one of them I'm using as library. I've created .aar file to use it as library in project. And it's working :). But I've a problem. It installs two apps with the same name in device. Any suggestion?
Application Manifest
<uses-permission android:name="android.permission.INTERNET" />
<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" />
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but are recommended.
-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name="package"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<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="#string/google_maps_key" />
<activity
android:name="net.riinvest.riinvest.Harta"
android:label="#string/title_activity_maps" >
</activity>
<activity
android:name="package"
android:label="#string/title_activity_kontakti" >
</activity>
</application>
</manifest>
Application that I use as library Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package=""
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="12" android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET"/><!--For connection to server-->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/><!--For RiProfService broadcasting-->
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/>
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true"
/>
<application
android:allowBackup="true"
android:icon="#drawable/riiprof_logo"
android:label="#string/app_name"
android:theme="#style/DeviceDefault">
<activity
android:name=""
android:label="#string/app_name"
android:windowSoftInputMode="stateHidden|adjustResize"
android:configChanges="locale|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Thanks in advance.
Best Regards
Remove this part from your library's AndroidManifest:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Its showing 2 launcher icons as both your library manifest and application manifest have following:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
This instructs to enable the activity to be launched by a launcher icon directly. If you remove this from your library manifest. That should fix it. Hope it helps.
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