Hello im using the BluetoothChat example in order to communicate with an arduino. Everything works so far and now i want to access the sendMessage() method in order to be able t
BluetoothChat class is an activity. Activity objects are managed by Android OS (created, onCreate, onResume and other methods are called).
So, you shoudn't do something like this:
BluetoothChat firstClass = new BluetoothChat();
There are couple of ways how you can reuse this functionality
a) Copy from BluetoothChat and paste it to Config (let's for one second forget about code duplication).
You will need to copy the code from onCreate, onStart and other methods which manages mBluetoothAdaptor method
b) If you are going to keep both BluetoothChat activity and Config activity, you can move reusable code to some helper class (which isn't activity) and use it from both activities.
P.S. I would recommend to read up a little bit about activities, their lifecycle, because without this knowledge it will be very hard to develop any android app.