Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Update latitude and longitude in service when app is background in react native

I'm try to update a location in server every 15 minute in react native. So, how can I do that...

I'm using react-native-maps for map api

like image 687
Akshay I Avatar asked Sep 05 '25 13:09

Akshay I


1 Answers

I was struggling with the same issue for two days, you have to consider the following points.

1: If you come from native Android (using Java), you must be familiar with the concept of background services, unfortunately, it doesn't support in react-native so far.

2: if you want to accomplish your task you have to do the same as me I mean using an authorized library.

3: after a lot of googling I used this library, which I think you need to use it.

4: and finally this library is not free for commercial use in android so you must pay for them, it's so easy and so powerful.

like image 180
Abdu4 Avatar answered Sep 08 '25 10:09

Abdu4