Sencha Touch native optional features vs required permissions (camera on Nexus 7) - android

How can I use Sencha Cmd to package a Sencha Touch 2.2 application for Google Nexus 7, with front camera support?
I'm able to run the application and take pictures fine if I install it directly on the device. But using the App Store the application is not available for Nexus 7, since Google thinks that a back-camera is required for the application.
Looking at the uses features manifest I'm supposed to set required:false on the CAMERA feature, however the manifest file is generate by Cmd based on the packager.json.
Packager.json includes "permissions": ["CAMERA"] but I can't see any option to set it optional when packaging trough Sencha Cmd.
The Camera is used in the application, but it not a required part of the applications, so I want the application to become compatible (trough Google Play Store) with none-back-camera devices like the Nexus 7.
PhoneGap may solve this problem but is currently not an option, since I use other Cmd/Native features.

Sencha CMD uses a template file C:\Users\USERNAME\bin\Sencha\Cmd\3.1.1.274\stbuild\st-res\android\AndroidManifest.xml
The file is likely used in a string format function to make the final uncompiled manifest.
I found that (at least in the latest version) I could simply add the correct tags into the template file, and remove the config from the application packager.json file.
It's important to remove the Camera config from packager.json to prevent duplication's. Since the privilege config is removed from packager.json you have to add both the privilege and the feature tag manually to the Manifest template. In this example I've also added autofocus, but currently Google ads this feature automatically if you use the camera.
Remember to change the template when compiling different applications, if the other applications do not need the camera privilege, and also when Sencha Cmd is updated.
new lines:
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
complete AndroidManifext.xml after modification:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="%s" android:versionCode="%d" android:versionName="%s">
<uses-sdk android:minSdkVersion="%s" android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
%s
<application android:icon="#drawable/icon" android:label="%s">
<activity android:name=".STActivity"
%s
android:label="%s">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
%s
%s
</activity>
</application>
</manifest>

Related

Google Play - Can't install. Try again, and if it still doesn't work, see common ways to fix the problem

