0

Intending to implement the monitoring and ranging of the beacons in an Android Application with IBMMobileFirst.

Link to the Procedure and Sample Project

Also used the Android Beacon Library for the Application.

Successfully installed the apk in Samsung Galaxy Tab 3 , but the option to Load Beacons and Triggers is returning a 500 error and thus not able to detect the nearby beacons.

error is - WLBeaconsANdTriggersJSONStoreManager.loadBeaconsAndTriggers() failed: WLResponse[invocationContext=null,reponseText=,,status=500]WLFailResponse[errorMsg=Unexpected errorCode occured.Please try again.,errorCode=UNEXPECTED_ERROR]

The wlclient.properties file seems to need some amendments ,

wlServerProtocol = http
wlServerHost = 
wlServerPort = 10080
wlServerContext = /BeaconsNative/
wlAppId = AndroidNativeBeacons
wlAppVersion = 1.0
wlEnvironment = Androidnative
wlUid = wY/mbnwKTDDYQUvuQCdSgg==
wlPlatformVersion = 7.0.0.00.20150227-0916

Also ,

The registration of the beacons is to be done , it makes use of the (PUT) Rest Api for the Beacons Detection. But not very clear that what is the use of the Rest Api , for detecting the nearest Beacon to the device.

In the native android project of Beacons with MobileFirst , this Api returns a 500 error , and indeed not detecting the Nearby Beacons.

Can someone help with the above configuration, or some functionality where could be going wrong .Thanks. Help is appreciated.

Learner
  • 800
  • 1
  • 12
  • 34

1 Answers1

0

The Android client needs to connect to the server for the sample to work.

For this , in wlclient.properties wlServerHost should be populated with your MFPF server's ip.

Detecting the beacon occurs at the client side (on the device) and not at the server. The REST API is used to register customer-specific beacon data with the server. For example, the store or location where the beacon is deployed. The REST APIs are used to manage the beacon data stored in the server.

More details here -

https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/advanced-topics/working-with-beacons/

http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/apiref/r_restapi_beacons_put.html

http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/apiref/r_restapi_beacon_triggers_put.html

Vivin K
  • 2,681
  • 1
  • 11
  • 14