Comments (5)
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.
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.
@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.
@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.
use https://pub.dev/packages/android_intent_plus with app links
from flutter_overlay_window.
Related Issues (20)
- Does it use Google Play services? HOT 1
- You can use the resize overlay and pass the enableDrag params HOT 2
- Could not run the example
- FlutterOverlayWindow.showOverlay(height: WindowSize.fullcover) wont work
- Listview scroll event conflicts with FlutterOverlayWindow drag, HOT 1
- Save overlay position
- MissingPluginException HOT 1
- Open Overlay from background when app is kill state HOT 3
- Android 14 requirese foregroundServiceType HOT 1
- Crash in production HOT 4
- Does not display all objects
- I can't display my data on the overlay window. HOT 3
- Unable to create service flutter.overlay.window.flutter_overlay_window.OverlayService: HOT 4
- Add support for android API 34 HOT 1
- Height doesn't account for status bar
- Use of `FlutterEngineGroup` instead of simply using `FlutterEngine` HOT 1
- Overlay stops sending messages to UI when it's turned on after previously being closed after app termination
- Unable to create multiple overlay window. HOT 4
- Please add more flags to show when phone is looked HOT 2
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.