Android billing 5.0.0 sdk compatibility - android

I have migrated my app to the 5.0.0 version of the billing library, as it is adviced. However, I've found that it's not working properly on old devices in which the old library did work. I've tested it on Android 7 (Nougat API 24), Android 9 (Pie API 28) and Android 12 (S API 31). The only one in which it's not working it's on the Nougat one and I would like to know if it's somewhere in the documentation reported which API levels are supported and which don't.
The "error" I'm getting is SERVICE_UNAVAILABLE as response code when calling queryProductDetailsAsync.
I'm also assuming it's a sdk version issue, as I can't find other cause (the Play Store is updated, the wifi is on and my Google account logged in).

Something must be misconfigured in the phone. I tested on an Android 6 and it worked, so I tried completely restoring my Android 7. Now it works.
However, I still wonder why the old library worked and the new one didn't.

Related

Xamarin Forms App crashing on Huawei P20 Pro

I've built an app that successfully runs on all sorts of Android devices. It was compiled for Android 8, but the device it's running on is Android 9.
Every time I open it on this Huawei P20 Pro, I get a crash. The only sensible error I can see is:
No implementation found for android.content.Context md5c497ac42f3138c67aed930c79af470d4.MainApplication.n_getApplicationContext() (tried Java_md5c497ac42f3138c67aed930c79af470d4_MainApplication_n_1getApplicationContext and Java_md5c497ac42f3138c67aed930c79af470d4_MainApplication_n_1getApplicationContext__)
I never call the get Application Context at any point, so I'm really not sure what is going on here.
Any helpful tips on debugging an issue like this?
If you compiled it with SDK 27 as max API (version 8) why would you run it on SDK 28, Compile with max version available 28 or 29 and then try running
In manifest make it android:targetSdkVersion="28" and compile using latest
First of all, I believe that the issue lacks enough details to make any assumptions about the possible causes. One of the possible causes is setting the target SDK version incorrectly. You can attempt to set to a correct one for the app as Ross Vernal suggested. It may can solve your problem.
Based on what I read from the official Android documents about the targetSdkVersion property, setting the version lower than the API level of a mobile device means that some additional compatibility behavior may be required when the app runs.
But this does not mean that the app cannot run on the devices with higher API levels. Whether the compatibility behavior is required depends on the app itself.
Therefore, it's possible that a feature or something else that you have decided to use in your app caused the issue on the device.
Additionally, I tested these conditions on my Huawei device that runs on Android 9 (SDK 28) with a sample Xamarin.Forms app under a target SDK of 27.
The app launched successfully. This supports the possibility mentioned above.

How to expand Android version target version for existing app

I have an app in the Play Store that originally targeted API 19+, this was great, then somehow just before Christmas we uploaded a new version that targeted API 21+. Not so much of a problem as an annoyance, but when I uploaded a new version of the app today I got an error on the API 21+ update and was told that I had to have a version that targeted API 23+.
I want to get this app back so it covers all versions of Android from 4.4 > 8.1. But I don't know how.
I uploaded the API21+ apk, and the API23+ version (with different version numbers in the same release (because you have to do that), but the error still persists for the 21+, so I had to remove it to get the update in.
How can I achieve this, currently stuck with an api 23 app, which should be 19.
I am using Xamarin.Forms, in Visual Studio 2017, all of the latest updates, publishing through the web as you can't upload from VS if you need multiple packages in the same release (I don't think).
Thanks everyone.
EDIT
Right, I have the solution to my problem, but I have no idea how to execute it. How do I set the minSdkVersion, maxSdkVersion and targetSdkVersion, using code, in Xamarin and Visual Studio. As the manifest is written at compile time, my options for editing the base manifest wont work (I tried).
You seem to be confusing target SDK and minSDK.
Target SDK says which SDK you used to develop, and have you correctly handled things like runtime permissions which only came in with SDK 23.
You might find this blog post helpful in explaining the differences.
For more information see:
SDK 23 based permissions
Requesting permissions at runtime
It sounds like you want a single SDK with minSDK=19 and targetSDK=23, this is perfectly OK.
So, this seems to be a thing: https://developer.android.com/google/play/publishing/multiple-apks.html
Sadly, you have to edit the manifest manually to create the different versions and then archive it for each release, with a new version number. But it works.

Android app Publish Error

