I wanted to update my app but after uploading I noticed that there were additional permissions which I don't mention in my manifest:
android.permission.ACCESS_NETWORK_STATE
android.permission.GET_ACCOUNTS
android.permission.INTERNET
android.permission.READ_EXTERNAL_STORAGE
android.permission.USE_CREDENTIALS
android.permission.WRITE_EXTERNAL_STORAGE
com.google.android.c2dm.permission.RECEIVE
My manifest looks like this
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.stepscience.yahtzee" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.App" >
<meta-data
android:name="com.google.android.gms.games.APP_ID"
android:value="#string/app_id" />
<activity
android:name=".StartActivity"
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>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<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>
I only use the permissions for Internet and Network access. Where do the other permissions come from? In the app I use also some google play services like multiplayer and leaderboards. The only changes that I made to the version before were some version updates (gradle,play-services,appcompat) and some xml modifications.
Some permissions are being added by Google Play Services.
You can reduce the permissions it adds by only including the components that you actually need. e.g Google Cast, Google Drive etc
See here for how to do that:
https://developers.google.com/android/guides/setup
Example gradle:
Entire Play Services
compile 'com.google.android.gms:play-services:7.8.0'
Only Games Services
compile 'com.google.android.gms:play-services-games:7.8.0'
Related
I am trying to upload apk on playstore from few days. but now days its showing list of core functionality in deceleration form like SMS and call log.
but in our apk there is no use of such permissions. I am using Internet and Fine Location permission, but its not listed there. there is compulsion that we require to select atleast one permission.therefore I am selecting Default SMS handler.
even I search through many tools there is no SMS and call log permission is used in whole source code.
As I found many answer on google that Make sure your SMS permission is given in manifest and give the pop up in user level.
but there is no permission in my manifest.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.demmyname.com">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!--<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />-->
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name="com.demmyname.com.Classes.Application"
android:allowBackup="true"
tools:replace="android:allowBackup"
android:icon="#mipmap/icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/icon"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".Activities.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main"
android:theme="#style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan" />
<activity android:name=".Activities.Activity_Login" />
<activity android:name=".Activities.Activity_SignUp" />
<activity android:name=".Activities.Activity_Forgot_Pwd" />
<activity android:name=".Activities.Activity_Profile" />
<activity android:name=".Activities.Activity_Change_Password" />
<service
android:name=".Services.AppLocationService"
android:enabled="true" />
<activity android:name=".Activities.Activity_Chnage_Location" />
<activity android:name=".Activities.Activity_Order_Delivary" />
<activity android:name=".Activities.Activity_Order_PichUp" />
<activity android:name=".Activities.Activityz_Hotel_Categories" />
<activity android:name=".Activities.Activity_Category_Items" />
<activity android:name=".Activities.Activity_Cart_List" />
<activity android:name=".Activities.Activity_Place_Order" />
<activity android:name=".Activities.Activity_MyOrders" />
<activity android:name=".Activities.Activity_About_Us" />
<activity android:name=".Activities.Activity_View_Offer"></activity>
<!--
<meta-data
android:name="io.fabric.ApiKey"
android:value="7aa3cad21d26b0edcfccea540b57016907999433"
/>
-->
<!-- <meta-data android:name="firebase_crash_collection_enabled" android:value="false" /> -->
<activity android:name=".Activities.Activity_PayUMoney"></activity>
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
</application>
</manifest>
I am looking for solution how to skip declaration form or without selecting core functionality.
To make sure if any other libraries are using the violated permissions, do the following...
In your Android Studio, open the manifest file and observe that in the below of the page 2 (two) Tabs are there =>
Text
Merged Manifest
Click on the Merged Manifest tab. Then search for the
uses-permission
Check that if it contains any call log or sms permissions (or other violated permissions).
If you find any use of the violated permissions like that, add the following line in your manifest under the
manifest tag
<uses-permission android:name="android.permission.READ_SMS" tools:node="remove" />
And for each and every violated permission add another line like the above with the appropriate permission tag.
Then rebuild the project and check that your merged manifest does not contain any violated permissions. After the confirmation generate signed APK and update your application in the Google Play console. (For now, check the do not meet the Google privacy policies in the declaration form).
After a successful update and around after 24 hours, recheck that the form (in Play console) exist or not. There should not be any form after a successful APK update.
You may want to update your APK again after the form disappears for a clear update.
My game cannot sign-in to Google Play Games Services, I do not understand why. I've tried a lot of different solutions, none worked for me, also, I was using Google Guidelines, still, I cannot sign-in (despite I had set my tester account and correct APP_ID).
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hypeofpipe.westernshooter"
android:versionCode="8"
android:versionName="0.4preAlpha">
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="25" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/GdxTheme" >
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="#string/app_id"/>
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<activity
android:name="com.hypeofpipe.westernshooter.AndroidLauncher"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
Yes Włodek Wolieniuk, I saw in your logcat:
GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE
which led me to this link.
Fact is that when you sign a APK and then ask Google for a OAuth2
token, you have to register your signed app through the dev console.
I am trying to read data from Google Play Music Database using ContentProvider. I have included the READ_EXTERNAL_STORAGE permission within my Manifest file but, at crash, the logcat shows that the permission is not provided. Do I need to use the "Requesting Permission at runtime". If yes, how?
Error message:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.ryanbansal.mymusic/com.app.ryanbansal.mymusic.Requested}: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/audio/albums from pid=11192, uid=10240 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app.ryanbansal.mymusic">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:hardwareAccelerated="true"
android:allowBackup="true"
android:icon="#drawable/headphonesicon"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".Home">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Requested"
android:label="Requested Results" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".Home"/>
</activity>
<activity
android:name=".Webpage"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="More info"
android:theme="#style/FullscreenTheme" >
</activity>
<service
android:name=".MyIntentService"
android:enabled="true"
android:exported="false" />
</application>
I would comment, but not enough reputation yet, but here is the documentation on runtime permissions for api 23 plus. Supplementary reponse building on #Tharkius comment:
https://developer.android.com/training/permissions/requesting.html
There's a very cool easy-to-use library for managing runtime permissions. Follow the documentation in that link, all you need to know is there, and you'll see how super easy it is to set up and use :D
I have uploaded my app to Google Play, and I see the “your device isn't compatible with this version” message. I have seen many other similar question, but my case seems to be unique: I get this message on the very same device that I have used for development.
Here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.mindworks.foodforyou">
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" android:required="false" />
<uses-permission android:name="android.permission.READ_PROFILE" android:required="false" />
<uses-permission android:name="android.permission.READ_CONTACTS" android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:required="false" />
<uses-feature android:glEsVersion="0x00020000" android:required="false"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".ui.LoginActivity"
android:label="#string/title_activity_login" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<activity
android:name=".ui.SplashActivity"
android:configChanges="keyboardHidden|screenSize"
android:screenOrientation="portrait"
android:label="#string/title_activity_splash"
android:theme="#style/FullscreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.MainActivity"
android:label="#string/title_activity_main"
android:theme="#style/AppTheme.NoActionBar"
android:configChanges="orientation|screenSize"/>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="xxxxxxxxxxxx_xxxxxxxxxx-xxxxxxxxxxx"/>
</application>
</manifest>
What am I doing wrong?
Update
For those who say I can not be a beta tester for my own application:
And here is the error message:
You cannot use the same account for Beta testing as the developer account. The same account usage is permissible for Alpha testing but using the same developer account for Beta testing violates the definition of Beta testing in itself so, you are not allowed to Beta test your apps using the same account as it's developer.
I have found the answer here:
Android app is supported by 0 devices
Sometimes the reason for this is a third party library that you have
referenced. If you can find which one is it and if you can remove it
you can solve the problem.
In may case I had to remove:
org.apache.commons.io:2.4
by Ivo Stoyanov
you want be able to use that application in developer account means you will not be able to install beta application on that device with same account.
developer account should not be same as that in device to install beta app.
try that with using different account.
check setup Alpha/Beta test
I'm trying to enable Google Play Games in my Adobe Air game for Android. There are 2 apps a full and a demo one. But it looks like SignIn/SubmitScore/ReportAchievement codes are just being ignored, for both apps.
I'm using this ANE, but have also tried this and it's original fork. For all the result is the same. Code "ignored", nothing happens.
My project setup:
All the project was done, compiled and packaged in FlashDevelop. Platform is Air Mobile 14.0, SDK is Adobe Air 16.0. I use my own .p12 certificate for Android package, one for each App version.
I include the ANE on FlashDevelop the same way I included Game Center
ANE, for the same APP. The Game Center one is working, so I think
this one should also be fine.
I have added my com.google.android.gms.games.APP_ID to the xml, together with the additions required by the ANE.
In my code I do (and nothing happens, no callback is called, no signal is triggered, no sign in pop up screen, but my "trace" notification is shown, so the code is reached):
Games.initialize();
addListeners(); //Adding SignIn and SignOut callbacks
Games.promptUserToSignInOnStartup(true);
Games.start();
NotificationSystem.notifyLoading("Connecting to Google Play Games Service");
On Google's Developer Console:
Both apps are published for Alpha/Beta tests, there is no Production version yet.
I've set up Play Games Services, it is "Ready to test".
Both apps have been linked to it and authorized. I verified OAuth2.0 SHA1 fingerprint for both .p12 and they match.
This is my APK's AndroidManifest.xml, as I can't imagine the problem being on code side, or Google's console side.. I think it should be somewhere on ANE's config when packaging. So it might be here:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" package="air.mygame">
<application android:hardwareAccelerated="false" android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:configChanges="keyboardHidden|orientation|screenSize" android:label="#string/app_name" android:launchMode="singleTask" android:name=".AppEntry" android:screenOrientation="user" android:theme="#style/Theme.NoShadow" android:windowSoftInputMode="adjustResize|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<meta-data android:name="namespaceVersion" android:value="14.0"/>
<meta-data android:name="aspectRatio" android:value="portrait"/>
<meta-data android:name="autoOrients" android:value="true"/>
<meta-data android:name="fullScreen" android:value="true"/>
<meta-data android:name="uniqueappversionid" android:value="251bf45a-b5b6-49ae-bb1a-4337f47f8f34"/>
<meta-data android:name="initialcontent" android:value="mygame.swf"/>
<meta-data android:name="containsVideo" android:value="false"/>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="MY_APP_ID_ON_GOOGLE_PLAY_GAMES"/>
<meta-data android:name="com.google.android.gms.version" android:value="4242000"/>
<activity android:name="com.google.api.games.SignInActivity" android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
<activity android:name="com.google.api.games.StubActivity" android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
</manifest>
Ok! I found the error and it was indeed in the AndroidManifest.xml.
For anyone else struggling with this, the problem is that when working with Adobe Air we don't edit AndroidManifest.xml file directly, we edit application.xml using the manifestAdditions tag. And the needed additions were going to the wrong place.
My application.xml was like:
<android>
<manifestAdditions>
<![CDATA[<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-sdk android:minSdkVersion="9" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<!-- GooglePlay Games Services -->
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\ MY_GOOGLE_PLAY_GAMES_APP_ID" />
<meta-data android:name="com.google.android.gms.version" android:value="4242000" />
<activity android:name="com.google.api.games.SignInActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.google.api.games.StubActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</manifest>]]>
</manifestAdditions>
</android>
Looking at Google's guide there could be no activity tag outside of the application tag on the final AndroidManifest.xml. Also, according to this, the meta-data tag should also be inside the application tag.
I just had to edit the application.xml so it looked like:
<android>
<manifestAdditions>
<![CDATA[<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-sdk android:minSdkVersion="9" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<!-- GooglePlay Games Services -->
<application> <!-- This will be merged with application tag in the final manifest file -->
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\ MY_GOOGLE_PLAY_GAMES_APP_ID" />
<meta-data android:name="com.google.android.gms.version" android:value="4242000" />
<activity android:name="com.google.api.games.SignInActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.google.api.games.StubActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>
</manifest>]]>
</manifestAdditions>
</android>
To open your final AndroidManifest.xml, file for checking, you can use apktool.