satisfying app dependency on Google Maps api - android

I'm developing an app that uses the Google Maps api to give you a list of a given business type at runtime based on your current location.
I developed this on Eclipse using my LG Ally running Android 2.2.2 as a test device.
The QA team is not local to me so I emailed them the same apk file I installed on my phone.
Here's where it gets strange.
One tester, was able to install the app and run it with no problems. That person is using a phone running Android 2.2.2 - just like I am, although I am unsure if their phone is an LG Ally.
The other person is using a phone running 2.3.3 and they are unable to run the app. They've installed an app that emails me the logcat output and the only message that looks even vaguely related is:
06-21 14:22:57.147 W/PackageInstaller( 8784): Parse error when parsing manifest. Discontinuing installation
I've read on Stackoverflow that the manifest must contain info about the sdk. My Android Manifest contains:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15"/>
I've also read on Stackoverflow that some people have problems installing apps emailed to them and suggested something like DropBox.
I've done both (included the above sdk line in my Manifest and delivered the app via DropBox) and they are still unable to run the app.
Which got me wondering about the Google Maps dependency. I'm not delivering the maps.jar file in my apk. Is there a way I can check that the maps.jar is available on the device where my app is running? Is there a way I can deliver the maps.jar file? What do I do if maps.jar is already present?

Is there a way I can check that the maps.jar is available on the device where my app is running?
If you have <uses-library> with the android:required="false" attribute, then your app can run even if the device lacks the Google Maps add-on for Android. You would use Class.forName() to see if MapActivity exists before trying to actually use a MapActivity, as in this sample project.
However, if your <uses-library> lacks an android:required attribute, or has it set to true, then the app simply cannot be installed on the device.
Is there a way I can deliver the maps.jar file?
Only in the form of buying the user another device -- one that has the Google Maps add-on -- and shipping it to them. Either the device has it (as do most devices that legitimately have the Play Store) or it doesn't (e.g., Kindle Fire). You cannot change that fact.

Related

You can't rollout this release because it doesn't allow any existing users to upgrade to the newly added APKs

I am new to android development. recently i have uploaded my app to playstore and couldnt download it from there because i faced this issue "your device isnt compatible with this version". on further analysis I could found out that I have used feature "android.hardware.type.watch" along with android.hardware.faketouch, android.hardware.telephony. which is why i could see only watch devices in supported devices list on console (this was mistakenly ignored during rollout).
now to correct this mistake, I have removed watch feature, built apk with incremented version code. I need to replace live app on playstore with newly built apk. I have used 2 methods ( creating release in production and creating beta release )but everytime I am facing below issue "You can't rollout this release because it doesn't allow any existing users to upgrade to the newly added APKs.
i tried many time by increasing version code from 3 to 40 but same error is occur please help me
In my case, it happened because I accidently added android wear support.
Removing the following line in the manifest solved my problem
<uses-feature android:name="android.hardware.type.watch" />
Lets go in detail, Firstly as new developer i confused between Empty
Activity and Blank Activity in android while creating Activity.
Well
in my case i choose blank activity instead empty activity, then in
blank activity i get some watch and wear dependency in gradle file as
implementation 'androidx.wear:wear:1.0.0' and in manifest file
<meta-dataandroid:name="com.google.android.wearable.standalon android:value="true"/>
<uses-feature android:name="android.hardware.type.watch" />
If you publish this apk file or app bundle then you will get error as
Your device is not compatible with this version
Then i read it some where..
Your android project you have 2 apps:
1.Mobile 2.Wearable
Mobile app should be installed on mobile device (phone/tablet) and Wearable app should be installed on Android Wear device.
This message No, missing feature: WATCH means that you're trying to install Wearable app on mobile phone - you shouldn't do that, your mobile device is not a WATCH. So once again: just launch Mobile app on mobile and Wearable app on Android Wear.
After this i remove the line from manifest
<uses-feature android:name="android.hardware.type.watch" />
And upload again to the google play console then i got new error as
You can't rollout this release because it doesn't allow any existing users to upgrade to the newly added APKs
if i add this line again in manifest file then this error is gone and old error is come
Your device is not compatible with this version
Solution:
Create new application in google play console with different package name and make your change your package name in gradle file and all over.
and remove all dependencies related to watch n wear and remove line from manifest file
<meta-dataandroid:name="com.google.android.wearable.standalon android:value="true"/
<uses-feature android:name="android.hardware.type.watch" />
And publish again and check compatible device that your app is support before rollout , after publish you will get mail from google as report of tested application.

Can't install my app on wear

