John Smith
John Smith

Reputation: 752

Android Dismiss System Dialog

I have a problem circling around the Android Bluetooth Chat example found in the SDK samples. Whenever I connect a to a device and establish a connection, the ConnectedThread is being executed, everything is sweet, the System Dialog pops up askig me to tick in the PIN to pair. However, when I click the cancel button on that partiuclar dialog, I want to react on that. Since I rely and also want to rely on a non-custom dialog, I realy wonder how I can fetch the dismiss event on that particular dialog.

Regards, Simon

Upvotes: 1

Views: 1519

Answers (2)

droidd
droidd

Reputation: 1371

Just add this line in your code where you want dialog to dismiss.

Intent intent = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
sendBroadcast(intent);

Upvotes: 3

kittu88
kittu88

Reputation: 2461

You can do pairing programmatically to avoid this. You may refer Link1 and Link2

Upvotes: 0

Related Questions