w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Xamarin.Android OnActivityResult not being called inside a Fragment

Check for request code is same as provided for startActivityForResult(intent, 0) here 0 is request code.. eg if you put 999 here insted of 0 ..then in onActivity result method check for requestcode == 999. it is used to check if the intent is the same as asked for and nothing other than that..

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent
data) {
    // TODO Auto-generated method stub
    super.onActivityResult(requestCode, resultCode, data); 
    if (requestCode == 0 && resultCode == RESULT_OK) { // ADD THIS
    // Get Data and do something with it 
    }
}




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.