I have an issue with importing a picture from the Album in Android, because the onActivityResult()
method is never called.
This is the code that I wrote
With this code:
Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
getActivity().startActivityForResult(galleryIntent, PICK_IMAGE);
The onActivityResult must be in the Activity that contains the Fragment. From there you can call any method of the fragment, not in the fragment.
MyFragment myFragment = (MyFragment) getSupportFragmentManager().findFragmentById(R.id.fragment);
myFragment .onCameraResult(requestCode, resultCode, intent);
to do there whatever you want