Skip to content Skip to sidebar Skip to footer

Get Json Response From Proximitykit Kiturl Android

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 websit

Solution 1:

Making a web URL request is not the supported way to work with ProximityKit. Use the iBeaconDataUpdate callback and read from the provided IBeaconData to get the various metadata.

For example, to get say the welcomeMessage metadata:

public void iBeaconDataUpdate(IBeacon iBeacon, 
                              IBeaconData data, 
                              DataProviderException e) {
    if (iBeacon != null && data != null) {
        String displayString = iBeacon.getProximityUuid() + " " +
                iBeacon.getMajor() + " " + iBeacon.getMinor() + "\n" +
                "Welcome message:" + data.get("welcomeMessage");
        Log.d(TAG, "iBeacon Data: " + displayString);
    }
}

Also, be aware that ProximityKit will automatically register all of these regions for you. So you won't need to then tell the application it needs to start monitoring for them.

For more information on the ProximityKit API have a look at their Javadocs: http://developer.radiusnetworks.com/ibeacon/android/pro/javadocs/com/radiusnetworks/proximity/ProximityKitNotifier.html

Post a Comment for "Get Json Response From Proximitykit Kiturl Android"