Open dilipkaklotar opened 1 year ago
When app is killed the main activity gets destroyed and therefore your method channel code in kotlin also gets removed. This is the reason why your method channel is not being called.
@arpitsharma007 So what is the solution for that. and also application is in foreground then also I am not able to call method channel.
i am also trying to call method channel but its not working. can anyone help me on this.
@ranjitIN @dilipkaklotar have you guys found a solution to this yet?
@Leylan24 yup if you want to call method channel in flutter in background service create a flutter package for all of your method channel and use the package on your dependency. Developing packages and plugins
@ranjitIN so wrap the plugins inside a package? Also if i used dart:ui package inside any of the plugins then would it still work ?
@Leylan24 yup if you want to call method channel in flutter in background service create a flutter package for all of your method channel and use the package on your dependency. Developing packages and plugins
Hello, i created a flutter package and added it as a dependency to my project, also added the method im trying to call inside the MainActivity.kt of the new flutter package,(i test it by running it and work) but when im trying to call the method on my project throws Unhandled Exception: MissingPluginException(No implementation found for method getLocation on channel location_channel), someone knows whats happening?
any method channel thats requires native Activity class will not works with this plugin
Below code are my android MainActivity.kt
BACKGROUND SERVICE CODE AS MENTIONED BELOW
Kindly guide me why its not working.