In MainActivity.kt use FlutterFragmentActivity instead of FLutterActivity Also if your app crashes on Android U due to some security exception add following permission to Android Manifest
@kuttusan89112 күн бұрын
Sir can we get live location on this on background
@codingwithnobody11 күн бұрын
yes for android, iOS is little more strict
@harunsimsek7246 ай бұрын
When the application is closed, location listening works, but when this location is updated, I want to run a service, I want to update the database, do you have a solution for this?
@codingwithnobody6 ай бұрын
You can use RoomDB for android & CoreData for iOS
@tarikulislam27297 ай бұрын
Will this work if the app is terminated or closed by the user?
@codingwithnobody7 ай бұрын
Yes as the foreground service is still running
@tarikulislamtuhin55447 ай бұрын
I got this error when I terminated/closed the app. Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: com.example.apprunbgrnd. Response ID: 21
@codingwithnobody7 ай бұрын
Hmm, are you still able to see the foreground service, because you should update the location in notification and maybe add a check
@_ritesh3059 ай бұрын
i get that you don't want to share the code cause people will skip watching your video but at least show all the imports and code so that a beginner would not get any kind of error
@codingwithnobody9 ай бұрын
If you use android studio or Xcode it will automatically ask to import the relevant imports
@KhushiMishra-nl3vt10 ай бұрын
Is this will only work for iOS?
@codingwithnobody10 ай бұрын
Android as well
@KhushiMishra-nl3vt10 ай бұрын
Ohh one more doubt which will be better using the above method or background_locator_2 package will work?
@codingwithnobody10 ай бұрын
@@KhushiMishra-nl3vt I never used background_locator_2. You should use what works best for you
@darkknight8582Ай бұрын
can you give me the source code
@codingwithnobodyАй бұрын
Sorry I no longer have it
@shahilc-u6d3 ай бұрын
Can you share this git repo ?
@codingwithnobody3 ай бұрын
Sorry I no longer have the code, you can copy it from video