Android application works when debugging but won't install - android

i'm developing an android application using Xamarin.Android.
It's all fine when installing my signed apk on an Android Kitkat phone, but when I try to install it on older android versions, there come the problems...
If I try installing the application on Android 4.1.2, it says "Application not installed", but if I try to debug the app using that phone as target it works brilliantly, no problems at all, every feature is working as expected. I also tried on android 4.2.2 and got the same result, so I think it's not related to minumum API level too low (it's set to 14 right now).
Is there any way I can see why it won't install?
Can anyone help me understanding the problem?
Thanks!

Like Alex.F said, you may need to enable "allow unknown sources" in the settings menu. Other than that you may have added "uses-feature" attributes to your androidmanifest.xml that forbid the app to be installed on certain devices (in release mode).
For instance if you add
<uses-feature android:name="android.hardware.usb.host" />
You shouldn't be able to install/start the app on devices that do not support usb-host mode. To remedy this you can add a required="false" attribute like so:
<uses-feature android:name="android.hardware.usb.host" android:required="false" />
This will make the usb-host feature optional. Hope that helps, otherwise see if you can try to provide a bit more information!
Good luck!

Related

Unable to distribute app on Android Wear in Google Play Developer console

Im trying to submit my newly created Android Wear watch face through Google Play Developer Console. The problem is checkbox "Distribute your app on Android Wear" in pricing and distribution section is disabled. I cant understand why.
What I did:
1) Uploaded screenshot for Android Wear
2) Uploaded 2 APK files in closed Beta releases. Both files are signed with one key, have different version names. First is phone apk with embedded wear apk (minSdkVersion 23), second - standalone wear apk (minSdkVersion 25) has meta-data android:name="com.google.android.wearable.standalone" android:value="true" in manifest file.
Everythings seems fine and app is ready to publish in production, except the "Distribute your app on Android Wear" checkbox which remains disabled.
What Im missing?
I stumbled upon the exact same issue.
I had <uses-feature android:name="android.hardware.type.watch" /> in my manifest
I had <meta-data
android:name="com.google.android.wearable.standalone"
android:value="true" /> in my manifest
minSdk was set to 25
But still the checkbox for Wear distribution was disabled.
For fun I tried editing the HTML with Chrome's inspection tools, and removed the "disabled" attribute from the checkbox. Sure enough, the setting stuck after enabling the checkbox, and now Wear distribution is enabled. Give it a try!
You may want to check Packaging and Distributing Wear Apps and see if you've missed something.
As discussed, aside from specifying APK's version code (standalone Wear and embedded Wear), also check if you've updated your Wear module's build.gradle file to include the following if an existing embedded app has a minimum SDK version of 23:
android {
// Allows you to reference product flavors in your
// phone module's build.gradle file
publishNonDefault true
...
defaultConfig
{
// This is the minSdkVersion of the Wear 1.x embedded app
minSdkVersion 23
...
}
buildTypes {...}
productFlavors {
wear1 {
// Use the defaultConfig value
}
wear2 {
minSdkVersion 25
}
}
}
Also, check Distribute to Android Wear for more information.
I've received the email from Google support saying that they worked on the issue and changed something. They noted that my manifest file for mobile was missing line <uses-feature android:name="android.hardware.type.watch"/>
I only had this line in Wear module manifest.
I've added this line, uploaded a new version with 2 apk files for wear 2.0 and 1.0 and after that checkbox became enabled.
Currently, the official docks for Wear 2.0 don't clearly say that this line should be added to both manifest files.
Also strange that before the problem with this project I managed to successfully upload another Wear 2.0 project to Developer Console (with checkbox enabled), and the line was only in Wear module manifest.
I actually emailed Google about this - it was an issue on their side and they have now fixed it...
If you add <uses-feature android:name="android.hardware.type.watch"/> to your mobile manifest (not wearable manifest) your apk will be distributed only for WEARABLE devices! Don't do it if you want to distribute also for mobile phones.
I have the same problem. Checkbox "Distribute your app on Android Wear" is grey out. I have followed all instructions in App Distribution, added all wearable screenshots and still cannot check the box.
I have contacted support. First they said, that in my wearable manifest in need to replace:
android.hardware.type.watch
with:
android.hardware.type.WATCH
That didn't help. Next they told me, that there is a bug in developer console and it should be resolved by Tuesday May 9th. Unfortunately, they didn't fix anything or they didn't do anything at all.
Next they told me, that I need to add <uses-feature android:name="android.hardware.type.watch"/> to my mobile manifest file. I cannot do it, because apk would then be distributed only for wearable devices.
I have send them my manifest.xml and build.xml for mobile and wearable and waiting for the response.
Before april I have added about 10 wearable apps (also with 2.0 support) and there was no problem.
In my point of view they doesn't know what the problem is and cannot help us. Moreover they instructions App Distribution are out of date and In one place there is info, that minimum SDK should be 23, and few pages below there is sample code with minimum SDK 21.
Your APK requires both tags below as called out in other answers.
However, you still won't be able to check the box if the original APK (without the tags) was uploaded for the release. You must delete that APK and make sure only the APK with all those fields is left.
I made this mistake and had to hack the solution above but couldn't publish afterwards until I deleted the original APK I uploaded without the standalone tag. I asked support and they seemed to verify this.
Anyway, try that before hacking, hope that helps.
Required in your Wear manifest:
Requirement 1:
<uses-feature android:name="android.hardware.type.watch" />
Requirement 2:
<meta-data
android:name="com.google.android.wearable.standalone"
android:value="true" />

