-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: server side #50
Comments
it was answered in another issue I believe; instead or reading data from $_POST you need to obtain the data sent to your PHP script by: $data = file_get_contents('php://input'); simple logging: file_put_contents("/tmp/tracklog", file_get_contents('php://input'),"\n", FILE_APPEND); |
Thanks, problem was solved!!! |
Thanks @georgetudor On Sunday, August 3, 2014, YairHadari notifications@github.com wrote:
Snet from Gmail Mobile |
Thank you Chris for a great plugin :) |
FYI Android has been completely refactored in Premium Version
http://transistorsoft.github.io/cordova-background-geolocation/ |
Hi,
From JS I'm calling PHP file that are creating a text file with $_POST['location'] - only for tests.
The problem is that nothing is being passed to $_POST['location'] .
The JS is:
bgGeo.configure(callbackFn, failureFn, {
url: 'http://MyServer.com/WriteBackgroundToDB.php', // <-- only required for Android; ios allows javascript callbacks for your http
params: { // <-- Android ONLY: HTTP POST params sent to your server when persisting locations.
auth_token: 'user_secret_auth_token',
foo: 'bar'
},
headers: { // <-- Android ONLY: Optional HTTP headers sent to your configured #url when persisting locations
'X-Foo': 'BAR'
},
desiredAccuracy: 10,
stationaryRadius: 20,
distanceFilter: 30,
debug: true, // <-- enable this hear sounds for background-geolocation life-cycle.
notificationTitle: 'Background tracking', // <-- android only, customize the title of the notification
notificationText: 'ENABLED' // <-- android only, customize the text of the notification
});
The PHP code is:
Can someone assist please?
The text was updated successfully, but these errors were encountered: