According to a documentation if you set the EXTRA_DISCOVERABLE_DURATION extra's value to 0, the device is always discoverable.
Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION,0);
startActivity(discoverableIntent);
but my phone always shoes :
>an app want to enable bluetooth and make your device visible to other device for 120 seconds.
and even if I use another number he still 120 and not only 0 ,exemple : 100,300 ...
I see that problem with lot of people but I always without any answer , please someone can help !
Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION,0);
startActivity(discoverableIntent);
but my phone always shoes :
>an app want to enable bluetooth and make your device visible to other device for 120 seconds.
and even if I use another number he still 120 and not only 0 ,exemple : 100,300 ...
I see that problem with lot of people but I always without any answer , please someone can help !