i have a question trouble me very long,in my app i using a built-in camera, i want to take a pic.if i am only a common activity i can use:
Intent intent = new
Intent("android.media.action.IMAGE_CAPTURE");
startActivityForResult(intent, 0);
// ...
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == Activity.RESULT_OK && requestCode == 0) {
String result = data.toURI();
}
}
because my app have Nested many layer,my takepic activity at one tab of tabactivity of tabactivity.so onActivityResult cannot get any value. so i want to use broadcast to get the pic but in the built-in camera app,i cannot write code to send broadcast. so my question how to get the pic not use onActivityResult methods.thank you
Edit:solved broadcast receiver won't receive camera event