-
Notifications
You must be signed in to change notification settings - Fork 132
Take pictures with augmented reality
Joan edited this page Apr 6, 2014
·
9 revisions
BeyondAR framework allows the user to take a picture with the augmented reality world that is been rendered on the screen.
This process is very simple, you just need to call mBeyondarFragment.takeScreenshot(myOnScreenshotListener)
and prepare the listener (OnScreenshotListener
):
@Override
public void onClick(View v) {
if (v == mTakeScreenShot) {
// In this case the Activity implements OnScreenshotListener
myBeyondarFragment.takeScreenshot(this);
}
}
@Override
public void onScreenshot(Bitmap screenshot) {
// When the picture is ready we will get the Bitmap. In this case a dialog is shown
ImageDialog dialog = new ImageDialog();
dialog.setImage(screenshot);
dialog.show(getSupportFragmentManager(), "ImageDialog");
}
You can find the source code of a complete example here.