I want to try some different ad providers for my android app.
Some of them want a lot permissions in the manifest which I don't always find appropriate.
(of course they all need android.permission.INTERNET since they fetch ads from their servers)
For example: Millenial Media wants android.permission.WRITE_EXTERNAL_STORAGE; a lot of other provider want android.permission.ACCESS_COARSE_LOCATION.
If I don't grant these permissions in the manifest does the app work correct anyway or could this cause problems?
And do I get ads from these providers anyway without these manifest-permissions?
Edit: it's hard to test all SDK's of the ad providers. For MoPub I know it still works if I don't give them android.permission.ACCESS_COARSE_LOCATION - and I get ads from them.
I think I will only get an Error when their SDK-Code is trying to use a Method which needs a permission - but they could catch this. So my question is more:
Do all ad providers handle this correct? And will they then refuse to send ads in general?
Edit-2:
Has anyone had errors/crashes because he didn't grant special permissions requested from the ad-providers SDK?
App will work fine but you will not get the adds.
these are compulsions , you need to add permissions in Android Manifest file .... its compulsion
From the official doc
If an application needs access to a feature protected by a permission,
it must declare that it requires that permission with a
<uses-permission> element in the manifest. Then, when the application
is installed on the device, the installer determines whether or not to
grant the requested permission by checking the authorities that signed
the application's certificates and, in some cases, asking the user. If
the permission is granted, the application is able to use the
protected features. If not, its attempts to access those features will
simply fail without any notification to the user.
This is the complete list of permissions you have to provide according to your needs
Related
is there any way for hide the android manifest Permissions for some reasons and user couldnt see during installing the app?
Taken from the support page from Google Play:
Google Play shows you which permission groups an app will be able to
access. This information can help you decide whether you want to
install the app.
The whole sole purpose of those permissions is for people to see what your app can access and decide whether they want to share (all) that information with you.
In Android L and lower, this is impossible. If you do not ask for a permission, you will get a crash when you try to access the thing that needs permission. Thus, you cannot hide permissions from users.
In Android M, the whole permission idea is changed: instead of asking for lots of permission at the install, the app is installed without permissions, and when you need a specific permission, for example for camera, the user will have the option of accepting or declining the permission. Thus, the user will have a clearer view of what a permission is asked for.
When I add the permissions
"INTERNET"
"ACCESS_NETWORK_STATE"
to my app and upload it to Google Play, people who download the app see the message "this app doesn't require any special permissions".
Are the following permissions "special" for Google Play?
"ACCESS_WIFI_STATE"
"READ_PHONE_STATE"
I'm using a mobile ad SDK that claims to perform better if it is granted all four permissions. But I don't want to scare off some users by asking for too many permissions.
The permission READ_PHONE_STATE has to be accepted by users, ACCESS_WIFI_STATE doesn't.
Somebody asked already about the link between Android Permissions and Permission Groups - the selected answer links to the actual mapping file for the permissions of Android.
So the permissions you mentioned are belonging into the following groups and protection levels:
INTERNET: NETWORK (dangerous)
ACCESS_NETWORK_STATE: NETWORK (normal)
ACCESS_WIFI_STATE: NETWORK (normal)
READ_PHONE_STATE: PHONE_CALLS (dangerous)
Based on Google's explanation about the protectionLevel, "special permissions" (as you call it) are permissions marked as "dangerous" (as Google calls it).
But hey, INTERNET is dangerous! Why aren't users asked about this permission? Because.
Google has also given each app Internet access, effectively removing
the Internet access permission. Oh, sure, Android developers still
have to declare they want Internet access when putting together the
app. But users can no longer see the Internet access permission when
installing an app and current apps that don’t have Internet access can
now gain Internet access with an automatic update without prompting
you.
I have noticed that for few apps containing ads, they will ask for READ_PHONE_STATE permission. After tracking down their bytecode, I find they call TelephonyManager.getDeviceId(). Is it necessary for app containing ads ask for DeviceID? It's malicious to me because it seems that these apps will leak my private information.
Admob at least doesn't require that permission. All it needs is Internet access permission.
I can't tell if other providers require more permissions.
I am trying to use another third party application into my application. Basically using some of the services from third party app. But these services need custom permissions defined in the third party application. So I have added those permission in my applications manifest file.
Suppose if my application is installed before installing the third party application then it won't get those permissions and so if I try to access the services from third party app, I am getting Security exception.
Is there a way to ask for permissions again or any other suggestions.
The permissions you request in your manifest are the permissions your app will receive regardless of when it is installed. Period. The permissions granted to another application are accessible by that application only. If there is a permission you need to use, it should be in your manifest. If it is there, permission will be requested from the user upon installation.
This is actually a known limitation of custom permissions. Even if both apps where yours, the one that defines the custom permission needs to be installed first, otherwise you will get an exception. If you control both apps, you need to define it in both apps. Otherwise, there is really no workaround: a permission needs to be know to the system to be granted.
BTW, you can use a third-party permission, as long as it is not a signature permission, requiring your app to be signed with the same key.
my android app already has the following permission:
android.permission.INTERNET"
I want to use the admob ads in ma application. I have seen a lot of examples how to use the admob in android and always
android.permission.ACCESS_NETWORK_STATE"
was needed as well.
Does anyone know if admob will work without the ACCESS_NETWORK_STATE permission, since this would require me to add another permission to the manifest.
Thanks
This permission basically allows admob to check if you're conneted to the internet or not
without it it won't work
Seeing how the manual literally states
Making ad requests requires the networking permissions INTERNET and
ACCESS_NETWORK_STATE, so these must also be declared in the manifest
I'd suggest it really requires the ACCESS_NETWORK_STATE permission. They are not just saying that to annoy their developers.