-
Notifications
You must be signed in to change notification settings - Fork 59
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
Nothing happened when I called OtaUpdate().excute #22
Comments
Does this package only work with rooted device? |
我也是没有反应,请问你得问题解决了么 |
Try this: https://medium.com/apolloblog/building-an-in-app-updater-ota-in-flutter-b0becddee8ca |
Please provide output from |
The link is private and only can access from our wireless. Nothing happens when i ran it and I have tried to debug it. Maybe it only work with https so it can't download the apk file. |
So it is mac filtered? Http should not be problem. We are using android download manager in android implementation to download the APK. |
I have checked all the files in device but can't find the apk. By the way, when the apk file is opened. Does it automatic install and open the app or it just show the install screen then I have to tap the install button? If it not, I can use the other solution above, it's work for me but it can't automatic install for me. Thanks you |
It is strange it should at least print some logs and possibly a StackTrace if it crashed somewhere upon calling the execute method. As for your question It will open standard install wizard. |
I have accidentally reproduced this behavior, when running example. We have moved our server that hosts apk to another domain and it behaved exactly the same as download manager encountered 404 HTTP error and scheduled paused download request for retry. So I think there may be two possible reasons for your error:
Next version will have improved logging. |
我找到了我得问题,因为我是用的安卓自带模拟器cpu为x86-64架构,而我的apk文件只支持arm,在使用第三方模拟器后就解决了 |
I can download the apk file from browser normally. I have used dio package to download apk file and it work but it not work with your package.Maybe the problem come from the device cuz the others one use your package is still working. |
They are probably not using download manager. Solution may be to use optional parameter to bypass download manager and download APK with any java http client, but that would probably cause to loose download progress. |
non active issue. closing. |
me too find it,but 3.1.0 is ok |
I have implemented as the instruction and I have try to download the apk with the link to check if it can be downloaded or not. However, there is nothing happen when I call OtaUpdate().excute(), this is my code:
`
Future updateApp() async {
// RUN OTA UPDATE
// START LISTENING FOR DOWNLOAD PROGRESS REPORTING EVENTS
print("test update app");
try {
//LINK CONTAINS APK OF FLUTTER HELLO WORLD FROM FLUTTER SDK EXAMPLES
OtaUpdate().execute('http://172.16.0.39:9001/fsmart-door/static/FSmartDoor.apk?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=admin%2F20191231%2F%2Fs3%2Faws4_request&X-Amz-Date=20191231T043606Z&X-Amz-Expires=432000&X-Amz-SignedHeaders=host&X-Amz-Signature=3465870fde98ca8dcee12a982bff67ea6657cfd8e822f7b7602c42bf4d16562a').listen(
(OtaEvent event) {
print('EVENT: ${event.status} : ${event.value}');
},
);
} catch (e) {
print('Failed to make OTA update. Details: $e');
}
}
`
The text was updated successfully, but these errors were encountered: