mirror of
https://gitee.com/shuto/cordova-plugin-file-opener2.git
synced 2025-03-15 06:11:00 +08:00
Fix for APK install on Android 24
Added an exception to handle APKs differently if the android version is 6
This commit is contained in:
parent
ca73974388
commit
d316fac5a1
@ -98,7 +98,7 @@ public class FileOpener2 extends CordovaPlugin {
|
||||
try {
|
||||
Uri path = Uri.fromFile(file);
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
if(Build.VERSION.SDK_INT >= 23){
|
||||
if(Build.VERSION.SDK_INT >= 23 && !(contentType.equals("application/vnd.android.package-archive") && Build.VERSION.SDK_INT == 24)){
|
||||
|
||||
Context context = cordova.getActivity().getApplicationContext();
|
||||
path = FileProvider.getUriForFile(context, cordova.getActivity().getPackageName() + ".opener.provider", file);
|
||||
|
Loading…
x
Reference in New Issue
Block a user