A large number of users are complaining that they receive the following error when trying to install the latest update of my application (see image below). I have been unable to replicate this issue myself. Have logged issue with Google, but they don't seem to know what is causing this either (asking for developer bug reports, but I feel uncomfortable walking users through how to do this). I've seen a few other posts about this topic, but no solutions. Any ideas on what could be the cause?
Things I have considered:
uses-permission - I haven't added any this release
uses-feature - I haven't added any this release
Package name has not been modified in this release
Min/target/compile sdk version - no changes made this release (min 24/target 30/compil 30)
Two changes I did make, but I don't suspect being an issue are:
I did change the android:label field in the application's manifest for <application>
I have added an exception to cleartextpermitted
Example error below:
And manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:sharedUserId="XXX..shared"
package="XXX">
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-feature
android:name="android.hardware.sensor.compass"
android:required="true" />
<!--<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />-->
<uses-feature
android:glEsVersion="0x00030002"
android:required="true" />
<queries>
<!-- Explicit apps you know in advance about: -->
<package android:name="XXX"/>
<package android:name="XXX2"/>
<package android:name="XXX3"/>
</queries>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name="XXX"
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="#mipmap/ic_launcher"
android:label="XXX"
android:usesCleartextTraffic="false"
android:theme="#style/AppTheme"
android:networkSecurityConfig="#xml/network_security_config">
<provider
android:authorities="XXX"
android:name="XXX.SharedPreferencesContentProvider"
android:exported="true"
android:protectionLevel="signature">
</provider>
<activity
android:name=".MainActivity"
android:label="XXX"
android:screenOrientation="fullSensor"
android:theme="#style/SplashTheme"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
</application>
</manifest>
EDIT:
Suspect that the following line in my manifest may be the culprit:
android:sharedUserId="XXX..shared"
Releasing new version, will keep you updated.
Issue was with the following line in the manifest:
android:sharedUserId="XXX..shared"
I added this since the previous release to experiment with my suite of apps communicating with one another, but had forgotten to remove this before my release. This sharedUserId is typically used to group apps that are signed with the same cert/developer so that they can share info with one another. However, the flag has now been deprecated, and if you need your apps to communicate with one another, there are far better ways to do this without breaking your app. Read more about sharedUserID here (but DON'T implement it, whatever you do!):
https://developer.android.com/guide/topics/manifest/manifest-element
App updates will fail for users if the sharedUserId is added or doesn't match the current installed version. Google play will just hang or show a generic error that isn't useful to your users, ending up with confusion and a bunch of 1 star reviews.
Warning: removing the sharedUserId can be just as problematic as adding it. Any users that downloaded the app after you added it (or reinstalled your app during this time) will now get the same error when trying to update to a version where you removed it. The only way for them to fix is to uninstall/reinstall the app again. Lucky for me, I worked out this root cause within a few days, so I only have to manage a few days worth of new users who will experience this issue now, but if this had gone on any longer, you could be looking at a large number of users with the update issue.

Why my SAP application for Android is being deleted after installation

I was playing lately with my Samsung Gear 2 (not S2) smartwatch and I have created a new watch-face for it. I would like to show a weather information on it and I have found that for that task I need to use Samsung Accessory Protocol (SAP).
I followed the Samsung tutorial to create a demo app to learn how to use SAP.
I had a problem with deploying Tizen app to my watch but I found out that the lowest currently (2017) available API is 2.3.1 where Gear 2 Smartwatch has 2.2.
After changing in the config.xml the
<tizen:application id="XQKp7NYwyM.SimpleSAPConsumer" package="XQKp7NYwyM" required_version="2.3.1"/>
to
<tizen:application id="XQKp7NYwyM.SimpleSAPConsumer" package="XQKp7NYwyM" required_version="2.2"/>
my application was deployed.
I created a certificate to build a signed wgt package.
I also created an android provider application according to the tutorial.
Added new certificate and created a signed apk.
I copied the apk to the Samsung Galaxy S3 phone and tried to install it.
Installation ended without any problem.
However, after some seconds or when I try to initialize the communication from the watch I get the "Unknown sources" information from Gear Manager and my app is being deleted.
I already checked "Allow unknown sources" in the android, Gear Manager and allowed USB debugging on the smartwatch (because this is my first question here I am not allowed to post more than 2 links, so I had to give one link with all screenshots there, sorry).
Why my application is being deleted and what should I do to have it working correctly.
Tizen App - Consumer
Build using Tizen Studio 1.1.0.
config.xml
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/SimpleSAPConsumer" version="1.0.0" viewmodes="maximized">
<tizen:application id="XQKp7NYwyM.SimpleSAPConsumer" package="XQKp7NYwyM" required_version="2.2"/>
<content src="index.html"/>
<feature name="http://tizen.org/feature/screen.size.all"/>
<icon src="icon.png"/>
<tizen:metadata key="AccessoryServiceLocation" value="res/xml/accessoryservices.xml"/>
<name>SimpleSAPConsumer</name>
<tizen:privilege name="http://developer.samsung.com/privilege/accessoryprotocol"/>
<tizen:profile name="wearable"/>
</widget>
accessoryservices.xml
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<application name="HelloAccessoryConsumers">
<serviceProfile role="consumer" name="sapsample" version="1.0" id="/sample/hello">
<supportedTransports>
<transport type="TRANSPORT_BT"/>
<transport type="TRANSPORT_WIFI"/>
</supportedTransports>
<serviceChannel id="123" reliability="enable" priority="low" dataRate="low"> </serviceChannel>
</serviceProfile>
</application>
</resources>
I can provide rest of the Tizen code (main.js, index.html) if it is needed. Right now I do not think that this has any value to the problem I am facing.
Android App - Provider
Build using Android Studio 2.2.3
Structure:
app
->assets
-->SimpleSapConsumer.wgt
->libs
-->accessory-v2.5.0.jar
-->sdk-1.0.0.jar
->src
-->main
--->java
---->com.sap.baks.sapapp.service
----->SapServiceProvider.java
--->res
---->xml
----->sapservice.xml
---->AndroidManifest.xml
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sap.baks.sapapp">
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="25" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="com.samsung.accessory.permission.ACCESSORY_FRAMEWORK"/>
<uses-permission android:name="com.samsung.wmanager.APP"/>
<uses-permission android:name="com.samsung.wmanager.ENABLE_NOTIFICATION"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<service android:name=".service.SAPServiceProvider">
</service>
<receiver android:name="com.samsung.android.sdk.accessory.RegisterUponInstallReceiver" >
<intent-filter>
<action android:name="com.samsung.accessory.action.REGISTER_AGENT" />
</intent-filter>
</receiver>
<receiver android:name="com.samsung.android.sdk.accessory.ServiceConnectionIndicationBroadcastReceiver" >
<intent-filter>
<action android:name="com.samsung.accessory.action.SERVICE_CONNECTION_REQUESTED" />
</intent-filter>
</receiver>
<meta-data
android:name="AccessoryServicesLocation"
android:value="/res/xml/sapservices.xml" />
<meta-data
android:name="GearAppType"
android:value="wgt" />
</application>
</manifest>
sapservice.xml
<resources>
<application name="SAPapp">
<serviceProfile
id="/system/sapsample"
name="sapsample"
role="provider"
serviceImpl="com.sap.baks.sapapp.service.SAPServiceProvider"
version="1.0"
serviceLimit="ANY"
serviceTimeout="10">
<supportedTransports>
<transport type="TRANSPORT_BT"/>
<transport type="TRANSPORT_WIFI" />
</supportedTransports>
<serviceChannel
id="123"
dataRate="low"
priority="low"
reliability="enable"/>
</serviceProfile>
</application>
</resources>
sapserviceprovider.java
I put it together with screenshots because it is quite long.
******** EDIT **********
After trying to install sample applications as #Iqbal advised I had the following results:
Tizen
I was not able to install application on my watch until I changed the API to 2.2. If the API was greater I have seen the following error:
[Initializing the launch environment...]
RDS: On
Target information: SM-R380
Application information: Id(VbsgE6bms2.HelloAccessoryConsumer), Package Name(VbsgE6bms2), Project Name(HelloAccessoryConsumer)
[Transferring the package...]
Transferred the package: wgt stream -> /opt/usr/apps/tmp/HelloAccessoryConsumer.wgt
[Installing the package...]
path is /opt/usr/apps/tmp/HelloAccessoryConsumer.wgt
start process (install)
....
error : 61
end process (fail)
processing result : FATAL_ERROR [61] failed
spend time for pkgcmd is [1537]ms
cmd_ret:61
An exception occurred
(Installing the package... > Fail)
An exception occurred
Unexpected stop progress...
(8.239 sec)
Summary: I have installed the application with API 2.2 and no other changes done.
Android
Using the sample application without changing anything I was able to run it and connect with the smartwatch! Yupi :) !
But I needed to know why the code I used for the first time was wrong, even if I've got it from Samsung tutorial and website.
I have found that the application is being uninstalled only if I have these lines in AndroidManifest.xml
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="com.samsung.accessory.permission.ACCESSORY_FRAMEWORK"/>
<uses-permission android:name="com.samsung.wmanager.APP"/>
<uses-permission android:name="com.samsung.wmanager.ENABLE_NOTIFICATION"/>
If I replaced the lines above with the lines below
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="com.samsung.accessory.permission.ACCESSORY_FRAMEWORK" />
<uses-permission android:name="com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY" />
<uses-permission android:name="com.samsung.WATCH_APP_TYPE.Companion" />
<uses-permission android:name="com.samsung.wmanager.ENABLE_NOTIFICATION" />
everything was OK.
Can someone explain me why it is so?
******** EDIT 2 **********
For those who will search for the answer to the question from previous edit.
I have found it here
Long story short:
<uses-permission android:name="com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY" />
is the line that has to present - otherwise the app will be deleted from an android device. I have not found this in any documentation to be honest.
Moreover,
<uses-permission android:name="com.samsung.WATCH_APP_TYPE.Companion" />
defines that the smartwatch application will be installed separetly from an android application.
After changing Companion to Integrated one tells that a smartwatch application is intergrated and will be installed with an android provider app.
Follow
Programming guide .
API Reference.
Download the sample app from SAMPLE section and make sure that this sample app is running on your Gear 2 and Android.

Android app cannot be downloaded from play store onto tablets

I have an alpha prototype of my app up on the Play Store. For some reason, users with tablets cannot download the app – they get the message "Your device isn't compatible with this version." I haven't had a chance to test multiple tablets, but I know this is a definitely an issue with the Nexus 7.
If I look up the device compatible through the developer's console, I see that tablets such as the Nexus 7 are listed as compatible (and no devices are listed as excluded).
I have also ensured that the tablets that cannot download the app have the latest operating system and thus should not be incompatible because of OS incompatibility.
Does anyone know what might be the issue preventing tablets from downloading my app?
I've included my manifest in case that's helpful.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.activities"
android:installLocation="auto"
android:versionCode="1"
android:versionName="1.0"
android:windowSoftInputMode="adjustPan" >
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CACHE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/test_logo"
android:label="#string/app_name"
android:theme="#style/SampleTheme.Light" >
<activity
android:name="com.test.activities.LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
...
</application>
</manifest>
As a side question, I'm interested in learning how to see whether a device is compatible with your app before you upload a new APK to the play store. I never had an issue testing the app directly on the device, so I was surprised to find it is listed as incompatible on the play store.
I think that it's because of <uses-feature android:name="android.hardware.camera.autofocus" /> (assuming that Nexus 7 doesn't have autofocus). You can add the android:required="false" so the app will be available to devices that don't have autofocus too.
Does anyone know what might be the issue preventing tablets from downloading my app?
RECORD_AUDIO requires that the device have a microphone, and not all tablets will have a microphone.
Also, please remove <uses-permission android:name="android.permission.CACHE" />, since there is no such permission in Android.
As described in the official Tablet App Quality guide:
In your app manifest, locate any <uses-feature> elements. In particular, look for hardware features that might not be available on some tablets, such as:
android.hardware.telephony
android.hardware.camera (refers to back camera), or
android.hardware.camera.front
So, you have to replace these 2 lines:
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
by this one:
<uses-feature android:name="android.hardware.camera" android:required="false" />
& of course handle the case when the Camera feature doesn't exist in the device by this check:
if (Camera.getNumberOfCameras() > 0){
// device has camera, it is safe to use it here
}
I don't know the exact answer to this, but I do know that Play determines the list of supported devices by THESE numbers:
android:minSdkVersion="11"
android:targetSdkVersion="19"
They should literally be as low as possible in order for your code to work. The lower the number, the longer the compatibility list.
After that, the list of required permissions make a big difference. Because some devices don't have those features that are required. So you have to crossreference that list as well.

