Android Watch Face, "not compatible with this device". I'm missing something - android

Ok, I recently started dabbling in Android development, and made a simple watch face. I don't own an Android watch (or any other Android device), so I'm using the emulator.
Well, the watch face works great through the emulator. So I put it up on Google Play, and asked a couple of friends to "beta" test it for me.
Unfortunately, none of them could get it working on their watches. They reported to me that they got the "not compatible" message, and therefore couldn't install the watch face.
I developed it under API 21 (Lollipop), using Android Studio. That could be one issue.
To be clear: When I set up the project, I only did it as a "wear" app, not as one you put on your phone, too. Perhaps that is another mistake on my part.
I've done a good bit of searching, and can't really find anything about what I need to do in my code to fix this, and I'm not really sure how to re-compile under a different SDK if that's what I need to do.
Any ideas on this?
EDIT:
Per request, here is the manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-feature android:name="android.hardware.type.watch" />
<!-- Required to act as a custom watch face. -->
<uses-permission android:name="com.google.android.permission.PROVIDE_BACKGROUND" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.DeviceDefault" >
<service
android:name=".MorseWatchFace"
android:label="#string/my_digital_name"
android:permission="android.permission.BIND_WALLPAPER" >
<meta-data
android:name="android.service.wallpaper"
android:resource="#xml/watch_face" />
<meta-data
android:name="com.google.android.wearable.watchface.preview"
android:resource="#drawable/preview_digital" />
<meta-data
android:name="com.google.android.wearable.watchface.preview_circular"
android:resource="#drawable/preview_digital_circular" />
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
</intent-filter>
</service>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>

