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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -