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(
at com.example.a3sensorsinone.MainActivity.onClick(
at android.view.View.performClick(
at android.view.View$
at android.os.Handler.handleCallback(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(

Its seems not call accelerometer interface for metawear lib.
Thank you very much!

Sign In or Register to comment.