Will android app crash if manifest use class not defined?

If we need to use a service say tvinputservice in Manifest but the service is available with android.software.live_tv. If a device doesn't have android.software.live_tv and we put tvinputservice in Manifest. Will the app crash on that device?
That will not allow to install the app on such devices (without the feature) through Google Play. That does not prevent you from installing the apk manually on such devices though, and the app will not crash until it actually try to use the functionality which is not present.
To allow installing the app on such devices via Google Play, you can use android:required="false" inside uses-feature tag.
You can choose Min SDk and Max SDK in Gradle file in Android Studio
and Manifest in Eclipse .
Min SDK and Max SDK is configure that your application run on which devices.

Android compatible devices with Appcelerator 5.5.1

I've just published an update of my app on Play Store.
The news are essentially coming from Appcelerator that I update from SDK3.5.2 to SDK5.5.1.
My manifest.xml files contains this :
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23"/>
(3 sizes of screen : small, large, xlarge)
My previous version was compatible with every devices listed in the Developper Console (I had android:targetSdkVersion="16"), but now I missed quite half of the devices and I can't figure why.
It seems the Android 4.4 devices (and maybe previous versions) are no more compatible.
What should I look at to fix it ?
It's likely not the version but the features you are using. Easiest way to check is compile your app for either the android emulator or a device then check the build/android folder for the AndroidManifest.xml file. When you look inside you will see what android permissions and features are being asked for by your app.
For example, if you put code to 'place a phone call' in your app, appcelerator would require the android.hardware.telephony feature enabled. So, every tablet on the market would be excluded because they don't have telephony features. You can check out a list of features available in android here: https://developer.android.com/guide/topics/manifest/uses-feature-element.html
Compare the list in your manifest file and see what might be causing the elimination of devices. For example, I use a module for barcode reading that automatically enables autofocus and flash in my manifest. If I publish, again many tablets are excluded because they don't have flash, so I have to manually edit my AndroidManifest file and change the line from:
<uses-feature android:name="android.hardware.camera.autofocus"/>
<uses-feature android:name="android.hardware.camera.flash"/>
to
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
Once you have the fixed manifest file you can manually force Appcelerator to use your manifest by copying it into platform/android folder. Realize that you'll need to do this every time you compile for release to the play store.
Ray

Android App shows incompatible with ICS 4.0.4 device Google Play

