Flutter uses a flexible system that allows you to call platform-specific APIs whether available in Kotlin or Java code on Android, or in Swift or Objective-C code on iOS. A named channel for communicating with platform plugins using asynchronous method calls.
Questions tagged [flutter-method-channel]
146 questions
2
votes
0 answers
How to Integrate siri with flutter app and also do a background api call
I want to create a flutter app which will support siri and from device's home screen, when I ask a question to siri it should recognize by the app (should not open the app) do a api request in background and get the response give it back to siri.
Is…

Viyxter
- 23
- 3
2
votes
3 answers
Keep websocket connection alive Flutter
I've been running through this for along time and i'm still stuck.
I'm working on a chat app using Flutter/Dart that it's based on Websocket .
I would like to keep the state of a connected user alive even if he terminates the app.
At this moment…

Outail Ouni
- 113
- 1
- 4
2
votes
1 answer
no implementation found for method create on channel flutter/platform views
I'm adding flutter module into Android native application, this module contain google map, when the flutter module get initialized, it rout to flutter page but the map do not show.
when I debug I get this exception:
MissingPluginException : no…

Adil Sakout
- 75
- 1
- 10
2
votes
1 answer
Trouble sending Uint8List from Flutter to Android[Java] using method channels
I have a method channel setup on Flutter to send Uint8List to Android[Java]. Android is receiving the data but it looks like the bytes are getting wrapped at 127.
Ex: if I send [254, 100, 32] from flutter, it shows up as [-2, 100, 32] in…

DrkStr
- 1,752
- 5
- 38
- 90
2
votes
0 answers
Waiting for an activity inside a method channel method call and then returning results to flutter
I have a method channel on flutter from which I call a native java method startCamera. The method startCamera spawns another activity to open camera with startActivityForResult. Now my problem is when the new activity is spanned with…

Shashank
- 895
- 1
- 10
- 20
2
votes
1 answer
How to invoke flutter method from broadcastReceiver class?
I am trying to awake flutter method on a received call. I already done the receiving part, but I can't awake flutter method yet.
I tried calling method channel in onReceive() method in MainActivity.kt class, but it gives me error. method channel…

Titas Černiauskas
- 1,025
- 1
- 5
- 17
2
votes
0 answers
Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++ after close the app
I use pahoo mqtt on android side and implement it on flutter to make it run when the app was closed. However the client are still connected and still get the message from brokker after i close the app.
But when i open the app again it seems it…

cahyowhy
- 553
- 2
- 9
- 26
2
votes
0 answers
Flutter eventchannel & methodchannel performance
I'm planning on adding the native twilio SDK on my Flutter project for receiving voice calls, but I'm worried about the performance since the native code that flutter can communicate with runs on the main thread and I read that it can lead to…

Ahmed
- 21
- 2
- 3
1
vote
1 answer
Future is not executed in Flutter side while called through FlutterMethodChannel from iOS
I'm calling a Flutter method from the native side, I have no problem with Android but iOS is not working. The Future is not executed and the result is never returned to iOS.
Here is a simple example.
Dart/Flutter side:
MethodChannel _methodChannel =…

Plumillon Forge
- 1,659
- 1
- 16
- 31
1
vote
0 answers
Flutter WorkManager Pigeon -> Unable to establish connection on channel
I have been using Pigeon to call Android native side for data. However when i try to do the same thing in a WorkManager task, it just throws PlatformException(channel-error, Unable to establish connection on channel., null, null).
I suspect the…

Nicholas
- 479
- 3
- 12
1
vote
0 answers
Use MethodChannel from an Isolate without plugin
Is it possible to call a native function using MethodChannel from an Isolate? The documentation only shows how to adapt the native code in the case of plugins. However, I'm using MethodChannel as described in the page linked above, without creating…

cpper
- 142
- 2
- 13
1
vote
0 answers
Flutter Method Channel Lifetime
I'm wondering if the following code is memory safe:
Future getValueFromNative() async{
const channel = MethodChannel("channelName");
var result = await channel.invokeMethod("myMethod");
return result;
}
I wonder if I will…

Mycotina
- 369
- 3
- 11
1
vote
2 answers
Platform Method Channel From iOS Side to Flutter
so i have an issue when trying to implement the platform method channel for my flutter project, When i try to invoke a method from flutter to ios side, it gets triggered and everything is working perfectly but when i try to invoke a method from ios…

Mehdi9512
- 13
- 3
1
vote
1 answer
How to handle back button on appBar of Scaffold layout in flutter module and navigate to previous page on the host app
I have a question, I have to create a flutter module and integrate it directly into the host app. I want to handle the back button on flutter UI by clicking it and navigating to the previous page on the host app. I use go_router to handle navigation…
1
vote
0 answers
How to set broadcast receiver for a scan device which has set keyboard output mode when I actually want to receive the intent output?
I am a new flutter developer for an app which works with scan devices. I have no knowledge when it comes to Kotlin code. We now use the UROVO DT50 Scanner which uses per default the Keyboard output mode. Problem with this mode is that I am receiving…

Yuki
- 255
- 1
- 2
- 9