Inquiries about ABSensor N01

Hello this is paul at south korea who developing program for ABSensor N01.

while i develop abeacon mode, An error has occurred.

error message is here.

Process: com.gomirang.gboxapp, PID: 13759
java.lang.NullPointerException: Attempt to invoke virtual method ‘int java.lang.String.length()’ on a null object reference

and, my code is here.
beacon_connection.connectGattToWrite(new AprilBeaconConnection.MyWriteCallback(){
@Override
public void connected() {
super.connected();
}
}, null);

maybe error cause password has null. (but, password was null in sample code)

please reply, thanks you.

Which example code did you follow? It doesn’t need password when connection.

Do you develop application for iBeacon only? I suggest you use the altBeacon library instead. Our andriod SDK is deprecated.

thanks you for reply.

i want to receive data for accelerometer while app running. so did try to connect gatt to ibeacon with null password, and then an error that ‘java.lang.NullPointerException’ has occurred.

so, i want to know easy way to get data for accelerometer in android.

thanks you again.

N01 advertises accelerometer data directly. You don’t need connect N01. Just listen the advertising data from N01.

See our wiki for the advertising data format of N01

thanks you to reply quickly.

do you mean just get from scan record while ble scan? or will be need to bond or connect?

Yes. Just scan and don’t connect it.

thanks you for reply. I solved the problem.