-
Notifications
You must be signed in to change notification settings - Fork 76
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
Update dialog not showing in version 4.2.2 #113
Comments
What is that supposed to mean? When did it last work? |
May be yes, I have also previous version implemented code of your plugin and its work fine. Check the Code Future<void> checkForUpdate() async {
InAppUpdate.checkForUpdate().then((info) {
setState(() {
_updateInfo = info;
});
}).whenComplete(() {
if (_updateInfo!.flexibleUpdateAllowed) {
InAppUpdate.startFlexibleUpdate().then((_) {}).whenComplete(() {
InAppUpdate.completeFlexibleUpdate().then((_) {
showCupertinoDialog(
barrierDismissible: false,
context: context,
builder: (context) => CupertinoAlertDialog(
title: Text("Update Finish"),
content: Text("Please restart the app to load new content"),
actions: [
CupertinoActionSheetAction(
child: Text(
AppTranslations.of(context)!.text("btn_ok"),
),
onPressed: () {
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (context) => SplashScreen()),
(route) => false);
},
),
],
),
);
});
});
}
}).catchError((e) {
print(e.toString());
// showSnack(e.toString());
});
} May be some issue with InAppUpdate.completeFlexibleUpdate() |
And what does "not work" mean exactly? |
InAppUpdate.completeFlexibleUpdate() your completeFlexibleUpdate() function is not working cause of Android minimum SDK version is 16 and Playstore compulsory required is 21 |
I don't have a clue what this has to do with anything. Please provide proper information and sources. |
Check this path https://github.com/jonasbark/flutter_in_app_update/blob/master/android/build.gradle where defaultConfig { Change minSdkVersion from 16 to 21 and Run your example code |
Yes, it's true that in app updates are only available from 21 upwards. I will adjust the readme accordingly but I still do not understand your point. You are complaining that the plugin doesn't work on old Android versions? |
It's not just about old Android versions, not working on any version try to change, test the plugin and upload new version of it. |
Did you try to change it and uploaded a new version? It really makes zero sense. |
I just download your source code and make changes as i need and use it |
The same problem but with a fatal crash link |
just download source code and make changes as you need and use it |
It works fine like this with all of our production apps, so I'm closing this. |
Update dialog not showing in version 4.2.2
I'm showing update dialog after calling this functions > InAppUpdate.completeFlexibleUpdate()
The text was updated successfully, but these errors were encountered: