Uzair Usman
Uzair Usman

Reputation: 21

How to Get Real-Time Location of Vendors When App is Not Running in React Native?

I'm building a mobile app using React Native for the frontend and Laravel 11 for the backend APIs.

App Requirements:

Challenges I'm Facing:

  1. Getting Vendors' Real-Time Location When App is Not Running
  1. Updating Location in Database

What I’ve Tried:

Upvotes: 1

Views: 36

Answers (2)

Irfanali Saiyad
Irfanali Saiyad

Reputation: 46

I also tried for this type of functionality but in react native i can not find any solution , You want to use native code for this functionality. Create foreground services in android java code and then use in react native for start them and store in java code write code for that service like if vendor move on some distention then it call api or on every specific time it call like every 10 min

Upvotes: 0

Thịnh Phạm
Thịnh Phạm

Reputation: 31

IOS only accept tracking location when foreground and background we can't do anything when app kill. Android, we can use service foreground when kill app. You can find so many example for this

Upvotes: 0

Related Questions