Problem: I have an object mBluetoothGatt (of BluetoothGatt type of course) in com/example/android/bluetoothlegatt/BluetoothLeService.java
which I want to use in com/example/android/bluetoothlegatt/DeviceControlActivity.java
I figure I can do it in the following 2 ways: 1. try to refer to mBluetoothGatt in its home-file, which appears to be something JAVA purposely prohibits, something I personally find insulting.
- Create a new "mBluetoothGatt1" object, or instance, and make sure it "points" to the same piece of hardware implementation (register, RAM address whatever) . And to my limited understanding of java, you can create something based on some sort of "context", which would be mighty convenient. If only there were some sort of constructor overloading for BluetoothGatt that allows me to use "context" as input...
So... help?