Here is the stuff that matters from my Android App Manifest file. I am looking at supporting Android API Level 4 and above with target = 14 supporting all screens.
Developer console shows
API level: 4-16+
Supported screens: small-xlarge
OpenGL textures: all
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
<uses-permission android:name="android.permission.WIFI_CHANGE_STATE"/>
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true" />
Here is the Google Play App link
Here are the device details for the Device from which when I go to Google Play my App shows incompatible.
Motorola DROID Bionic
Android Vs 4.0.4
Verizon Wireless CDMA
System Version 6.7.230.XT875.Verizon.en.US (Leaked ICS Build for DROID Bionic)
Build Number 6.7.2-223
I have tried turning Copy Protection On/Off from Google Play but same result.
I am unable figure out what is causing this incompatibility with my app and device because Google Play Publishing shows this Device is supported by my release apk.
Is there any chance that me using a leaked ICS build for the Bionic has anything to do with it? It would be very helpful if anyone with 4.0.4 or (Android device running any version of ICS) can try to download the app from Google Play and see if the App is incompatible with their device too or its just me. Other than that suggestions on a way to fix this would be tremendously helpful.
Thanks so much.
Update: I am using two SDKs with my App - Flurry SDK and Skyhook Wireless SDK jar files both of which are compatible with Android 4.0. Also I have added Android Support Library and compiled the codebase against Android 4.0.3 and the App still is incompatible with the device and build mentioned above running Android v 4.0.4
Problem Solved!
First of all there is nothing wrong in the Manifest or the version of Android SDK I compiled the code base against which is Android 4.1.
I could search for and install the App when I turned Copy Protection OFF from Google Play developer console and waited 30 minutes to 1 hour for the new copy protection setting to take effect. The key here is that after changing the Copy Protection settings you have to wait. This does not take effect immediately.
Previously Copy Protection was ON for Tooyoou and after I wrote to Android developer support I got the clue in their reply email as below.
If your app no longer appears in Google Play after enabling Copy Protection, please note that our copy protection relies on being able to trust the build of Android that the app is installed on. Therefore, we only show copy-protected apps to known good builds of Android. If a specific port of Android is not a known good build (e.g. some “Custom ROMs”) or the device is rooted, Google Play will not display copy-protected apps to these devices. If the users switch to an official version of Android, they'll be able to see your application again.
Since I am running a custom unreleased ROM on my DROID BIONIC this is what caused the issue. Stock ASOP ICS and Jelly Bean devices were able to download and install the app even when Copy Protection was ON. Copy Protection is a bit tricky for Paid App but since Tooyoou is free there is not much to care about.
Also note Copy Protection is supposedly being deprecated soon and Licensing feature in the Android SDK is the way to go for Paid App copy protection.
have you tried adding android:xlargeScreens="true" to support-screens?

Is it possible to upgrade Android firmware programatically?

I need to write Android application which looks for firmware in internet and allows to automatically download selected firmware and perform update on device. Is it possible?
Thanks
It should be possible. I am trying to do the same thing. I posted a question about this as another user. It almost works for me, but my device can't apply the new image on boot time.
Basically you use the RecoverySystem.installPackage(context, packageFile) method to do this. You will also need the following permissions:
<uses-permission android:name="android.permission.REBOOT" />
<uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />
<uses-permission android:name="android.permission.DELETE_CACHE_FILES" />
Also, your app must run as a system app. I don't know if you're using the whole Android SDK with Eclipse and the SDK tools, but what I did for that was basically connect my device to my machine and used it for debuggin, then ran the app through the IDE so it gets uploaded and run on the device. And finally use the adb shell command to open up a shell on my device and moved the apk package file from /data/app to /system/app and rebooted.
Check out my post here. It might help you out.
Android development RecoverySystem.installPackage() cannot write to /cache/recovery/command permission denied
You need root, and it won't be automatically applied, but like with cyanogen updater, it reboots to recovery where the user will apply the update by itself
It is possible. Take a look at Clockwork Mod - http://www.clockworkmod.com/rommanager
They have an app which will check for the latest version of the firmware and update it - available on Google Marketplace https://market.android.com/details?id=com.koushikdutta.rommanager&hl=en

Categories

Resources