Select to view content in your preferred language

No location from IndoorLocationDatasource

1491
8
03-09-2023 10:25 AM
Labels (1)
DanielLintott
New Contributor II

I am now implementing my indoors maps for Android and this has gone well so far!). The time has now come to implement the IPS system.

I have setup the IndoorLocationDatasource as described in the documentation (https://developers.arcgis.com/android/device-location/indoor-positioning/)

I am using the Java Runtime (didn't have time to learn Kotlin for this project), and after calling startAsync() the location appears to run fine and generates no errors, but the IndoorLocationDatasource returns no location.

When I remove the datasource, the map correctly defaults back to the AndroidLocationDatasource and shows the device location on the map.

I have attached some screenshots showing the code and the app one showing the Indoors (with no blue dot) and the Android (with blue dot).

The indoor data source is commented out in the code screenshot, when that line is uncommmented no blue dot is displayed. From the documentation, it would seem that if outside an IPS covered area the blue dot should use the GPS data.

Tags (3)
0 Kudos
8 Replies
AlexFomin
New Contributor

Hello Daniel,

Can you provide some more info about your problem? For example logs of IndoorsLocationDataSource statuses would help to analyze this issue.

Best regards

0 Kudos
DanielLintott
New Contributor II

Hi Alex,

I have added the following to the IndoorLocationDataSource:

indoorsLocationDataSource.addStatusChangedListener(statusChangedEvent -> {
    Log.d("LocationDataSource", statusChangedEvent.getStatus().toString());
});

 Which yields the following:

2023-03-10 10:52:32.629 13107-13107 LocationDataSource dev.dlintott.kuindoors D STARTING
2023-03-10 10:52:35.863 13107-13107 LocationDataSource dev.dlintott.kuindoors D STARTED

I can also correctly get heading updates from the ILDS, so it does appear to be running, it just never displays the blue dot

0 Kudos
ips_Dejan
Esri Contributor

hi Daniel,

assuming you know that the permissions need to be specifically adjusted depending on the radio map you are using (ble/wifi). additionally you could try to check if warningchanged listener could provide you some information if ILDS is functioning properly. 

0 Kudos
DanielLintott
New Contributor II

Hi Dejan,

Thanks for the reply!

I dug into the permissions a bit more, and found that ArcGIS Indoors has the nearby permission as well - so I've added the BLUETOOTH_SCAN permission to my manifest and requested the runtime permission for it.

I can now see in the logs that the device is started a BluetoothLE scan, so there is hope! It still doesn't seem to be displaying a blue dot from the GPS position however (like the ArcGIS Indoors app does). I shall test the the BLE part when I'm back on campus.

2023-03-10 22:57:44.748 19347-19514 BluetoothAdapter dev.dlintott.kuindoors D isLeEnabled(): ON
2023-03-10 22:57:44.753 19347-19361 BluetoothLeScanner dev.dlintott.kuindoors D onScannerRegistered() - status=0 scannerId=11 mScannerId=0

Do you know why the bluedot would not display at all, as the documentation seems to say it should fallback to GPS when outside of the BLE area.

I have also added the warning changed listener, but it doesn't appear to ever fire

0 Kudos
DanielLintott
New Contributor II

Okay, just checked the app again and it seems to have now got a location fix! So it looks like the problem was the lack of BLUETOOTH_SCAN. Looking at the android docs, it seems that's a newer change.

0 Kudos
ips_Dejan
Esri Contributor

does this mean you managed to get the blue dot displayed?

0 Kudos
DanielLintott
New Contributor II

Hi Dejan!

Yes, it does indeed! The map LocationDatasource now gets a valid location and displays the  blue dot.

It doesn't yet appear to be working for BLE path however, but I shall have to dig into that a little further as that may be something I've done in my code. The ArcGIS Indoors app, does however correctly get my location within the builidng that I've mapped for BLE

0 Kudos
ips_Dejan
Esri Contributor

great to hear you are making progress. if you stumble on any other obstacles, please do not hesitate to reach back on this thread and I'll try to provide useful suggestions.