Hi All im a newbie here. I am trying to get to grips with B4A and i am using some code from the following thread..................
http://www.b4x.com/forum/basic4andr...oid-bluetooth-bluetoothadmin-tutorial-11.html
This is the code in question...............
Sub btnAllowConnection_Click
'this intent makes the device discoverable for 300 seconds.
Dim i As Intent
i.Initialize("android.bluetooth.adapter.action.REQUEST_DISCOVERABLE", "")
i.PutExtra("android.bluetooth.adapter.extra.DISCOVERABLE_DURATION", 300)
StartActivity(i)
serial1.Listen
End Sub
What i would like to happen is when the "allow connection" button is pressed then NO pop up screen (bluetooth permission request) appears asking the user to make the phone discoverable. Insead the phone becomes discoverable for x seconds WITHOUT user intervention.
Any help would be great.
Cheers
Ray
http://www.b4x.com/forum/basic4andr...oid-bluetooth-bluetoothadmin-tutorial-11.html
This is the code in question...............
Sub btnAllowConnection_Click
'this intent makes the device discoverable for 300 seconds.
Dim i As Intent
i.Initialize("android.bluetooth.adapter.action.REQUEST_DISCOVERABLE", "")
i.PutExtra("android.bluetooth.adapter.extra.DISCOVERABLE_DURATION", 300)
StartActivity(i)
serial1.Listen
End Sub
What i would like to happen is when the "allow connection" button is pressed then NO pop up screen (bluetooth permission request) appears asking the user to make the phone discoverable. Insead the phone becomes discoverable for x seconds WITHOUT user intervention.
Any help would be great.
Cheers
Ray