android - BluetoothAdapter.ACTION_REQUEST_ENABLE calls onActivityResult immediately -
according developer guides, request can made enable bluetooth such:
http://developer.android.com/guide/topics/connectivity/bluetooth.html#settingup
if (!mbluetoothadapter.isenabled()) { intent enablebtintent = new intent(bluetoothadapter.action_request_enable); startactivityforresult(enablebtintent, request_enable_bt); }
in implementation creates request , user presented request dialog.
my problem onactivityresult() called such before dialog appears have result. returned requestcode matches 1 set (9001 in case) , resultcode 0 (activity.result_canceled).
i believe bug in 4.3, unfortunately have 4.3 devices. reading descriptions , source appears onactivityresult() should not called until user interacts dialog can confirm bug or explain doing wrong?
tested on following same result:
- new nexus 7
- nexus 7
- nexus 4
- galaxy nexus
startactivityforresult doesn't work singleinstance. activity configured single instance ? (android:launchmode="singleinstance")
Comments
Post a Comment