Skip to content

Commit

Permalink
upgrade the version + remove secure flag
Browse files Browse the repository at this point in the history
  • Loading branch information
X-SLAYER committed Mar 14, 2023
1 parent 09b1ad0 commit e2952ab
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ public int onStartCommand(Intent intent, int flags, int startId) {
WindowSetup.flag | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR
| WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED
| WindowManager.LayoutParams.FLAG_SECURE,
| WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
PixelFormat.TRANSLUCENT
);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && WindowSetup.flag == clickableFlag) {
Expand Down
1 change: 1 addition & 0 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
10 changes: 5 additions & 5 deletions example/lib/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ class _HomePageState extends State<HomePage> {
onPressed: () async {
if (await FlutterOverlayWindow.isActive()) return;
await FlutterOverlayWindow.showOverlay(
enableDrag: false,
enableDrag: true,
overlayTitle: "X-SLAYER",
overlayContent: 'Overlay Enabled',
flag: OverlayFlag.defaultFlag,
alignment: OverlayAlignment.centerLeft,
visibility: NotificationVisibility.visibilityPrivate,
positionGravity: PositionGravity.auto,
height: WindowSize.matchParent,
width: WindowSize.matchParent,
visibility: NotificationVisibility.visibilityPublic,
positionGravity: PositionGravity.left,
height: WindowSize.fullCover,
width: WindowSize.fullCover,
);
},
child: const Text("Show Overlay"),
Expand Down
Loading

0 comments on commit e2952ab

Please sign in to comment.