From 8fb1ba47b865e7578633ada9aeea17db6bea7606 Mon Sep 17 00:00:00 2001 From: "frng\\a.rezaee" Date: Mon, 5 Jan 2026 13:51:50 +0330 Subject: [PATCH 1/4] updated CHANGELOG.md and settings.gradle, set version to 4.7.1 --- CHANGELOG.md | 3 +++ .../android/gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/settings.gradle | 6 +++--- example/ios/Flutter/Debug.xcconfig | 1 + example/ios/Flutter/Release.xcconfig | 1 + example/lib/main.dart | 11 ++++------- example/macos/Flutter/Flutter-Debug.xcconfig | 1 + example/macos/Flutter/Flutter-Release.xcconfig | 1 + pubspec.yaml | 6 +++--- 9 files changed, 18 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b478cb25..4fc85418 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 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/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 91e61138..6bd38130 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip \ No newline at end of file diff --git a/example/android/settings.gradle b/example/android/settings.gradle index f2b64cfa..fa3695ae 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -17,9 +17,9 @@ pluginManagement { } plugins { - id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.10" apply false + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.11.1" apply false + id("org.jetbrains.kotlin.android") version "2.2.20" apply false } include ":app" diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig index 592ceee8..ec97fc6f 100644 --- a/example/ios/Flutter/Debug.xcconfig +++ b/example/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig index 592ceee8..c4855bfe 100644 --- a/example/ios/Flutter/Release.xcconfig +++ b/example/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/example/lib/main.dart b/example/lib/main.dart index 3210c870..24d7220f 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -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/pubspec.yaml b/pubspec.yaml index eff467d3..7cae0813 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.1 +homepage: https://github.com/armin1440/open_filex dependencies: flutter: From 812b8dfc3b46d4493b74c2544f0c0bf9e02ea3a2 Mon Sep 17 00:00:00 2001 From: "frng\\a.rezaee" Date: Mon, 5 Jan 2026 14:00:09 +0330 Subject: [PATCH 2/4] renamed files, final version 4.7.1 --- example/lib/main.dart | 2 +- lib/{open_filex.dart => open_filex_plus.dart} | 0 lib/src/platform/open_filex.dart | 3 ++- lib/src/web/open_filex.dart | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) rename lib/{open_filex.dart => open_filex_plus.dart} (100%) diff --git a/example/lib/main.dart b/example/lib/main.dart index 24d7220f..cdb88e5d 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'dart:io'; import 'package:flutter/material.dart'; -import 'package:open_filex/open_filex.dart'; +import 'package:open_filex/open_filex_plus.dart'; import 'package:permission_handler/permission_handler.dart'; void main() => runApp(const MyApp()); 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; From ff1f409eaae24c792de256badeddffa9b042f964 Mon Sep 17 00:00:00 2001 From: "frng\\a.rezaee" Date: Mon, 5 Jan 2026 14:20:52 +0330 Subject: [PATCH 3/4] fixed removing Android READ_MEDIA_IMAGES/READ_MEDIA_VIDEO permissions --- CHANGELOG.md | 3 +++ android/src/main/AndroidManifest.xml | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fc85418..56e08efd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 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. 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" /> - - - - Date: Mon, 5 Jan 2026 14:23:30 +0330 Subject: [PATCH 4/4] set version to 4.7.2 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 7cae0813..2db476aa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ 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.1 +version: 4.7.2 homepage: https://github.com/armin1440/open_filex dependencies: