The API request should look like this:
{
"latitude": "30.34567",
"longitude": "10.90781",
"device": "ios",
"address": "TALKAT TEST TEST"
}
I need to send latitude and longitude to my API when the app is in the killed state, background, or foreground. I only need the code for this functionality.
Your Environment
Context
Expected Behavior
Please provide me the code in React Native for both iOS and Android.
My API endpoint is: https://bfsi.staypinc.com/api/admin/add/dummy/data
The API request should look like this: { "latitude": "30.34567",
"longitude": "10.90781",
"device": "ios", "address": "TALKAT TEST TEST" } I need to send latitude and longitude to my API when the app is in the killed state, background, or foreground. I only need the code for this functionality.
Actual Behavior
Possible Fix
Steps to Reproduce
1. 2. 3. 4.
Context
Debug logs