diff --git a/androbd/src/main/AndroidManifest.xml b/androbd/src/main/AndroidManifest.xml
index cd68d3ad..610a07ef 100644
--- a/androbd/src/main/AndroidManifest.xml
+++ b/androbd/src/main/AndroidManifest.xml
@@ -61,6 +61,15 @@
android:name=".PidCustomization"
android:label="@string/customize_display"
android:configChanges="touchscreen|orientation|screenSize" />
+
+
+
\ No newline at end of file
diff --git a/androbd/src/main/java/com/fr3ts0n/ecu/gui/androbd/MainActivity.java b/androbd/src/main/java/com/fr3ts0n/ecu/gui/androbd/MainActivity.java
index 08025e20..acd982f4 100644
--- a/androbd/src/main/java/com/fr3ts0n/ecu/gui/androbd/MainActivity.java
+++ b/androbd/src/main/java/com/fr3ts0n/ecu/gui/androbd/MainActivity.java
@@ -54,6 +54,8 @@ import android.widget.ListView;
import android.widget.Spinner;
import android.widget.Toast;
+import androidx.core.content.FileProvider;
+
import com.fr3ts0n.androbd.plugin.Plugin;
import com.fr3ts0n.androbd.plugin.mgr.PluginManager;
import com.fr3ts0n.ecu.EcuCodeItem;
@@ -1913,9 +1915,10 @@ public class MainActivity extends PluginManager
File file = new File(FileHelper.getPath(this));
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
- Uri data = Uri.fromFile(file);
+ intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+ Uri uri = FileProvider.getUriForFile(MainActivity.this, getPackageName()+".provider", file);
String type = "*/*";
- intent.setDataAndType(data, type);
+ intent.setDataAndType(uri, type);
startActivityForResult(intent, REQUEST_SELECT_FILE);
}
diff --git a/androbd/src/main/res/xml/provider_paths.xml b/androbd/src/main/res/xml/provider_paths.xml
new file mode 100644
index 00000000..fc0befcc
--- /dev/null
+++ b/androbd/src/main/res/xml/provider_paths.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index a909192d..16dd4bc0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:8.3.1'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0"
}
}
diff --git a/gradle.properties b/gradle.properties
index d37810e0..41a424e1 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,3 +1,4 @@
android.nonFinalResIds=false
android.nonTransitiveRClass=true
+android.useAndroidX=true
org.gradle.unsafe.configuration-cache=true
\ No newline at end of file