Search code examples
androidindoor-positioning-system

Indoor Atlas: Cant get Android SDK example to run


I just downloaded the Indoor Atlas SDK and attempted to run. There were various small errors that I managed to fix but now stuck. The app installs (via emulator and on a Galaxy tab) but both giving me the same error:

E/AndroidRuntime﹕ FATAL EXCEPTION: IdaSensorReadingManager
    Process: xxxx.indooratlas, PID: 1632
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.Sensor.getType()' on a null object reference
            at com.indooratlas._internal.ai.a(Unknown Source)
            at com.indooratlas._internal.ai.b(Unknown Source)
            at com.indooratlas._internal.ai$a.handleMessage(Unknown Source)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.os.HandlerThread.run(HandlerThread.java:61)

Is this standard Android error or Indoor Atlas specific?

SDK version: indooratlas-android-sdk-release-1.3.1-108 Tested on Android 4.4 and 5.0

03-16 16:21:17.971  11646-11646/com.example.indooratlas E/SELinux﹕ [DEBUG] seapp_context_lookup: seinfoCategory = default
03-16 16:21:17.971  11646-11646/com.example.indooratlas D/dalvikvm﹕ Late-enabling CheckJNI
03-16 16:21:17.971  11646-11646/com.example.indooratlas D/dalvikvm﹕ Try to disable coredump for pid 11646
03-16 16:21:17.971  11646-11646/com.example.indooratlas D/dalvikvm﹕ Process 11646 nice name: com.example.indooratlas
03-16 16:21:17.971  11646-11646/com.example.indooratlas D/dalvikvm﹕ Extra Options: not specified
03-16 16:21:18.101  11646-11646/com.example.indooratlas D/dalvikvm﹕ GC_FOR_ALLOC freed 913K, 28% free 4868K/6704K, paused 3ms, total 3ms
03-16 16:21:18.111  11646-11646/com.example.indooratlas D/dalvikvm﹕ GC_FOR_ALLOC freed 824K, 29% free 4907K/6816K, paused 2ms, total 3ms
03-16 16:21:18.111  11646-11646/com.example.indooratlas D/dalvikvm﹕ GC_FOR_ALLOC freed 874K, 29% free 4913K/6848K, paused 3ms, total 3ms
03-16 16:21:18.231  11646-11646/com.example.indooratlas D/dalvikvm﹕ GC_FOR_ALLOC freed 675K, 27% free 5051K/6848K, paused 4ms, total 4ms
03-16 16:21:18.261  11646-11646/com.example.indooratlas D/AbsListView﹕ Get MotionRecognitionManager
03-16 16:21:18.291  11646-11646/com.example.indooratlas D/MainActivity﹕ Connecting with IndoorAtlas, apiKey: my-api-ley
03-16 16:21:18.321  11646-11646/com.example.indooratlas I/dalvikvm﹕ Failed resolving Lcom/indooratlas/_internal/bg$b; interface 150 'Landroid/net/ConnectivityManager$OnNetworkActiveListener;'
03-16 16:21:18.321  11646-11646/com.example.indooratlas W/dalvikvm﹕ Link of class 'Lcom/indooratlas/_internal/bg$b;' failed
03-16 16:21:18.321  11646-11646/com.example.indooratlas E/dalvikvm﹕ Could not find class 'com.indooratlas._internal.bg$b', referenced from method com.indooratlas._internal.bg.b
03-16 16:21:18.321  11646-11646/com.example.indooratlas W/dalvikvm﹕ VFY: unable to resolve new-instance 1515 (Lcom/indooratlas/_internal/bg$b;) in Lcom/indooratlas/_internal/bg;
03-16 16:21:18.321  11646-11646/com.example.indooratlas D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x000c
03-16 16:21:18.321  11646-11646/com.example.indooratlas I/dalvikvm﹕ Failed resolving Lcom/indooratlas/_internal/bg$b; interface 150 'Landroid/net/ConnectivityManager$OnNetworkActiveListener;'
03-16 16:21:18.321  11646-11646/com.example.indooratlas W/dalvikvm﹕ Link of class 'Lcom/indooratlas/_internal/bg$b;' failed
03-16 16:21:18.321  11646-11646/com.example.indooratlas D/dalvikvm﹕ DexOpt: unable to opt direct call 0x2fe9 at 0x0e in Lcom/indooratlas/_internal/bg;.b
03-16 16:21:18.421  11646-11662/com.example.indooratlas D/dalvikvm﹕ Trying to load lib /data/data/com.example.indooratlas/files/assetlib.so 0x438b36a0
03-16 16:21:18.471  11646-11662/com.example.indooratlas D/houdini﹕ [11662] Loading library(version: 4.0.8.45720 RELEASE)... successfully.
03-16 16:21:18.521  11646-11662/com.example.indooratlas D/dalvikvm﹕ Added shared lib /data/data/com.example.indooratlas/files/assetlib.so 0x438b36a0
03-16 16:21:18.561  11646-11646/com.example.indooratlas D/MainActivity﹕ IndoorAtlas instance created
03-16 16:21:18.571  11646-11662/com.example.indooratlas I/SensorManagerA﹕ getReportingMode :: sensor.mType = 1
03-16 16:21:18.581  11646-11662/com.example.indooratlas D/SensorManager﹕ registerListener :: 1, K2DH Acceleration Sensor, 33333, 0,
03-16 16:21:18.581  11646-11662/com.example.indooratlas W/dalvikvm﹕ threadid=11: thread exiting with uncaught exception (group=0x433111a0)
03-16 16:21:18.581  11646-11662/com.example.indooratlas E/AndroidRuntime﹕ FATAL EXCEPTION: IdaSensorReadingManager
Process: com.example.indooratlas, PID: 11646
java.lang.NullPointerException
        at com.indooratlas._internal.ai.a(Unknown Source)
        at com.indooratlas._internal.ai.b(Unknown Source)
        at com.indooratlas._internal.ai$a.handleMessage(Unknown Source)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:146)
        at android.os.HandlerThread.run(HandlerThread.java:61)
