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.
Related
I started developping an app and I need to use the camera of my phone, and when I use the method Camera.open(), either with cameraId or not, it returns the error "An error occurred while connecting to camera: 0". My AndroidManifest.xml is:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.telecombretagne.holowater">
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.autofocus" />
<uses-feature android:name="android.hardware.flash" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".camera"
android:label="#string/title_activity_camera"
android:theme="#style/AppTheme.NoActionBar"></activity>
</application>
</manifest>
My phone's Android Version is 6.0.1, and it's a BQ Aquaris M5.
Thanks in advance.
Devices that are running Marshmallow requires permission to be set on runtime, here's my answer from another similar question here :)
From https://developer.android.com/training/permissions/requesting.html
Note: Beginning with Android 6.0 (API level 23), users can revoke permissions from any app at any time, even if the app targets a lower API level. You should test your app to verify that it behaves properly when it's missing a needed permission, regardless of what API level your app targets.
Aside from the permissions set in the manifest, you'll need to request/check for permission on runtime. There are sample codes in there you can use, or...
Quick solution,
go to Settings-> Apps->(Your app name)->Permissions and enable the camera permission.
Done, although not recommended for final product
then try your app again. Should be working now :D
try also adding the camera ID, like
Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
I have developped an applicaction that basically download a file from a Server via Bluetooth and store it in the memory of the mobile phone.
I read what is needed to publish and application in http://developer.android.com/tools/publishing/publishing_overview.html
and I followed the steps:
Remove any "android:debuggable" in the Android Manifest.
Remove any Log calls
Sign the file: Right click on the project->Export -> Android ->
Export Android Application ... during the process I use an
AppKey.keystored that I created before.
I apply Zipalign
http://developer.android.com/tools/publishing/app-signing.html#signing-manually
Once I finish that I upload the App to the Google Play Store.
I downloaded it with three diferent devices, with the following version of Android:
4.2.2 (It is the one I used to develop, debbug and test the App while writting it on Eclipse)
4.3
4.4
But it only works properly in the device with 4.2.2. In the other two devices the Application crash when I launch it.
This is the Android manifest of the Application, all the code is too long to upload it here. But I feel there problem must be or in the manifest or in the way I'm exporting/signing the file.apk
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cliente_bluetooth"
android:versionCode="3"
android:versionName="1.3" >
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.cliente_bluetooth.Cliente_Bluetooth"
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>
</application>
</manifest>
This is the link of the App in the Play Store:
https://play.google.com/store/apps/details?id=com.cliente_bluetooth
Can anyone find a mistake in the process of publishing? am I skipping or missunderstanding any step?
Thank you very much for your time
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.
some of my customers are having trouble opening their apps after downloading them. here is my last 1 star customer review:
'Only playable in play store using open/uninstall buttons. When select on phone app phone says app not installed. uninstalling.'
I'm getting a lot of 1 star ratings because of this and it's killing me. I also get some 5 star ratings so apparently this issue only affects some users. it works fine with my phone, but won't open on a friend's, unless she opens it from the store. I may have upgraded my targetSdkVersion from 16 to 19 recently.
here is my manifest, slightly edited for privacy, I've read of opening issues on another post being caused by bad manifest settings, but none of the suggestions related to my manifest settings:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mypackage"
android:sharedUserId="com.myshareduserid"
android:versionCode="300"
android:versionName="3" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<supports-screens android:largeScreens="true"/>
<supports-screens android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_USB" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:largeHeap="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:debuggable="false" android:permission="android.permission.WRITE_EXTERNAL_STORAGE">
<activity
android:name=".MyActivity"
android:label="#string/app_name"
android:screenOrientation="landscape"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|
uiMode|screenSize|smallestScreenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|
uiMode|screenSize|smallestScreenSize"/>
</application>
This is just a bug in your client's launcher app.
You cannot do a thing about that.
It might be a badly made custom launcher, or a bug, but it's out of your hands.
If that user has access to a custom recovery, he could wipe dalvik and cache, it always worked for me in that case.
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