flutter_overlay_window
flutter_overlay_window copied to clipboard
Bring app to foreground from overlay.
Suppose overlay is active and I presses home button. Then app goes to background and overlay is still showing which is good. Now if I want to bring back my app to foreground then there is no implementation or functions to do this.
@adityaraj1702 use ports to communicate between MainApp and Overlay and MethodChannel to call native code.
overlay.onTap -> IsolateNameServer.lookupPortByName(your_main_port_name)?.send("home") MainAppPortListener(message) -> message == "home" ? methodChannel.invokeMethod("startMainActivity") MainActivity -> call.method == "startMainActivity" ? startActivity(getPackageManager().getLaunchIntentForPackage(getPackageName()))