bluetoothrequestkioskkiosk-modecosu

Kiosk-Mode Bluetooth-Request


I´m programming a Kiosk-Mode/COSU/Single-Purpose/LockTaskMode App, which have to be possible to accept a bluetooth pairing request form another phone. The problem is as long as the app is in LockTaskMode the request doesn´t show up or you could say it shows up in the background but you can´t get out of the app to accept it. So the question is:

  1. Is there a possibility to get it into the foreground of the app to accept it?

or.

  1. Is it progmatically possible to accept this request, so that I can make my own Alert Dialog with possibility to accept it from there.

I already registered a BroadcastReceiver to react to the request and also I´ve made an Alert Dialog where I want to accept the request if it´s not possible to get it into the foreground.

Any Ideas?

Thanks


Solution

  • The easiest way was to use the BluetoothChatTutorial from Androids Developers Page. Using the BluetoothChatService Class on both phones and change the rfcomm listener and creater to Insecure made it possible to connect without an alert.