03-16 16:21:18.911  11646-11646/com.example.indooratlas E/IMGSRV﹕ :0: PVRDRMOpen: TP3, ret = 66
03-16 16:21:18.921  11646-11646/com.example.indooratlas E/IMGSRV﹕ :0: PVRDRMOpen: TP3, ret = 70
03-16 16:21:18.921  11646-11646/com.example.indooratlas E/IMGSRV﹕ :0: PVRDRMOpen: TP3, ret = 71
03-16 16:21:18.931  11646-11646/com.example.indooratlas E/IMGSRV﹕ :0: PVRDRMOpen: TP3, ret = 71
03-16 16:21:18.931  11646-11646/com.example.indooratlas E/IMGSRV﹕ :0: PVRDRMOpen: TP3, ret = 71
03-16 16:21:18.931  11646-11646/com.example.indooratlas E/IMGSRV﹕ :0: PVRDRMOpen: TP3, ret = 73
03-16 16:21:18.961  11646-11646/com.example.indooratlas D/OpenGLRenderer﹕ Enabling debug mode 0
03-16 16:21:22.171  11646-11646/com.example.indooratlas D/AbsListView﹕ onDetachedFromWindow

Thanks


Solution

  • You currently (with version 1.3.1) cannot run IndoorAtlas's Android SDK using an emulator. IndoorAtlas's technology is mostly based on magnetic positioning (i.e. using magnetic field sensor and fusing other sensors too). You might be able to run the SDK but unless you manage to simulate those sensors in your emulator, you would not get too far as you would not get any locations. See key features of IndoorAtlas's service: https://www.indooratlas.com/features. There are some projects for simulating sensors, such as this: https://code.google.com/p/android-sensor-emulation/ - but I'd recommend using a real device if possible. Note that in order to do a full positioning test, you also need to create a magnetic map of your location (unless there is an already mapped public location nearby), see developer website on instructions how to get it done: https://developer.indooratlas.com/dashboard (Collect Data).