No Play Store update after redirecting test app to Market URL

I am testing the version check feature in our application. Our Android client requests data from our servers, which returns the minimum client version that we allow to access our service. Users with earlier versions are redirected to the Play Store.

If the user is out of date, we direct them to the Play store using code like:

final String appPackageName = getPackageName();
try {
  startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
} catch (android.content.ActivityNotFoundException anfe) {
  startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
}

      

In our application, legacy clients are directed to the market: // url. This launches the Play Store app and loads the landing page for our app.

To test this, I created a special "legacy" version of the application. In the manifest, I set the versionCode to 1 so that it is below our current version in the Play Store. I also set a falsely low versionName to initiate our upgrade process.

android:versionCode="1"   
android:versionName="1.0.1"

      

I built a signed version of the app, installed it using ADB (not via game storage) and tested it.

Version check triggers and I get directed to the Play Store app and my app page. But the play store page prompts me for actions to Uninstall or Open the app. This prevents me from updating the application.

Why doesn't the Play Store offer an Update button ? Is it because my app was not originally installed through the Play Store? Is there a way to get around this?

+3


source to share


1 answer


I believe your assumption that the app was not originally installed from the store is correct. I would recommend using the Google Play beta for this. As long as your device is registered as a beta tester for this particular app, it will be able to update (after 3 hours to be put in the store).

Unfortunately, you need to download twice. Once to get the functionality you want to test, and once to check that it works.



That being said, the fact that you end up in the app store with your app is the burden of proving that your code works. The rest is Google's problem. Therefore, you should feel secure that your code is working and as long as the Play Store is ready for people to update, you should be fine.

I have implemented this functionality in two separate apps and only tested (prior to the original release) that the user was properly configured in the app store. I usually wait 24 hours to update the minimum version on the server, just forcing the user to cache the old version.

+1


source







All Articles