vaenow / cordova-plugin-app-update

App updater for Cordova/PhoneGap
MIT License
298 stars 146 forks source link

Enable usage in Android 8+ #95

Closed loban closed 5 years ago

loban commented 6 years ago

Android version 8 and above require new permissions in order to install external APKs. This patch does the following things:

vaenow commented 6 years ago

Hi @loban ,

Why not use https://github.com/vaenow/cordova-plugin-app-update/issues/93#issuecomment-375275089 below, instead of changing so many code?

uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"
loban commented 6 years ago

Thanks for the feedback. In my testing, I found that just that line alone was inadequate.

I'll try to explain why:

This way, this plugin works in all android versions from 4.1 jelly bean all the way to 8.1 oreo. Hope I was able to explain properly. Maintaining android version compatibility (especially when it comes to security permissions) is annoying, LOL.

arthursp commented 6 years ago

I tested the code of @loban, it's working , could we think about merging in master and deploy a new cordova / ionic version ?

JoxC commented 6 years ago

I tested the code too which works great.

Only request the permissions after users click the install button may be better for users understand what happened.

egrendonDev commented 5 years ago

Any chance the Permission fix is going to get merged in?