Closed RomilPipaliya closed 11 months ago
What is that supposed to mean? When did it last work? Did you fully read and follow the readme?
What is that supposed to mean? When did it last work? Did you fully read and follow the readme?
May be yes, I have also previous version implemented code of your plugin and its work fine. But after Updating the plugin from in_app_update: ^3.0.0 to in_app_update: ^4.2.2 Its not working as well working before update.
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?
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.
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 { minSdkVersion 16 }
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?
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 and issue is only minSdkVersion is 16
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.
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 I'm just want to inform about the issue now decision is yours you want to fix it leave it whatever it is.
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()