Commit 28e81238 authored by Chris Scott's avatar Chris Scott

Update readme

parent 7bb7d9f4
......@@ -115,7 +115,9 @@ On iOS the plugin will execute your configured ```callbackFn```. You may manuall
Android **WILL NOT** execute your configured ```callbackFn```. The plugin manages sync-ing GeoLocations to your server automatically, using the configured ```url```, ```params``` and ```headers```. Since the Android plugin must run as an autonomous Background Service, disconnected from your the main Android Activity (your foreground application), the background-geolocation plugin will continue to run, even if the foreground Activity is killed due to memory constraints. This is why the Android plugin cannot execute the Javascript ```callbackFn```, since your app is not guaranteed to keep running -- syncing locations to the server must be handled by the plugin.
The Android plugin sends an HTTP POST to your configured ```url``` with ```Content-Type: application/json```. The JSON location-data is encoded into the Request Body. PHP people have [trouble with this](https://github.com/christocracy/cordova-plugin-background-geolocation/issues/50). In PHP, find the raw JSON body with ```$data = file_get_contents('php://input');```.
The Android plugin sends an HTTP POST to your configured ```url``` with ```Content-Type: application/json```. The JSON location-data is encoded into the Request Body. PHP people have [trouble with this](https://github.com/christocracy/cordova-plugin-background-geolocation/issues/50). In PHP, find the raw JSON body with:
```$data = file_get_contents('php://input');```.
```
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment