Installing android app on SD Card, preferExternal doesn't work - android

I'm developing an Android app and I am not able to install it in the SD Card. This is my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.developfrank.application"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="preferExternal">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
I use as minimum version required Froyo 2.2 so I don't have any errors about the option installLocation, but at the moment of installing the app, my mobile installs it in the internal memory.
I also have these two permissions, I put it just in case it can give some clues:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
I tried many things and I am a bit lost. Thank you very much for your help
Frank.

Related

App is not asking for internet permission at installation

I have an Android app written by Xamarin, and it works perfectly fine when debugging.
But when I want to release it, my *.apk installer does not ask for INTERNET permission, therefore my app crashes whenever it requires connection, which is almost in every activity since it's an online app.
I have added the permission in my manifest file, but for some reason, the app only asks for Reading and Writing data from SD card permission and totally ignores internet permission.
Here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="ComicCity.ComicCity" android:versionCode="1" android:versionName="1.0" android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.DELETE_CACHE_FILES" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:label="ComicCity" android:icon="#drawable/CCicon"></application>
</manifest>
Internet is in the normal permissions list and thus you will not get prompted as it is auto-granted
If an app declares in its manifest that it needs a normal permission, the system automatically grants the app that permission at install time. The system does not prompt the user to grant normal permissions, and users cannot revoke these permissions.
Re: https://developer.android.com/guide/topics/permissions/normal-permissions.html

Android App not asking for permissions when installing from playstore

I made an android app and published it on play store. I mentioned all the app specific required permissions in manifest.xml file, But when I am installing it from playstore it not asking the permissions like it asked for other apps.
I found one similar question here But did'nt get what I am looking for
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.agrawalgaurav.www.nighttorch">
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
You might have installed the app in a phone running Android version 6.0 or above where the user should be requested permission on runtime and not at install time
Refer this https://developer.android.com/training/permissions/requesting.html
If you have Android 6 or higher permissions will be asking in runtime. Some permissions probably will not be asking in runtime, for example Internet permission, because they are from Normal Permissions group.

“your device isn't compatible with this version”

I have an app on the google play app store for more than two years with more than 8000 download and its a paid app. recently i received a mail from one of the customers saying that he had been using the app over two years and recently he updated his devices with latest os versions
after which he is not able to install the app from the app store. No updates have been pushed from developer end. the customer gets the error " your device is not compatible with this version" but the app is of the
same version that he had been using. what could be the error. any suggestion pls
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="au.example.test"
android:installLocation="auto"
android:versionCode="12"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<supports-screens android:largeScreens="true" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
In AndroidManifest.xml you can specify the minimum and maximum sdk version in this form:
<uses-sdk android:minSdkVersion="integer"
android:targetSdkVersion="integer"
android:maxSdkVersion="integer" />
Change your maxSdkVersion to the latest android sdk version(18), then it should work
This may or not make a difference but it is recommended that you target a particular API level. It may be worth setting the target sdk version to the latest android release and ensure it is working as expected.

Couldn't find Application Package Name in Android device

So I make an Android app with package name com.xxx.xxx. I know that any installed app will create a folder in Android/Data/com.xxx.xxx. But my case is I can't find my application package name in that directory after I install it. Am I missing something?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ceria.tuntun"
android:versionCode="1"
android:versionName="1.0" >
<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" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
Installed app wont necessary create a folder in Android/Data. There only the cache files are stored of your app, and that too if you have programmed your app to do so. By default the apps are stored in Internal memory in /data/data which can be accessed only if u have a rooted phone and a file browser for root users.
Which device r u using? You cannot see the application package in most of the devices because those do not have access to the internal storage if the app is installed in phone memory. You can access only SDCard.
the app is installed into the phone memory and not the SD Card by default. only the SD card files can be seen in an unrooted phone.
To install to SD card add this code to the manifest file.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="preferExternal"
... >

Installer is not showing all the permissions I request (Android)

This is my section of permissions of my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.adelco.ventamovil"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.INSTALL_PACKAGES"></uses-permission>
<uses-permission android:name="android.permission.DELETE_PACKAGES"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
But when I try to install the package, the wizzard only shows the Internet and Write External Storage permissions.
The DDMS perspective throws this warning message when I install the application:
03-28 10:48:36.627: WARN/PackageManager(144): Not
granting permission android.permission.INSTALL_PACKAGES to package
com.adelco.ventamovil (protectionLevel=3 flags=0xbe44)
03-28 10:48:36.627: WARN/PackageManager(144): Not granting permission
android.permission.DELETE_PACKAGES to package com.adelco.ventamovil
(protectionLevel=3 flags=0xbe44)
What is happening here....?
Thanks!!
Sorry,
Install, delete packages are system permissions. You won't be able to obtain them unless your app is signed with the device's platform certificate (which is impossible unless you have access to the manufacturer's signing cert).
As you can imagine, that'd be a serious security problem if an arbitrary application could silently install other applications.
The best you can do is send the user to the package install page and let them take action if they wish. Take a look at this action intent you can send to start this process for install,
http://developer.android.com/reference/android/content/Intent.html#ACTION_INSTALL_PACKAGE
and for uninstall,
http://developer.android.com/reference/android/content/Intent.html#ACTION_UNINSTALL_PACKAGE
INSTALL_PACKAGES and DELETE_PACKAGES are either in the group signature or signatureOrSystem and thus can't be granted to an "ordinary" app:
A permission that the system grants only to applications that are in the Android system image or that are signed with the same certificates as those in the system image
See android:protectionLevel.
Did you put your permissions like that?
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.your.package"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.DELETE_PACKAGES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Categories

Resources