Android app crash after start button pushed for accelerometer
Hi, i have MMR and try to create my own up.
The idea is to take accelerometer and gyroscope from MMR and use it with my own start-stop buttons.
I have used code for accelerometer from githab and when i push start button the app crash with next message:
672-8672/com.example.a3sensorsinone E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.a3sensorsinone, PID: 8672
java.lang.NullPointerException: Attempt to invoke interface method 'com.mbientlab.metawear.ConfigEditorBase com.mbientlab.metawear.module.Accelerometer.configure()' on a null object reference
at com.example.a3sensorsinone.MainActivity.startAccelerometer(MainActivity.java:231)
at com.example.a3sensorsinone.MainActivity.onClick(MainActivity.java:163)
at android.view.View.performClick(View.java:5076)
at android.view.View$PerformClick.run(View.java:20279)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
Its seems not call accelerometer interface for metawear lib.
Thank you very much!