There is 2 user. 1st user is logged into admin & app kept into background so we need to send it's current location through web service. 2nd user is checking 1st user location on the map. App is developed into React Native. asked 07 Jan '20, 12:31 Kailas B |
The answers and comments on your previous question apply here too, including Stackoverflow's "how to ask a good question".
it's just simple question I've ask. Can not post code here. can you suggest me the whats wrong in the question so I can update rather then down vote the question.
As I've already said, read https://stackoverflow.com/help/how-to-ask . One of the suggestions in there is "Help others reproduce the problem". How exactly can people do this with the level of information that you have provided so far?
Another problem is that (at first glance) it doesn't seem to be related to OpenStreetMap at all, just about how react native apps work on a mobile device, the OS of which you're keeping secret from us.
EDIT: Apparently it's Android.
How to trigger web service after every 1 min to get user current location when app is in background state.
The OS should Be minimum jelly been to latest android 10 this should be work.
Have you tried reading some of the answers at https://duckduckgo.com/?q=stackoverflow+background+location+android&t=ffsb&ia=web ? There are a number of questions, some of which are partial duplicates of each other, and some of which touch on issues specific to later Android OS versions.
However, first I'd suggest taking a step back and thinking about how you are obtaining locations (from GPS? from Google? from some other provider?) and asking what's best for your application, for example - does it need to work with or work without Google Play Services? That'll allow you to cut down the stackoverflow answers into a list that applies to your situation, and go forward from there.