Reputation: 19946
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
Upvotes: 0
Views: 408
Reputation: 6663
You might want to consider showing the camera inside a view in your app and bypassing the standard camera app entirely. If you're curious about doing this, here are some good resources to get you started:
Upvotes: 1