When I install my app on an AVD (or a real device), it shows the requested permissions as "Storage - modify/delete SD card contents" and "Phone calls - read phone state and identity"
However, I don't need these permissions and have not requested them in my AndroidManifest.xml (see below).
What is causing these permissions to be requested, and how can I prevent the permissions being required?
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="1" android:versionName="1.0" package="my.App"
xmlns:android="http://schemas.android.com/apk/res/android">
<application android:label="#string/app_name" android:debuggable="true">
<activity android:label="#string/app_name" android:icon="#drawable/icon" android:name="com.co.my.App">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
There may not be enough information here to diagnose the problem - any information about how required permissions are specified / calculated would be appreciated
These permissions were not required in the first release of Android.
In order to avoid apps developed against that breaking on subsequent release devices where they are required to perform associated actions, they are automatically added at install time if the AndroidManifest.xml does not have a uses sdk tag declaring a version subsequent to their introduction (which would be 3, if I recall correctly).
See http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#target
Related
Basically, I searched through all the internet and found big, fat zero about that.
My app is using sms sending service and I need SMS_SEND permission. When I add it and run - Eclipse says that I have errors in my code AND antivirus alert that they blocked Android.Trojan.SMS_SEND.NR. I don't care about the latter - because it doesn't show up without SMS_SEND permission.
All I found is in Lint Error Checking:
"Looks for permissions that are only granted to system apps
Permissions with the protection level signature or signatureOrSystem are only granted to system apps. If an app is a regular non-system app, it will never be able to use these permissions."
BUT what matters the most - other app tha use that permission is fine. So what could happened? I need that service to be in that app.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mypackage.etc"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.SEND_SMS" />
<application
android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Your Android AV Software (F-Secure?) is blocking the code probably based on heuristics or signature. As most if not all Android AV Software is worthless I'd remove that first. Assuming you are not using a rooted device it must simply be picking this up from a manifest scan or some use of the Package Manager.
The "signature or signatureOrSystem" is not applicable to the SEND_SMS permission and whilst you may find a use for using the signature permission cross (identically signed) applications, it is unlikely you are using this.
Please show us your manifest.
I installed an instrumentation test APK from Eclipse(Run->Run As Android application) on device as the log shows below.
[2013-08-08 22:14:13 - SettingsTests] /SettingsTests/bin/SettingsTests.apk installed on device
However, on the home screen of the device, somehow the test APK does not show. In Settings->Application Manager, the list shows the test apk correctly.
Any idea what's going on?
The android system info shows:
Source:/data/app/PACKAGE.test.test-1.apk
data:/data/app/PACKAGE.test.test
Here's the test apk's manifest.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="PACKAGE.test.test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="17" />
<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="my.package" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<uses-library android:name="android.test.runner" />
</application>
</manifest>
Only the activity defined in manifest like below will be shown. You must define at least one activty like that.
<activity
android:name="YourActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
What you are trying to install doesn't have an activity defined in the manifest.
As per the docs
An activity is that implements part of the application's visual user interface.
All activities must be represented by <activity> elements in the manifest file.
Any that are not declared there will not be seen by the system and will never be run.
You can refer the document so as to have an idea how activity works
It's quite normal behavior, as you don't have any activity in your instrumentation package. Didn't you mean to run it as Android JUnit Test?
I've been creating an android app and when I export (and sign) it, it always adds a "Development tools (test access to protected storage" permission that I had never set.
This is my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.tdr"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="Escriure"
android:enabled="true" >
</activity>
<activity android:enabled="true" android:name="Llegir"></activity>
</application>
</manifest>
I do need to write and read files from the external storage, but not to use (¿?) development tools. Where is the problem? Thanks!
Android has added a new permission that needs to be added for Jelly Bean. Please read this article, which is copied below for quick reference:
Now, in Jelly Bean, we’re getting the “read external storage”
permission. According to Google:
READ_EXTERNAL_STORAGE
Provides protected read access to external
storage. In Android 4.1 by default all applications still have read
access. This will be changed in a future release to require that
applications explicitly request read access using this permission. If
your application already requests write access, it will automatically
get read access as well. There is a new developer option to turn on
read access restriction, for developers to test their applications
against how Android will behave in the future. So, when you hop into
the development options on your Jelly Bean device, don’t be surprised
to see this new option. We won’t see the permission in Android 4.1.0,
but most likely in 4.1.1, and its intention is to keep your device
more secure.
I developed an android app. Its manifest is very simple and copied below.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.siddjain.jainaartis"
android:versionCode="1"
android:versionName="1" >
<uses-sdk android:minSdkVersion="7" />
<uses-configuration android:reqFiveWayNav="true" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".Main"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".DisplayForm"
class=".Aarti" >
</activity>
</application>
</manifest>
The Play store reports this app to be incompatible with many devices. Specifically, it reports it to be incompatible with Samsung GT-S5570 which is my phone. I installed the app onto my phone manually, and it works.
The developer console gives this message:
This application is only available to devices with these features, as defined in your application manifest.
Screen layouts: SMALL NORMAL LARGE XLARGE
Required device features
android.hardware.touchscreen
This application is available to over 266 devices.
The device availability dialog lists Samsung GT-S5570 as incompatible.
How can I fix the compatibility issue? What is there in my manifest that is causing the app to be classified as incompatible with Samsung GT-S5570? As mentioned earlier, I have checked the app works on my phone.
The specs of the phone are available here btw. It has a display resolution of 240x320 pixels and has Froyo (android v2.2.1)
Was able to fix this using following manifest (support for small screens has to be declared explicitly). The number of devices to which the app is available increased from 266 to 1272.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.siddjain.jainaartis"
android:versionCode="3"
android:versionName="1" >
<uses-sdk android:minSdkVersion="7" />
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".Main"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".DisplayForm"
class=".Aarti" >
</activity>
</application>
</manifest>
Might be a carrier restriction. The play store filters apps via known information about your device (screen size, OS, carrier), but not if it can install and/or work or not. It would be a nightmare for development (and non play store apps) if you couldn't install because it checked compatibility.
How long ago did you add the app? If you just added it, it takes several hours for it to propagate and become available.
I see it uses 5 way nav. Does your application use this (I assume so) and does it work in your application?
I've published an app today mainly for my forum users to use, just a
very simple app that displays wallpapers derived from the forum.
Problem I'm having is one guy says it doesn't appear in the market,
and I've even sent him the APK to install manually but it fails.
My minimum SDK version is 4, I created it with the 1.6 SDK specified
so not sure why he can't see it or install it. He has a 1.6 Magic
handset.
So just wondering if anyone has any ideas, the app is called bocn
wallpaper, it uses internet and set-wallpaper permissions.. but I
wouldn't have thought the permissions were the problem...
My manifest is as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="1.0" package="net.dbws.bocnwallpaper">
<application android:icon="#drawable/launcher_icon"
android:label="#string/app_name">
<activity android:name=".Main"
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:value="xxxxx" android:name="ADMOB_PUBLISHER_ID" />
</application>
<uses-sdk android:minSdkVersion="4" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.SET_WALLPAPER" />
</manifest>
Please, check the supported screens: http://developer.android.com/guide/topics/manifest/supports-screens-element.html
Android 1.6 has small-screens flag set default to false. May be it causes that the application is not seen on the device of the guy.