Comments (8)
@macdo-py First you need to find your app namespace (maybe in android/app/src/main/kotlin/com/example/myapp/MainActivity.kt
)
In /lib/src/overlay_window.dart
add to class FlutterOverlayWindow
static Future<bool?> openMainApp() async {
final bool? _res = await _overlayChannel.invokeMethod<bool?>('openMainApp');
return _res;
}
in android/src/main/java/flutter/overlay/window/flutter_overlay_window/OverlayService.java
Find flutterChannel.setMethodCallHandler((call, result) -> {
and add below
} 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);
}
from flutter_overlay_window.
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
from flutter_overlay_window.
use https://pub.dev/packages/android_intent_plus with app links
from flutter_overlay_window.
Hi @ducviet321 , Im very interested in your idea / implementation, could not make it work, could you please explain a little more.
The file you are referencing is: OverlayService.java?
In wich line did you add your code?
Do you need to do something else beside calling it as you said?
Thanks in advance!
from flutter_overlay_window.
@ducviet321 thank you so much for your help!!! it worked but I hag to remove the line
Intent intent = new Intent();
And also, I'd like to know why you added a space in your app namespace, was it a typo o it should be like that.
Thanks again and best regards!
from flutter_overlay_window.
@icanall10 can you share example to open the app using android_intent_plus?
from flutter_overlay_window.
@selvam920 you should pre-configure app_links and then run
AndroidIntent intent = AndroidIntent(
action: 'action_view',
data: 'your-app-link-schema://your-app-link-host/some-path',
);
await intent.launch();
from flutter_overlay_window.
thanks
from flutter_overlay_window.
Related Issues (20)
- Android 14 requirese foregroundServiceType HOT 1
- Crash in production HOT 7
- Does not display all objects HOT 1
- I can't display my data on the overlay window. HOT 3
- warning red
- Back button not working! HOT 1
- Open overlay causes crashing when upgrade Android SDK to 34 HOT 2
- can't show anything HOT 1
- Overlay content update HOT 1
- Overlay Window doesn't disappear when app is in kill state HOT 1
- Support IOS
- How to resizeOverlay when it isActive
- How to create 2 overlay service at the same time?
- How to open every time overlay widget notification recive
- Set height to wrap content instead of full screen or fixed height
- Attempt to invoke virtual method 'wd.a io.flutter.embedding.engine.a.j()' on a null object reference HOT 3
- overlay window not showing while lock the phone HOT 1
- Not working in release mode
- showoverlay wrong size
- Can't change only enableDrag flag while being shown overlay HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_overlay_window.