jeppeman / GloballyDynamic

Dynamic Delivery everywhere through a common API
Apache License 2.0
298 stars 18 forks source link

deferred uninstall does not work. Is there is any way to uninstall the downloaded feature? #111

Closed vaibhavsharma316 closed 1 year ago

vaibhavsharma316 commented 1 year ago

Description

Steps to Reproduce

GloballyDynamic gradle plugin version

GloballyDynamic android library version

GloballyDynamic android studio plugin version

Android Studio Version

Link to a public git repo demonstrating the problem:

jeppeman commented 1 year ago

Hi! If I recall the way Play Feature delivery works correctly: you make a request to uninstall a feature, but it doesn't actually get uninstalled right away, it is sort of marked for deletion to take place at a future point in time when space is needed on the device.

vaibhavsharma316 commented 1 year ago

I am uploading my bundle on my server instead of Google Play. Is it possible to uninstall it when not using Google Play. I debugged the code and found these are split apks that gets installed. Do you know any way by which I can remove the split apk's once installed.

The split apk resides in the data/app folder. But our application doesn't have access to this folder.

jeppeman commented 1 year ago

The library still just defers SplitInstallManager to uninstall split APKs for the self hosted variant as well. I can look into implementing a custom uninstaller, I'll get back to you.

jeppeman commented 1 year ago

Looks it is possible to do, there is this method - I tried it out and it seems to work. Would you like me too add it for the self hosted version?

There is one caveat however, uninstalling also requires user confirmation.

vaibhavsharma316 commented 1 year ago

It would be great if you can add it in the self hosted version. I had tried this removeSplit method earlier but didn't work me, anyways. That's fine if it ask for the user confirmation ,I am working on to supress the user confirmation dialog that won't be a issue.

Thanks a lot for finding the fix

jeppeman commented 1 year ago

Ok, great. I'll let you know when it's done. I'll try and find some time during the week.

jeppeman commented 1 year ago

Hi, I've published a new version of the android library (1.3.0) with support for uninstalling now. See usage example in release notes. You can also see a fully working example in action in the minimal sample app. Let me know if it works for you.

vaibhavsharma316 commented 1 year ago

Thanks a lot. I will check and let you know

vaibhavsharma316 commented 1 year ago

I tried your minimal-sample app but during project build getting an error.

Task 'wrapper' not found in project ':minimal-sample' and it's subprojects

jeppeman commented 1 year ago

You need to open the project in android studio from globallydynamic-android-lib, then run the minimal-sample app module

vaibhavsharma316 commented 1 year ago

Thanks for the uninstall feature. I can now able to remove installed modules. Able to run minimal sample as well.

jeppeman commented 1 year ago

Great, thanks. Closing this then