-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open the main app from floating window? #108
Comments
Hi @ducviet321 , Im very interested in your idea / implementation, could not make it work, could you please explain a little more. Thanks in advance! |
@macdo-py First you need to find your app namespace (maybe in In static Future<bool?> openMainApp() async {
final bool? _res = await _overlayChannel.invokeMethod<bool?>('openMainApp');
return _res;
} in Find } else if (call.method.equals("resizeOverlay")) {
...
} else if (call.method.equals("openMainApp")) {
Intent intent = new Intent();
intent.setClassName("com.vitinc. myapp", "com.vitinc.myapp.MainActivity");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
} |
@ducviet321 thank you so much for your help!!! it worked but I hag to remove the line Thanks again and best regards! |
Yeah it was my typo, maybe be you should rename intent variable instead of removing it, I haven't looked, just try to make it work quickly |
use https://pub.dev/packages/android_intent_plus with app links |
@icanall10 can you share example to open the app using android_intent_plus? |
@selvam920 you should pre-configure app_links and then run
|
thanks |
I'm looking for a better solution to open the main application from the floating window, right now I'm only able to archive this by modifying
OverlayServices.java
and call it asFlutterOverlayWindow.openMainApp();
The text was updated successfully, but these errors were encountered: