-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I use plugin inside callback? #34
Comments
Can you show |
@RomanJos I followed all 3 steps. |
@vimalmistry The Document and the code need to be updated, I will do it this weekend. Please be hold until then. |
@mehdok ohh :( Did you updated doc? I found some new informations in readme.md |
Minimum android sdk is 16. |
Actually I modified the README 3 days ago so make sure to match changes on your project, it may resolve your issues 😉 |
@RomanJos Sorry your changes in document isn't merged yet. If there is something that can help @vimalmistry please copy paste it here. |
No I mean the one that are already merged
Its LocationService.kt on the readme |
Thanks for replies. I actually configured using old doc (Application.kt). It works very well in most devices Except some devices and also I can not run it on emulator. But in physical device it works. But I found service is terminated after reboot. Is there any quick fix to auto start on reboot. |
Thats strange it work on some devices but not even on the emulator, have you tried to run the example ? Starting at boot mean that we need a way to start the plugin directly from kotlin and not dart and I think it would require a lot of changes idk And i do the same lol |
@vimalmistry I'm not sure why you can not get it working on some device or simulator, But I can confirm that the plugin is working fine on simulator, both Android and iOS. On Android I can add the |
Hey, can you tell me how you managed to solve the issue? I'm getting the same problem with SharedPreferences package, while I'm trying to use it on the static callback function |
Have you followed the steps in the documentation? https://github.com/rekab-app/background_locator/wiki/Use-other-plugins-in-callback |
i have same case and problem with you, but i follow step on https://github.com/rekab-app/background_locator/wiki/Use-other-plugins-in-callback and it's work, here is my Application.kt
and change the Manifestfile.
you need add shared pref plugin,change
to this
and change
to this
and in the static callback just use the shared pref plugin as usual
|
@mehdok Any chance to convince you to make this implementation for Android? Almost 90% here in Brazil are android devices: https://gs.statcounter.com/os-market-share/mobile/brazil And worldwide is not so different: https://gs.statcounter.com/os-market-share/mobile/worldwide |
@wemersonrv I think I can do that this weekend. |
Below is the Java equivalent to the above if your project doesn't support Kotlin
|
@MazEbeid thanks! can you help with ios configuration? |
I have no experience with iOS but this is very important to me at the
moment so I am spending time on it and I will look into how I can
contribute more.
I have tested last night the plugin while the app was in the background for
2hrs and I got a ping on iOS every 1 second or two.
I was out for 2 hrs and spent an hour whole the phone was locked and
stationary and still got some good pings.
I will be moving on to trying to get this to work while the app is
suspended. I think to start with I need to figure out if this is something
that can be done by firing a background service .. the problem with those
is that they cant be faster than 15minutes and also this is not guaranteed
and depends on how the OS prioritises your app.
…On Sat, 13 Jun 2020, 07:07 Taras Tataryn, ***@***.***> wrote:
@MazEbeid <https://github.com/MazEbeid> thanks! can you help with ios
configuration?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKAXPSUS54HNWHBI5GSF63DRWMJT5ANCNFSM4ME5WDDQ>
.
|
I want to call api on location change. I want to attach JWT_TOKEN which is stored in shared preferences. I am facing.
E/flutter (10000): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)
The text was updated successfully, but these errors were encountered: