Hello everyone hope you are doing well .Here is another article. we all know about fragments basically A Fragment represents a reusable portion of your app's UI. We easily use onBackPressed and onActivityResult in out Activity but we face difficulty when we use these two in our fragment class .We get no result,So if you facing same difficulty this artcile is for you. We have to use some tricks to use these methods in our fragment.So lets start :- First start with onActivityResult() in fragment you have to add these lines in your main Activity class protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { Fragment uploadType = getSupportFragmentManager (). findFragmentById ( android . R . id . content ); if ( uploadType != null ) { uploadType . onActivityResult ( requestCode , resultCode , data ); } super . onActivityResult ( requestCode , resultCode , data ); } in findFragmentByI