I am trying to create a StartActivityForResult to request that the user tuns
on Bluetooth.  The dialog box pops up and requests that Bluetooth be turned
on(works great), now I want to read the Activity Result whether its
RESULT_OK or RESULT_CANCEL so I can either kill the program or continue on. 
Im having some problems getting that to work.  Below is the code.  Any
ideas?

        public void enableBluetooth()
        {

            Intent enableBTIntent = new
Intent(BluetoothAdapter.ActionRequestEnable);
            StartActivityForResult(enableBTIntent, REQUEST_ENABLE_BT);

        }

        private void onActivityResult(int requestCode, int resultCode,
Intent data)
        {

            if (resultCode == Activity.RESULT_OK && requestCode ==
REQUEST_ENABLE_BT)
            {

                connect();

            }

        }

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Activity-Result-tp4877124p4877124.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to