private final void initARViews() { sceneView = new OAARVRViewComponent(this, dataManager, sensorManager); initTouch(); // Setup the ar view component, this implements our new vision of the way components work in // outdoor ar. arView = new ARViewComponent(this); if ((options & OPTION_DISABLE_CAMERA_BACKGROUND) != 0) arView.enableCameraBackground(false); arView.setDelayOnResume(700); arView.setSceneView(sceneView); arViewPlaceHolder.addView( arView, new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); }
@Override protected void onPause() { Log.d("ARComponentBase", "onPause()"); sensorManager.pause(); sceneView.onPause(); arView.onPause(); super.onPause(); }
@Override protected void onResume() { Log.d("ARComponentBase", "onResume()"); super.onResume(); arView.onResume(); sceneView.onResume(); sensorManager.resume(); /*/ // no use Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { sceneView.bringToFront(); if(compassView != null) compassView.bringToFront(); } }, 2500); /**/ }
public final void enableCameraBackground(boolean enable) { if (arView != null) arView.enableCameraBackground(enable); }