Android Question bluetoothmanager null pointer

b4a-newbie

New Member
Hello devs.

I am trying b4a and building a simple bt app to talk to an esp32.

Following other threads I did manage to get it working, but lately I have been getting this error that prevents b4a-bridge from replacing the app in the phone/emulator.

I have to manually forcefuly remove the app using adb before being able to compile-debug again.

A long press in the app icon and uninstall trial says "Package installer has stopped". Only adb can help removing it.

B4A Version 10.5
Target SDK Version 29


*** Service (starter) Create ***
bluetoothmanager_initialize (java line: 154)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.bluetooth.BluetoothAdapter.isEnabled()' on a null object reference
at anywheresoftware.b4a.objects.Serial$BluetoothAdmin.IsEnabled(Serial.java:405)
 
Top