S synasir Member Licensed User Longtime User Oct 26, 2011 #1 I have this coding using intent but is getting the "no activity found to handle intent" error message in the log. I have added the phone library Dim Intent1 As Intent Intent1.Initialize("BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE", "") Intent1.PutExtra("BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION",600) StartActivity(Intent1)
I have this coding using intent but is getting the "no activity found to handle intent" error message in the log. I have added the phone library Dim Intent1 As Intent Intent1.Initialize("BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE", "") Intent1.PutExtra("BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION",600) StartActivity(Intent1)
Erel B4X founder Staff member Licensed User Longtime User Oct 26, 2011 #2 You do not need to add the Phone library (assuming you are using B4A v1.6 or 1.7). BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE is a java constant. You should use the actual value which is: android.bluetooth.adapter.action.REQUEST_DISCOVERABLE Same is true for the other constant. You can find the values here: BluetoothAdapter | Android Developers Upvote 0
You do not need to add the Phone library (assuming you are using B4A v1.6 or 1.7). BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE is a java constant. You should use the actual value which is: android.bluetooth.adapter.action.REQUEST_DISCOVERABLE Same is true for the other constant. You can find the values here: BluetoothAdapter | Android Developers
S synasir Member Licensed User Longtime User Oct 26, 2011 #3 Thanks Erel. That works! Anyway I can disable the request permission dialog. I have added the necessary settings in the manifest. Upvote 0
Thanks Erel. That works! Anyway I can disable the request permission dialog. I have added the necessary settings in the manifest.