Overview of application: 1. Signup for Radius Developer's proximity kit and create Fences. 2. Get JSON response from PKKitURL in ProximityKit.properties file downloaded from website. 3. Parse JSON response to get lat and long. Get user's location and check for proximity.
Currently, i have done signing up, creating fences, downloading .properties file and all other basic things needed to integrate the ProximityKit's SDK.
Now I want to get the JSON response from the URL that's present in .properties file. I can retrieve the URL using the following code.
Configuration config = new Configuration(this);
Log.d(Const.DEBUG,
"DeviceID = " + config.getDeviceId() + "\nKitUrl = "
+ config.getKitUrl() + "\nLicenseKey = "
+ config.getLicenseKey());
Sample JSON response:
{"kit":{"id":2837,"name":"My Kit","created_at":"2014-06-20T10:42:46.999Z","updated_at":"2014-06-20T10:42:46.999Z","links":{"map":"/api/maps/823"},"map":{"id":823,"name":"Wasp Hyderabad","created_at":"2014-06-20T16:20:13.504Z","updated_at":"2014-06-24T12:08:47.470Z","location":["17.4367","78.505243"],"overlays":[{"type":"circle","id":1968,"name":"Wasp Hyd Office","identifier":"pk-circleoverlay-1968","center":[17.443815,78.502657],"radius":197.846424},{"type":"circle","id":1969,"name":"Secunderabad","identifier":"pk-circleoverlay-1969","center":[17.437274,78.504884],"radius":257.538757}]},"ibeacons":[]}}
If i directly try to access the url and get the response, i get a AuthFailureError, which i guess is because of some authentication issue. My issue is how do i get this JSON response to my application?
I have all the required parameters in the .properties file, but i am not sure, how to send them to the server, to authenticate. Can anyone, who has been using RadiusNetwork's ProximityKit, help me out.
iBeaconDataUpdate
? – Eyecup