cordova-plugin-background-geolocation icon indicating copy to clipboard operation
cordova-plugin-background-geolocation copied to clipboard

Sending data

Open sepullupes opened this issue 5 years ago • 6 comments

Your Environment

  • Plugin version:
  • Platform: iOS or Android
  • OS version:
  • Device manufacturer and model:
  • Running in Simulator:
  • Cordova version (cordova -v):
  • Cordova platform version (cordova platform ls):
  • Plugin configuration options:
  • Link to your project:

Context

Just want to ask something about data sending, i am using asp.net as server to retrieve data from cordova-plugin-background-geolocation mobile apps. i try to use request.param to read the data but ufortunately i did'nt get the data from postTemplate: { lat: '@latitude', lon: '@longitude', act:'APOKONO', provider: '@provider', locationProvider: '@locationProvider', time: '@time', accuracy: '@accuracy', speed: '@speed', altitude: '@altitude', bearing: '@bearing'
} only retrieve data from header httpHeaders: { 'AUTH': 'JSDFSDS77SDF8SD56S5DF86SD9F799SAD7U' }

so can i know how the actual this plugin work to send the data to server?

Expected Behavior

============ READ FORM ================= ============ END FORM ================= ============ READ PARAM ================= live_loc:MOBILE_LOCATION_TEST ALL_HTTP:HTTP_CONNECTION:Keep-Alive HTTP_CONTENT_LENGTH:199 HTTP_CONTENT_TYPE:application/json HTTP_ACCEPT_ENCODING:gzip HTTP_HOST:192.168.8.165 HTTP_USER_AGENT:Dalvik/2.1.0 (Linux; U; Android 10; LYA-L29 Build/HUAWEILYA-L29) HTTP_AUTH:JSDFSDS77SDF8SD56S5DF86SD9F799SAD7U

ALL_RAW:Connection: Keep-Alive Content-Length: 199 Content-Type: application/json Accept-Encoding: gzip Host: 192.168.8.165 User-Agent: Dalvik/2.1.0 (Linux; U; Android 10; LYA-L29 Build/HUAWEILYA-L29) AUTH: JSDFSDS77SDF8SD56S5DF86SD9F799SAD7U

APPL_MD_PATH:/LM/W3SVC/1/ROOT/dbagent APPL_PHYSICAL_PATH:D:\System Development\Published\dBAgent
AUTH_TYPE: AUTH_USER: AUTH_PASSWORD: LOGON_USER: REMOTE_USER: CERT_COOKIE: CERT_FLAGS: CERT_ISSUER: CERT_KEYSIZE: CERT_SECRETKEYSIZE: CERT_SERIALNUMBER: CERT_SERVER_ISSUER: CERT_SERVER_SUBJECT: CERT_SUBJECT: CONTENT_LENGTH:199 CONTENT_TYPE:application/json GATEWAY_INTERFACE:CGI/1.1 HTTPS:off HTTPS_KEYSIZE: HTTPS_SECRETKEYSIZE: HTTPS_SERVER_ISSUER: HTTPS_SERVER_SUBJECT: INSTANCE_ID:1 INSTANCE_META_PATH:/LM/W3SVC/1 LOCAL_ADDR:192.168.8.165 PATH_INFO:/dbagent/j PATH_TRANSLATED:D:\System Development\Published\dBAgent\j QUERY_STRING:live_loc=MOBILE_LOCATION_TEST REMOTE_ADDR:192.168.8.142 REMOTE_HOST:192.168.8.142 REMOTE_PORT:49250 REQUEST_METHOD:POST SCRIPT_NAME:/dbagent/j SERVER_NAME:192.168.8.165 SERVER_PORT:80 SERVER_PORT_SECURE:0 SERVER_PROTOCOL:HTTP/1.1 SERVER_SOFTWARE:Microsoft-IIS/10.0 URL:/dbagent/j HTTP_CONNECTION:Keep-Alive HTTP_CONTENT_LENGTH:199 HTTP_CONTENT_TYPE:application/json HTTP_ACCEPT_ENCODING:gzip HTTP_HOST:192.168.8.165 HTTP_USER_AGENT:Dalvik/2.1.0 (Linux; U; Android 10; LYA-L29 Build/HUAWEILYA-L29) HTTP_AUTH:JSDFSDS77SDF8SD56S5DF86SD9F799SAD7U ============ END PARAM =================

Actual Behavior

Possible Fix

Steps to Reproduce

Context

Debug logs

sepullupes avatar May 13 '20 21:05 sepullupes

Sending post is not working either on Laravel.

Header has been sent, but not content body

I wonder why...

darron1217 avatar Jul 15 '20 00:07 darron1217

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 18 '21 07:01 stale[bot]

Cannot even get the request on slim.

isinocasio avatar Jan 26 '21 17:01 isinocasio

In case someone has stucked with this (in php at least), I could retrieve the information via $rawData = file_get_contents("php://input") Could not retrieve information via $request nor $post variable, thats because it is not a "common webform post kind".

isinocasio avatar Jan 28 '21 21:01 isinocasio

$_POST and $_REQUEST variables are empty. I also have got only headers

Vasek18 avatar Feb 09 '21 16:02 Vasek18

$_POST and $_REQUEST variables are empty. I also have got only headers

Try: $data = file_get_contents("php://input");

isinocasio avatar Feb 09 '21 22:02 isinocasio