If your users are installing your apk from their phones (which they are, if they're using Google Play store on their phone), you must be uploading a phone APK.
Your wearable APK would only support roughly 19 devices, that makes sense -- that's about how many devices there are matching the criteria. Google Play will provide the APK to devices that have the same features defined (see https://developer.android.com/google/play/publishing/multiple-apks.html). So if you defined the wearable feature, it'll only target watches.
I recommend creating a new phone module. All it really needs is a basic manifest (just an <application> block) and a gradle dependency on your wearable module (e.g. add the line wearApp project(':your-wearable-module') to your phone module gradle file's dependencies block). Then just publish that module to Google Play. This phone apk will essentially just host your wearable apk inside of it, to allow it to be installed on phones.

Related

Play Store having new version of the app, but not showing update

I have my app installed in my cell with version 1.0.5 ( Version code 9)
In Google Play Store, I can see my app with version 1.0.7 ( Version code 11 ), but it doesn't show me the button update ( it is showing me the button "Open")
Is it something I have to include in my app???
Is it a bug in Play Store???
Is it a configuration problem???
I join my AndroidManifest.xml
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="20" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.spg.googlemaps.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<!--
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
-->
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-feature
android:name="android.hardware.camera.front"
android:required="false" />
<permission
android:name="com.spg.googlemaps.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:name="com.myapp.MyApplication"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:logo="#drawable/ic_logo"
android:theme="#style/Theme.AppCompat" >
<uses-library android:name="com.google.android.maps" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="com.myapp.SplashScreen"
android:label="#string/app_name"
android:noHistory="true"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.myapp.LoginActivity"
android:label="#string/title_activity_login"
android:noHistory="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize|stateVisible" >
</activity>
<activity
android:name="com.myapp.DashBoard"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.myapp.FragmentTabsPdv"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.myapp.DashBoard" />
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/maps_key" />
<activity
android:name="com.myapp.RutaActivity"
android:label="#string/title_activity_ruta"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.myapp.FragmentTabsPdv" />
</activity>
<activity
android:name="com.myapp.BaseActivity"
android:label="#string/title_activity_base"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.myapp.SettingsActivity"
android:label="#string/title_activity_settings"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.myapp.DashBoard" />
</activity>
<activity
android:name="com.myapp.InformacionPdvActivity"
android:label="#string/infoPdv"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.myapp.RutaActivity" />
</activity>
<receiver android:name="com.myapp.BaseActivity$NetworkChangeReceiver" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<activity
android:name="com.myapp.MetricaTabs"
android:label="#string/title_activity_metrica_tabs"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.myapp.RutaActivity" />
</activity>
<meta-data
android:name="com.crashlytics.ApiKey"
android:value="7d80161d908dd5424f232598dba254c7d2a43307" />
<activity
android:name="com.myapp.SendMessageActivity"
android:label="#string/title_activity_send_message" >
</activity>
</application>
Make sure the app you have installed in your mobile is not an apk built with debug keystore. The play store will show always as "Open" button instead of "Update" if the play store app certificate doesn't match with the installed app certificate.
I realized this when I did trial and error with debug and signed apk's only signed apk worked. And always use versionCode for comparing versions instead of versionName.
It also helps to clear the cache of the Play Store APP in settings. This should not be necessary. The problem is that this blocks an update to the correct version later. Only the version number is updated but not the binary. Google Play then thinks that everything is ok, but it still uses the old APK.
hope this helps someone since I have benefitted a lot from this community.
If your last installed version is from Android studio, you won't see the 'Update' button in play store. You will see the 'Open' button instead. I have tested this with my development phone in which the app was installed directly using Android studio and also with some of my actual users. My users installed the last version from play store. When I pushed a new update, they see the 'Update' button in play store.
I solve this once my app update button was not showing because i did't installed it directly from play store .
Now the solution is download old version of your app from play store and then upload new version of app after publishing of app update button will show.
Before You Jump into messier solutions try clearing the cache of Play Store and look at your app's play store listing.
In my case it worked.
You must be sure the android:versionCode (not the app version), is greater than the previous one.
Google won't warn you if it's lower and will let you publish a lower version number.
Example:
If your previous versionCode was 132 you have to make sure the one you publish is greater than 132.
If you have just released your Beta or Production version then you have to wait for at least two hours before you can check your latest version on the store.
Once it's approved, you'll surely see the Update button.
====================================
What to do, if Application is approved now but test device still don't show Update button?
It indicates that Google Play Store app has cache the page, try by kill/close the Google Play Store app and reopen
AND also try by clear the cache.
After updating and release new version on playstore , make sure that you also press Update Roll out button, actually by default, playstore roll out app to only 50% of your users.
Update rollout button is available on playstore dashboard as well below your manage release
Second in build.gradle file, make sure to increment versionCode and versionName.
I've just found out Google Play is not showing updates for my app to devices with Android version 11, because my app's current version is targeting Android version 10.
In more technical terms, the latest version (of my app) I've uploaded and published at Google Play targets Android API Level 29, which maps to devices up to Android version 10.
According to Google I must change my app Android.manifest file to target Android API Level 30, so that it will then be compatible with Android version 11.
After I do this, my users with Android 11 shall start seeing updates for my app on Google Play store.
This can of course be generalized to a single sentence: "An app's updates are only shown in Google Play for devices whose Android version and Android Level API are compatible with the targeted Android Level API defined in the app's Android.manifest file."
Here are the official links:
https://developer.android.com/distribute/play-policies#APILevel30
https://developer.android.com/distribute/best-practices/develop/target-sdk#pre11
There are a couple of possibilities. First, clear google plays cache on your device to make sure it's not cached. If you still seeing open Take the following steps to find the problem. You need the apk file on google store to compare with your version. You can use online services that give you apk from google play. Now there are two things we need to check.
Certificates: The apk you downloaded from google play should have same certificate as the apk(or aab) you uploaded. To check this you can use keytool on your apks:
keytool -list -printcert -jarfile yourApp.apk
Version codes: To check version codes use analyze tool on android studio. Sure the version on google play should have the bigger number.
So first of all you have to make sure the following three points are in place:
You are installing exactly the same variant from android studio compared to the one you published on google play store.
The app you installed from android studio has a lower "version code"
You are using exactly the same signing key.
Most likely the third point is what is stopping this from working. The problem is that if you are using app bundle as publishing format, that apk is not created yet when you upload the bundle and it will only be create and SIGNED at a later the stage, when the app is about to be distributed on a specific device.
Unfortunately, there is a chance, like in my case, that the signature still will not match perfectly even if you used exactly the same key to sign the app, reason being that if you have singed up for Google Play Store signing, google will add some metadata: "It does however insert a minuscule amount of metadata that helps with verifying the source and integrity of the distribution. This metadata comes in two flavors: For all apps uploaded to Google Play, Play has been adding security metadata after the signing block to enable features such as authorized P2P app sharing. We announced this originally in a blog post in 2017. For apps uploaded as app bundles, we will improve this security by introducing what is called a source stamp. This source metadata is inserted into the app’s manifest by bundletool. When the APK is generated on Play’s server, it’s also signed with a Google key in addition to your app signing key."
You can compare that the two certificates are identical running:
keytool -list -printcert -jarfile yourapk.apk
You should run the above on your local apk and on the google play apk
According to some user tho, there is a fourth point that needs to be satisfied:
The app needs to be installed at least once from google play store, before the update button will show.
I yet haven't been able to make the upload button show for my app
The update is published in stages, each stage is 20%, you have to wait for a 100% update to be published.
I found a workaround by opening a chrome browser on the same device, and searching google for the app. You will be able to select to install the app from the results, and will show Update.

Unable to get location using google play services while testing on emulator

After much looking around SO and other places and not being able to fix my problem I will now create a new post in the hopes of getting my problem resolved.
I am putting together a test app to obtain a location using Google play services and seem to have everything in place - including the permissions. When the test app is run via the emulator,, an error stating that the client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permissions. Below is a piece of the stack trace.
11-19 16:34:40.403: E/AndroidRuntime(1245): Caused by: java.lang.SecurityException: Client must
have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to perform any location
operations.
And here is part of AndroidManifest.xml
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.ACCESS_COURSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
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>
What else? I am using the Google APIs platform 5, api 21 for my build target and have the google-play-services... library added to the project. I have also set-up mock latitude and longitude values on the DDMS' Emulator Control tab.
Is there anything else that needs to be put in place to get this to work? Can this be run from the emulator? For what it is worth, the project being worked with is the LocationUpdates project that was downloaded from Google.
If you need additional information to help point me in the right direction please let me know.
Thank you.
I'm not sure why you get permission errors even though your permissions are in the manifest file but I can already tell you that Google Play Services won't work on the emulator unless you're using Google API
See here
To develop an app using the Google Play services APIs, you need to set up your project with the Google Play services SDK. If you haven't installed the Google Play services SDK yet, go get it now by following the guide to Adding SDK Packages.
To test your app when using the Google Play services SDK, you must use either:
A compatible Android device that runs Android 2.3 or higher and includes Google Play Store.
The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.
EDIT:
Oh wow, I have just noticed that this post is already quite old. If that's a problem someone please tell me or delete the post

Can't login into google play game services API

I'm desperately trying to setup an android game to use Google Play Game Services SDK.
After following the official documentation, I based my code on this example. Calling the login results in this error, in the logs:
01-31 12:06:54.580: E/Volley(1853): [6153] qt.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/110100128023441368674
01-31 12:06:54.612: E/SignInIntentService(1853): Access Not Configured. Please use Google Developers Console to activate the API for your project.
Alas, the API for my project exists in the API console ( https://cloud.google.com/console/project ), it contains the correct SHA1 footprint of my certificate, and it has been created automatically when I registered my project in the Android Dev Console here ( https://play.google.com/apps/publish ).
I've checked what is suggested in the SO question here, to no avail...
I don't know if it is related, but i have a weird bug where the Terms&Conditions acceptation popup keep reappearing sporadically (even after a full browser cache cleanup), like it didn't register my acceptation or something.
For reference, this is my android manifest (I made sure that #string/app_id matches the App ID in the Developper Console (147029020397), and that the sdk version is included in the metadatas) :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pokware.jb"
android:versionCode="2"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" android:debuggable="false">
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="#string/app_id" />
<activity
android:name="com.pokware.jb.MainActivity"
android:label="#string/app_name"
android:screenOrientation="landscape"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
So, after a couple of dozen attempts, I finally managed to make it work.
There was no error in my setup, but I suspect my many previous failed attempts introduced bad data in the application cache of my phone.
I cleared the cache of the Google Play Service app (in the Settings android system menu), manually installed my production APK (instead of running the dev version signed with the debug certificate in eclipse), ran it once, and then launched the dev version again inside Eclipse (overwriting the manually installed prod app). The miraculous "Welcome" popup then appeared !

App not showing on kindle devices (only showing on non-amazon devices)

I created a simple app and uploaded to Amazon store. The problem is it is only downloadable on non-Amazon Android devices. The app is simple with only one activity. The activity contains only one web view which loads up the following URL - www.myromancereads.com . If I directly install/debug/run the app on a real kindle device, it works fine. Below is my manifest file:-
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.brian.romancereads"
android:versionCode="2"
android:versionName="2.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/CustomTheme" >
<activity
android:name="com.brian.romancereads.Main"
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Here are two screenshots from amazon appstore:-
1> http://www.greenbean.in/images/rr1.jpg
2> http://www.greenbean.in/images/rr2.jpg
I have followed all guidelines for Kindle fire development, but still the app is not available for Kindle devices. I fail to understand what is the problem. Any help will be much appreciated.
Thanks...
This may be your device targetting settings in the portal itself and not a code issue. Screenshot rr2 is showing its not available for those devices on the Appstore. Screenshot rr1 is part of the Appstore Developer Select Program which requires targeting Kindle devices. I did a post on our developer blog that has more program details here.
Can you go to your dashboard here under Apps and Services, select My Apps and then click on the App name in question. You should see a "Binary Files" tab and a section for "Device Support". Can you verify that you have checked off Kindle Devices there?
Here is a screenshot
My hunch is that you may only have "All non-Amazon Android devices based on my manifest" checked currently.

Why is my app filtered for Android 1.5 and 1.6 devices?

Our last update for our application caused it to be filtered out for Android 1.5 and Android 1.6 devices. We did not change anything in our manifest (aside from the updated version code).
These similar questions did not help:
Android App no longer visible by Android 1.5 on devices
Android app not appearing in Market for 1.5&1.6 devices, Bluetooth is android:required="false"
We created a test app with a stripped down manifest and compiled it with the Android 1.5 SDK. Even this basic app is filtered out. We tried contacting Android Market support five days ago but Google makes it pretty clear they don't want to provide support to developers and say that it's unlikely we'll get a reply.
Here is the full AndroidManifest.xml for the test app:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.highwaynorth.test"
android:versionCode="6"
android:versionName="6.0">
<uses-sdk android:minSdkVersion="3" />
<application android:icon="#drawable/icon" android:label="#string/app_name">
<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>
</manifest>
Why is this being filtered?
Our app came back this week after Google posted this announcement to the Market on October 25th:
25 October 2011 - Recently published apps not appearing in Android Market
We're disappointed that our app was gone from the Market for 6 weeks and all we get at the end in the way of an explanation is basically to say "it's fixed now"

Categories

Resources