AnsweredAssumed Answered

Custom LocationDataSource error on Start

Question asked by DanKil on Jan 7, 2018
Latest reply on Jan 9, 2018 by sgill-esristaff

I want to create a custom LocationDataSource class. It works all fine but sometimes there is ArcGISRuntimeException thrown by the onStartCompleted method and sometimes everything works fine.

 

@Override
protected void onStart() {
    onStartCompleted(null);
}

The stack trace is:

(at de.fxreality.aRFragment.slidePanel.MyLocationDataSource.onStart(MyLocationDataSource.java:16) is linked to the onStartCompleted method)

E/AndroidRuntime: FATAL EXCEPTION: Thread-8848
Process: de.fxreality, PID: 11112
Theme: themes:{}
com.esri.arcgisruntime.ArcGISRuntimeException: Invalid argument
at com.esri.arcgisruntime.internal.jni.CoreLocationDataSource.nativeHandleStart(Native Method)
at com.esri.arcgisruntime.internal.jni.CoreLocationDataSource.a(SourceFile:125)
at com.esri.arcgisruntime.location.LocationDataSource.onStartCompleted(SourceFile:326)
at de.fxreality.aRFragment.slidePanel.MyLocationDataSource.onStart(MyLocationDataSource.java:16)
at com.esri.arcgisruntime.location.LocationDataSource$a$1.run(SourceFile:457)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

Maybe someone can tell me what the problem is. I can't find any solution to it. I tried calling the method with an Exception object but then the LocationDataSource wouldn't start at all.

Outcomes