Google MapFragment is blank (white) with Could not find class 'maps.j.k'

I'm trying to build the official android google map api v2 sample on a (gingerbread 2.3.5) phone .
I added android-support-v4.jar to official sample project.
I took the sample from the official tutorial in <android-sdk>/extras/google-play-services/samples/maps
I copied the sample app in Eclipse, reference the google-play-services_lib project as an Android library, and build the whole thing with the Android SDK 4.1.2 (api 16).
Unfortunately, ahen I launch the app the map is blank and I don't have any exception or message.
The only thing I got are those suspicious lines in the logcat :
Unable to resolve superclass of Lmaps/a/du; (411)
Link of class 'Lmaps/a/du;' failed
Unable to resolve superclass of Lmaps/a/ej; (2363)
Link of class 'Lmaps/a/ej;' failed
Unable to resolve superclass of Lmaps/j/k; (2379)
Link of class 'Lmaps/j/k;' failed
ERR Could not find class 'maps.j.k', referenced from method maps.y.ae.a
VFY: unable to resolve new-instance 3571 (Lmaps/j/k;) in Lmaps/y/ae;
I suspect that my project structure in eclipse 3.8 is somewhat messed up.
I tried the following things (even the most idiotic) to no avail.
1. Invalid api key ?
I generated a "debug.keystore" with keytool and updated the eclipse preference (Android/Build/Keystore).
Of course, I registered that new keystore/SHA1 and get a new api key that I used in the AndroidManifest file
2. Wrong project target ?
I tried to build my two projects with the following targets :
Android 4.2.1
Google Api 4.2.1
3. adding google-play-services_lib as a project dependency
I tried to add google-play-services_lib as a project dependency on top of being added as an android library in the demo build path.
And tick the matching export checkbox.
4. test google maps api v2 on the phone
I downloaded trulia real estate app that is said to use the v2 api on the phone to be sure that the phone is compatible with the new api
Here is the manifest for the sample app
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mapdemo"
android:versionCode="1"
android:versionName="1.0" >
<permission
android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE" />
<!-- Copied from Google Maps Library/AndroidManifest.xml. -->
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!-- External storage for caching. -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- My Location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Maps API needs OpenGL ES 2.0. -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<!-- End of copy. -->
<application
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/demo_title" >
<!-- You must insert your own Google Maps for Android API v2 key in here. -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="XXXXXXXX" />
<activity android:name=".MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".BasicMapActivity"
android:label="#string/basic_map" />
<activity
android:name=".CameraDemoActivity"
android:label="#string/camera_demo" />
<activity
android:name=".EventsDemoActivity"
android:label="#string/events_demo" />
<activity
android:name=".GroundOverlayDemoActivity"
android:label="#string/groundoverlay_demo" />
<activity
android:name=".LayersDemoActivity"
android:label="#string/layers_demo" />
<activity
android:name=".LocationSourceDemoActivity"
android:label="#string/locationsource_demo" />
<activity
android:name=".MarkerDemoActivity"
android:label="#string/marker_demo" />
<activity
android:name=".OptionsDemoActivity"
android:label="#string/options_demo" />
<activity
android:name=".PolygonDemoActivity"
android:label="#string/polygon_demo" />
<activity
android:name=".PolylineDemoActivity"
android:label="#string/polyline_demo" />
<activity
android:name=".ProgrammaticDemoActivity"
android:label="#string/programmatic_demo" />
<activity
android:name=".TileOverlayDemoActivity"
android:label="#string/tile_overlay_demo" />
<activity
android:name=".UiSettingsDemoActivity"
android:label="#string/uisettings_demo" />
<activity
android:name=".RawMapViewDemoActivity"
android:label="#string/raw_mapview_demo" />
<activity
android:name=".RetainMapActivity"
android:label="#string/retain_map" />
<activity
android:name=".MultiMapDemoActivity"
android:label="#string/multi_map_demo" />
</application>
</manifest>
Here are some screenshots of my project structure/build path.
I think maybe you make something wrong when you apply the api KEY.
I have the same problem, and at last I found that I turn on the incorrect service. at https://code.google.com/apis/console/,
There are Google Maps API v2 and Google Maps Android API v2.
You should use Google Maps Android API v2.
I had exactly the same problem (all configurations the same, maps.j.k stuff in the logcat). However, for me choosing Google APIs as build target solved it. But that was Google APIs 4.2, so I suggest that you install the update and try with the more recent target.
I resolved this issue by changing de targetSdkVersion with de last targetSdkVersion avaiable, at the AndroiMainfest.xml file.
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
Are you using ProGuard? Usually class names like "a", "b", etc. are a result of ProGuard obfuscating class names, and maybe the Maps API breaks when that happens. If that's the case, you will either have to disable ProGuard or add some -keep lines to your proguard.cfg file. This post shows what those lines might look like.
In my case it was due to 2 issues
on my phone the latest Google Maps app was not installed (in fact there was no google maps at all)
I didnt have all the required permissions set in my manifest
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
As documented in https://developers.google.com/maps/documentation/android/start#installing_the_google_maps_android_v2_api
http://developer.android.com/sdk/index.html --this is the link for the adt bundle in android..try downloading this and start over again..maybe there's a problem with your ADT.
Check the console API you've enabled Google Maps Android API v2
I was dealing with same issue. I tried to implement the com.example.mapdemo and had a heck of a time.
I copied the code of the BasicMapActivity to a clean new project and made the Libraries look as above.
Basically, I couldn't get either to work. I got the "Authorization failure" error in the debugger.
Then, today, I prepared new keys specifically for each project with the specific com.example.xxx after the semicolon when preparing the key in the Google Console.
I did Project->Clean at every step.
I ran it in debugger first, then just Run. And, if I remember, a few times after making the change to the manifest.
Then, finally, they worked. It seemed, in the end, to require a key for each specific project.
Here's what worked for me. When you use the Google APIs Console to create your API key, be sure to append ;com.example.mapdemo to the SHA1 fingerprint. (I was using something else more appropriate for another app I'm currently developing.) What clued me in on this solution was an authorization error in the LogCat.
In my case I added LocationSource Interface so I can get location data but i forgot to add :
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
at Manifest file.
Don't forget to use separate keys for debug and release version of the app!
If you have already tried everything, try to uninstall and reinstall again your app: on my phone (S3 mini), after the first launch with the wrong key, I corrected it, but it didn't work until a complete uninstallation.
Maybe some sort of caching is used.

