-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to force update and not to let user to use app? #17
Comments
After few days of searching it doesn't work on emulator. I install on my android phone and it worked. But I can see only availableVersionCode as 30. But my actual version is version: 2.3.4+34 on Google Play store. I try to make Perform immediate update and I can see the update page which has x on right hand corner which is close button. I press there to close it before update. And second time I try to run it I am keep getting MissingPluginExeption. My question is how to force user to update and not to cancel it? Thanks |
In Google Play Store my App Release: 2.3.4 and version code: 34 I open my project and change the version to: 2.3.3+33 When I run the app I got error that shown below. Any idea why I am getting this error
|
Please read https://developer.android.com/guide/playcore/in-app-updates#troubleshoot carefully. I'm pretty sure it won't work with your debug certificates in debug mode. |
What do you mean in debug mode? I install app from Android Studio to my phone. |
ok, it means:
So I need to update my app with this plugin. Than later (1 day later in example) I have to update my again with new version code on Google play than I can test. ??? Problem is that If I use version as 1.2.0+5 it goes and finds the new update. but if I change version code lower than but closer to currently that available in App Store it doesn't update. |
I reduce my app versions to version: 1.2.4+10 and Now I got this:
also it shows updateAvailable: true but both immediateUpdateAllowed and flexibleUpdateAllowed shows as a false |
Same issue with me..... It's issue on google side not this plugin. If you clear play store cache and open play store and go to my apps and then open app it will show update. |
I am also seeing this. Though this happens only when I open app after clearing cache on play store. When I close the app and open again, it shows true for both update type. |
To add to @mdazharuddin1011999, forcing an update check in the play store worked for me, even if I was just on internal testing. For that I followed the steps listed in the explanation of how to do alpha track in-app updates (even though I was on internal): https://stackoverflow.com/questions/56087064/how-can-i-test-in-app-updates-in-android |
Yeah it works. If you are seeing "update available" for your app in My apps and games section of Play store, this package works like charm, doesn't matter if you are in internal or beta or production! |
And that is exactly my problem. I have to go to PlayStore, I have to find "My apps and games" and I have to check upgrades BEFORE this plugin will find the upgraded version, which is actually already exists on the PlayStore. |
@fehernyul Nonsense. The play store update list is cached and auto updates itself - something that nobody has control of. So you'll just have to wait until the update information arrives to this plugin as well. |
Did you find a solution to force the app update? I mean users could not use the app unless they update to the latest version. |
@zjamshidi I store a "latest version" online somewhere (actually I use Firebase Remote Config but you could store it on your own server). On startup it fetches the version and if it's breaking with respect to the app's current version (Semver semantics), then the app routes to a captive screen. If you're worried about your app not being able to start up without a connection because it would hang on fetching the version, just fetch the version when you do have a connection during the lifetime of the app. |
I do the the same for the "Latest Version". I was wondering if the library provides any solution for forcing users. I ended up calling "performUpdate" method in a loop :/ |
Aren't "immediate" updates forced anyway? For flexible ones you'd have to loop though yeah if the user does say no, but that probably defeats the point. https://developer.android.com/guide/playcore/in-app-updates |
Hi,
I need to force user to update app always. If they not going to update I should block user not to use app. Also I created a example app and try to use your example, but it didn't work and I guess there was no app that I am running in Google Play.
Later I update my app package name which is already in app store and I keep getting error as shown below.
I/flutter ( 7751): PlatformException(Failed to bind to the service., null, null)
Last, your example uses a button to check for update how to use this without button but in initState? Thanks
Note: I all need is to check for Update initial app initialization than force to make performImmediateUpdate().
My original app:
And in MyMainHomePage I have PackageInfo and Connectivity in initState. So where I code the android app update?
Here is the full code (I am not sure where I am making mistake):
The text was updated successfully, but these errors were encountered: