As we know, Android OS has some restrictions to operate device hardwares programmetically, like it shows intent to user which requires YES for return true to the specific intent, i-e:
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, 1);
I want to hide this intent from user, and want to return true, as if user click YES, is there any way to code like this ?
I am not asking about turn ON bluetooth without permission, like( myBlueToothAdapter.enable()
works) I have to hide another intent which works same as this one..
Hope someone can guide me to the proper way. Thanks in advance.