diff --git a/CHANGELOG.md b/CHANGELOG.md
index b478cb25..56e08efd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+## 4.7.2
+* Remove Android READ_MEDIA_IMAGES/READ_MEDIA_VIDEO permissions. The previous had bugs.
+
+## 4.7.1
+* Remove Android READ_MEDIA_IMAGES/READ_MEDIA_VIDEO permissions.
+
## 4.7.0
* Fix Android compatibility issues after Flutter 3.29.0 upgrade (Thanks to [mufassalhussain](https://github.com/mufassalhussain), PR[#19](https://github.com/javaherisaber/open_filex/pull/19))
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index 12c36ca8..cb644e16 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -6,10 +6,6 @@
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
-
-
-
-
runApp(const MyApp());
@@ -21,7 +21,7 @@ class MyAppState extends State {
if (Platform.isLinux) {
_openLinuxFile();
} else if (Platform.isAndroid) {
- _openAndroidExternalImage();
+ _openAndroidExternalFile();
} else if (Platform.isWindows) {
_openWindowsFile();
} else if (Platform.isMacOS) {
@@ -82,12 +82,11 @@ class MyAppState extends State {
// ignore: unused_element
_openAndroidExternalImage() async {
//open an external storage image file on android 13
- if (await Permission.photos.request().isGranted) {
- final result = await OpenFilex.open("/sdcard/Download/flutter.png");
+ final result = await OpenFilex.open("/sdcard/Download/k.apk");
setState(() {
_openResult = "type=${result.type} message=${result.message}";
});
- }
+
}
// ignore: unused_element
@@ -115,12 +114,10 @@ class MyAppState extends State {
// ignore: unused_element
_openAndroidExternalFile() async {
//open an external storage file
- if (await Permission.manageExternalStorage.request().isGranted) {
- final result = await OpenFilex.open("/sdcard/Android/data/R-C.xml");
+ final result = await OpenFilex.open("/sdcard/Download/k.apk");
setState(() {
_openResult = "type=${result.type} message=${result.message}";
});
- }
}
@override
diff --git a/example/macos/Flutter/Flutter-Debug.xcconfig b/example/macos/Flutter/Flutter-Debug.xcconfig
index c2efd0b6..4b81f9b2 100644
--- a/example/macos/Flutter/Flutter-Debug.xcconfig
+++ b/example/macos/Flutter/Flutter-Debug.xcconfig
@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/example/macos/Flutter/Flutter-Release.xcconfig b/example/macos/Flutter/Flutter-Release.xcconfig
index c2efd0b6..5caa9d15 100644
--- a/example/macos/Flutter/Flutter-Release.xcconfig
+++ b/example/macos/Flutter/Flutter-Release.xcconfig
@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/lib/open_filex.dart b/lib/open_filex_plus.dart
similarity index 100%
rename from lib/open_filex.dart
rename to lib/open_filex_plus.dart
diff --git a/lib/src/platform/open_filex.dart b/lib/src/platform/open_filex.dart
index 40bca860..33775f6a 100644
--- a/lib/src/platform/open_filex.dart
+++ b/lib/src/platform/open_filex.dart
@@ -3,7 +3,8 @@ import 'dart:convert';
import 'dart:io';
import 'package:flutter/services.dart';
-import 'package:open_filex/src/common/open_result.dart';
+
+import '../../open_filex_plus.dart';
/// OpenFilex class
class OpenFilex {
diff --git a/lib/src/web/open_filex.dart b/lib/src/web/open_filex.dart
index c9b8c35e..5a0ca1e1 100644
--- a/lib/src/web/open_filex.dart
+++ b/lib/src/web/open_filex.dart
@@ -1,5 +1,5 @@
import 'dart:async';
-import 'package:open_filex/src/common/open_result.dart';
+import 'package:open_filex_plus/src/common/open_result.dart';
import 'web.dart' as web;
diff --git a/pubspec.yaml b/pubspec.yaml
index eff467d3..2db476aa 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,7 +1,7 @@
-name: open_filex
+name: open_filex_plus
description: A plug-in that can call native APP to open files with string result in flutter, support iOS(UTI) / android(intent) / PC(ffi) / web(dart:html)
-version: 4.7.0
-homepage: https://github.com/javaherisaber/open_file
+version: 4.7.2
+homepage: https://github.com/armin1440/open_filex
dependencies:
flutter: