Okay, I've searched online a lot for this but can't seem to find the exact issue I'm facing. I have a brand new Galaxy A7 phone that came with Android 7.0 on it.
I'm trying to turn on Bluetooth through an app I created and set it discoverable permanently (i.e, not only 2 minutes). Here is the code I use:
Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 0);
startActivity(discoverableIntent);
But on the prompt message, I'm getting a 120 seconds limit. I've played with this, writing 999 and 99 and many other numbers but I always get the same prompt for 120 seconds. I've looked around and read in a thread that it's probably something with the bluetooth's settings file but I can't seem to find it.
Anyone knows why this piece of code (which works on android 8.0 and 5.2) doesn't seem to work and how to fix it? Thanks :)