App is incompatible with all devices after publishing to the Market but same was working when moved directly to the device

I have developed an app using PhoneGap and tested the same in different version of emulator and also in my Motorola Photon. I have not faced any problem in testing.
But when I published the same in the market it says "This app is incompatible with all of your devices.". My devices are with different screen size, different OS version ranging from 2.1 to 2.4.
In publish home page, it says "This application is available to over 679 devices." It includes Motorola Photon 4g and all other devices which I have registered in the market download.
I have republished the code many times by updating manifest file and java file based on all the answers given through out the stackoverflow for this kind of issues. To list it,
Removing user-permission
Updating all combinations of supports-screens
Refreshing the save button in the publish page several times
Uninstalling the apps in my mobile (But I have few more devices where I have not tested my apps but still says incompatible)
Running aapt tool
Removing the jar files from lib folder and referring that externally in Eclipse
Few more changes that I cant recall
below is the manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.myapps"
android:versionCode="5" android:versionName="1.4">
<uses-sdk android:minSdkVersion="7" />
<supports-screens android:largeScreens="true"
android:normalScreens="true" android:smallScreens="true"
android:resizeable="true" android:anyDensity="true" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.SEND_SMS"/>
<application android:icon="#drawable/app_icon" android:label="#string/app_name">
<activity android:name="com.test.myapps.HomePage" 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="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">
</activity>
</application>
</manifest>
Please, help me in fixing the same. Thanks in advance....
Did you specifically run "aapt dump badging <.apkfile> ?
Android docs here.
I had a similar problem. Turns out I needed to use in my manifest the
android:required="false" for several uses-features, like:
< uses-feature android:name="android.hardware.telephony" android:required="false" >
Full manifest example here. The results of dump badging showed that the market had added several uses-features (a bit
further down in aapt output) that excluded mostly Samsung devices.
Check if there is any compatibility, you need to start with :
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">
Are you sure that you were checking the latest version of APK , not the old one. you will need to activate it. not only upload it ..

Categories

Resources