I am getting this Error when I try to publish this app in the store to an update of existing app. I am using Visual studio Apache Cordova Tools to build the apk and the previous version was published with Intel XDK
It is forbidden that a device upgrading from API levels in range 16-23 to API levels in range 24+ should downgrade from version 48 to version 9, which would occur when
Screen layouts containing any of [small, normal, large, xlarge] and
Features containing all of [android.hardware.screen.PORTRAIT, android.hardware.TOUCHSCREEN].
Please let me know why I am getting this issue. Also possible solutions for this.
Thanks a lot
This is not due to the tool you used for build. I faced the same issue. Here is what I was trying to do.
I had my version 5 covering minSDK as 8 to maxSDK as 23.
I released a version 6 from 14 to 23. In this build I found that app was crashing for version from 14 to 20 but working fine above 21+
So I wanted to create a version 7 covering from 21+ and also enable version 5 in play store console so that rest of the devices running 14 to 20 also can be covered by version 5.
But since we have already published a version which has given coverage for devices running api 14 to 23, we are asking Google to downgrade those devices.
And that is why you see
"It is forbidden that a device upgrading from API levels in range 16-23 to API levels in range 24+ should downgrade from version 48 to version 9, which would occur when "
Please ensure you are not downgrading the devices running those api which you had given an updated version already. Check your build.gradle file or Manifest to confirm the same.
In my case, I solved this by fixing the issues causing the crash and released version 7 that works fine from API 14 to 23. Hope this helps.
Finally I fixed but what I did to fix is uncertain
I tried to update Visual Studio 2015 Tools for Apache Cordova (update 7) and also updated cordova to 5.4.1 and a rebuild fixed the issue in store.
so I am not sure what was the cause and what fixed it. but definitely just serveral rebuilds didnt fix though.
Hope this will help someone in future

Android Google Play Services Broken? isConnected() throws errors

Since updated my SDK Manager packages, my google play services hasn't been working.
This is causing my Samsung S5 Running 5.0, HTC One_M8 running 5.0.1, and my Nexus 5 running 6.0 (the Android M preview) to crash.
java.lang.IncompatibleClassChangeError: The method 'boolean com.google.android.gms.common.api.GoogleApiClient.isConnected()' was expected to be of type interface but instead was found to be of type virtual (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
Running the same code on Samsung Mega running 4.4.2 and a Nexus 4 running 4.4.4, I'm getting this error.
java.lang.NoSuchMethodError: com.google.android.gms.common.api.GoogleApiClient.isConnected
These errors only started happening after the latest updates from the SDK Manager, I update very regularly and my last update before I noticed the issue was on October 5, 2015.
Current SDK
Android Support Repository: 21.
Android Support Library: 23.0.1
Google Play services: 27
Android SDK Tools: 24.4
Android SDK Platform-tools: 23.0.1
Android SDK Build-tools: 23.0.1
Everything worked perfectly before the update. Is there anyway to fix this? I've spend hours trying to figure out if I screwed up something somewhere, but there have been no changes to my project that involve google play services since the last time it worked. I have confirmed with someone, using the exact same codebase as I'm using (we use git) who hasn't yet updated their SDK packages, that our code still works for him. I may have to revert my SDK tools since I cannot simply wait around for a possible fix if it is a bug. I get the update is very new but I can't be the only one having this problem....
Any ideas on how to fix this?
Thanks!
Ok, I've found out what my issue truly was. It seamed odd that the isConnected() method in the GoogleApiClient would break while all the other static methods could be called without issue. But when you have an API update that get's announced as a "breaking change" you kind of expect things to not work anymore.
Well on Wednesday Oct 7'th I noticed another update which I've finally had a chance to test and the issue is no longer present. So it looks like this was a bug in their "breaking change". Thankfully Google got this fixed rather quickly. But it works now. So I've essentially reverted my code back to the way it was before. Cheers!

Why android reference does not list "Android 2.3.5–2.3.7" as API 10?

In the android documentation there is nothing about Android 2.3.5, 2.3.6, 2.3.7: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels
Wikipedia however lists those as API 10 and other answers say it's API 10. Which is the logical thing since API 11 starts with Android 3.0 and there is no such thing like API 10,5...
So did they simply forget to mention it in the android reference? Or is that some kind of "unofficial Android" ?
Here is the thing, android's latest version kitkat(4.4) is api19.
After some minor update, the current kitakt version stands at 4.4.2, however the api version remains the same at 19.
Similarly, all the minor versions of android will not have a corresponding api verison.

Categories

Resources