Closed kmemo closed 6 months ago
FYI:
flutter_overlay_window/android/src/main/java/flutter/overlay/window/flutter_overlay_window/OverlayService.java
176: if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) { 177: pendingFlags = PendingIntent.FLAG_IMMUTABLE; 178: } else { 179: pendingFlags = PendingIntent.FLAG_UPDATE_CURRENT; 180: }
For a Android API 30 emulator to run one of my codes with flutter_overlay_window plugin, I had to modify the line 176 of OverlayService.java as:
176: if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
Reference https://stackoverflow.com/a/70627228
It not work for me . I got this error when change in line 176 . Pls help to fix it. Thanks
I got this screen when i click Show overlay ![Uploading Screen Shot 2022-10-04 at 17.06.00.png…]()
FYI:
flutter_overlay_window/android/src/main/java/flutter/overlay/window/flutter_overlay_window/OverlayService.java
176: if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) { 177: pendingFlags = PendingIntent.FLAG_IMMUTABLE; 178: } else { 179: pendingFlags = PendingIntent.FLAG_UPDATE_CURRENT; 180: }
For a Android API 30 emulator to run one of my codes with flutter_overlay_window plugin, I had to modify the line 176 of OverlayService.java as:
176: if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
Reference https://stackoverflow.com/a/70627228
I am not able to see changes to the codes of the new version of the plugin (0.4.1) in regards to this issue. This issue has been closed but no explanation how this issue has been adressed by the team.
I will retry it because I already tested it on real API30 SDK I will try it on an emulator
Testing flutter_overlay_window plugin on emulated Android 30 crashes with a java.lang.IllegalArgumentException (Compiled with SDK 31; Emulater version is 31.2.10)
I believe that Issue #4 has addressed the similar issue for API 31 and above. Would it possible to lower the API level that PendingIntent.FLAG_IMMUTABLE flag is set with the outgoing pending intent, down to API 30?
Or possibly down to API 23 that the flag is first introduced.