I am trying to access and pick a sound from the android music galley . This is what I have implemented :
Intent intent = new Intent();
intent.setType("audio/*");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setAction(Intent.ACTION_GET_CONTENT);
But the problem is with the startActivityForResult. Here I want to startActivityForResult on other activity say testActivity which is not accessible to me . so my next line is :
testActivity.getActivity().startActivityForResult(intent, 0);
thats why I am confused with where and how should I implement onActivityResult method because I cant do anything on testActivity . can anybody help me ?