I tried to add a wear module to my existing app, tried a lot of solutions, but can't figure out why my app is not being installed on my watch.
What I tried :
First, Manual packaging with my app : https://developer.android.com/training/wearables/apps/packaging.html
But I quickly decided not to go through this.
Then I decided to go to gradle include, so to the build.gradle of app, I added the following to the end of dependencies :
debugWearApp project(path:':wear', configuration: 'flavor1Debug')
releaseWearApp project(path:':wear', configuration: 'flavor1Release')
To the build.gradle of wear, I added the following to the beginning of dependencies :
wearApp project(':wear')
Then, in android{} section of wear build.gradle, just after buildToolsVersion, I added the following :
publishNonDefault true
What I have seen :
No problem to install the wear app to the wear using bluetooth debug of the wear
Then, when I install a generate a release version of my app, I can see in raw, that it has been added a file android_wear_micro_apk.apk to res/raw which is my watch app.
I also saw a file android_wear_micro_apk.xml in res/xml with, from what I guess between hexa codes, the description of wear app.
Then I compare signatures :
keytool -list -printcert -jarfile mobile_app.apk
keytool -list -printcert -jarfile wear_app.apk
Using the wear app generated in res/raw. They exactly have the same signature. Then I compared :
aapt dump badging mobile_app.apk
aapt dump badging wear_app.apk
They have exact same package names and version codes and names.
So, from that :
Apk of wear is correctly added
Apk of wear is working if installed on the wear using adb and bluetooth debug
Both apk have same version code, version name, and package name
Wear is not requiring any permission
Phone is requesting following permissions
android.permission.ACCESS_NETWORK_STATE
android.permission.INTERNET
com.android.vending.BILLING
com.google.android.c2dm.permission.RECEIVE
android.permission.VIBRATE
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.BLUETOOTH
android.permission.BLUETOOTH_ADMIN
com.samsung.accessory.permission.ACCESSORY_FRAMEWORK
com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY
com.samsung.WATCH_APP_TYPE.Companion
com.samsung.wmanager.ENABLE_NOTIFICATION
I'm really wondering what I could have forgotten.
Thanks for any help
According to one of Google’s Android Developer Advocates, Android Wear 2.0 will require completely standalone watch and phone apps, and abandons the system used since the first version of Android Wear that automatically installs Android Wear apps based on the apps you have on your phone.
He puts it plainly in reply to another developer in the Android Wear Developers Google+ community (emphasis ours):
A Wear 2.0 user must visit the Play Store on their watch to install
apps. There is no auto-install like on Wear 1.X. Wear 2.0 apps get
full network access and can be installed completely separately from
the handheld app so the focus is much more on standalone Wear apps
than the handheld centric 1.X Wear apps.
But what about apps built solely for your watch? Well, there's a whole
store worth of apps that go beyond simple notifications and live on
the watch itself. Rather oddly, these still have to be installed
through your smartphone. For now, at least - the new Android Wear 2.0
update will include functionality for standalone apps.
Forum
On the watch:
Settings, Un-pair with phone. (Old release of AW may say Factory
reset.)
Do not set up the watch yet.
On the phone:
In Android Wear use the Disconnect... option.
In Android Wear, use Settings, Device settings and touch the watch
name, Touch FORGET WATCH.
Settings, Bluetooth. If you still see the watch, touch Forget... the
watch so it no longer appears in the list of paired devices.
Settings, Device, Apps, select Google Play Services. Clear cache and
Clear data. Uninstall updates.
Settings, Device, Apps, select Google App. Clear cache and Clear
data. Also Uninstall updates.
Settings, Device, Apps, select Android Wear. Clear cache and Clear
data. Also Uninstall updates.
Play Store, Apps, My apps, touch the Update all button.
You may want to check permissions declared in your app. As mentioned in Requesting Permissions on Android Wear regarding mismatching permission models between wearable and handset app,
If your handset app begins using the Android 6.0 (API level 23) model but your wearable app does not, the system downloads the Wear app, but does not install it. The first time the user launches the app, the system prompts them to grant all pending permissions. Once they do so, it installs the app. If your app, for example a watch face, does not have a launcher, the system displays a stream notification asking the user to grant the permissions the app needs.
The suggested solutions in these SO posts might also help:
Android Wear App not installed
Android Wear app not installing through handset

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.

Application not Installed error when referencing Mono.Android.GoogleMaps

I am working on a new update to my app and added google maps support. I added a reference to the Mono.Android.GoogleMaps assembly. All works great, tested good on my Droid X device so I sent the .apk to beta testers. I then tried to install on my Kindle Fire (allowed unknown sources) and it failed to install. I also got a report from a beta tester that they got the same message on their Motorola Photon.
I've later learned Kindle Fire and NOOK don't have the Google Maps integration. I've already built around "location" permissions although not sure if that was required.
I just fired up a AVD for Kindle Fire per the Amazon info and tried deploying a debug build. I got this error message:
How do you suggest I proceed? If this issue IS google maps being referenced, how do you handle this so my app will run on devices without this shared library present? What do I test for in code as to when to allow features such as this?
Thanks.
I researched the issue and added this line to my AssemblyInfo.cs and now it installs to Kindle Fire.
[assembly: UsesLibrary(Name="com.google.android.maps", Required=false)]

Google map INSTALL_FAILED_MISSING_SHARED_LIBRARY

I gets error :Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
when I want to install my code to my moto xt316 Phone.
and I have try:
set the target Google apis 2.3 or 2.2
and my code install and run ok in others phone (defy,g6)
if I remove
It can install in the moto xt316, but as we know , it can not use mapView if I remove it.
And the xt316 has not installed google map.
Can I try to install to xt316 with
but not get Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY.
Because I want my code can install in all Phone!
And the xt316 has not installed google map.
Then you cannot use an application that requires the Google Maps add-on for Android.
Because I want my code can install in all Phone!
Then you cannot require the Google Maps add-on for Android.
What you can do is make the Google Maps add-on for Android optional, by adding android:required="false" to the <uses-library> element in your manifest. Then, at runtime, you can use Class.forName() to see if MapActivity is available, and set up your UI from there. Here is a sample project that demonstrates this.
Using latest version of Rhomobile 3.3.3+ and started seeing this error? Go to your build.yml and look for the "non motorola device" option and try checking that off and then rebuilding your app.

Categories

Resources