protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.sample_cam); Title = "3d model"; worldUrl = "Wikitude/3DModel/index.html"; architectView = FindViewById <ArchitectView>(Resource.Id.architectView); ArchitectStartupConfiguration startupConfiguration = new ArchitectStartupConfiguration(); startupConfiguration.setLicenseKey(Constants.WIKITUDE_SDK_KEY); startupConfiguration.setFeatures(ArchitectStartupConfiguration.Features.Tracking2D); startupConfiguration.setCameraResolution(CameraSettings.CameraResolution.Auto); /* use * int requiredFeatures = StartupConfiguration.Features.Tracking2D | StartupConfiguration.Features.Geo; * if you need both 2d Tracking and Geo */ int requiredFeatures = ArchitectStartupConfiguration.Features.Tracking2D; MissingDeviceFeatures missingDeviceFeatures = ArchitectView.isDeviceSupported(this, requiredFeatures); if ((ArchitectView.getSupportedFeaturesForDevice(Android.App.Application.Context) & requiredFeatures) == requiredFeatures) { architectView.OnCreate(startupConfiguration); architectView.RegisterUrlListener(this); } else { architectView = null; Toast.MakeText(this, missingDeviceFeatures.getMissingFeatureMessage(), ToastLength.Long).Show(); //StartActivity(typeof(ErrorActivity)); } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.sample_cam); Title = Intent.GetStringExtra("id"); //Create path to samples worldUrl = "SDK_Examples" + File.Separator + Intent.GetStringExtra("id") + File.Separator + "index.html"; architectView = FindViewById <ArchitectView>(Resource.Id.architectView); ArchitectStartupConfiguration startupConfiguration = new ArchitectStartupConfiguration(); startupConfiguration.setLicenseKey(Constants.WIKITUDE_SDK_KEY); startupConfiguration.setFeatures(ArchitectStartupConfiguration.Features.ImageTracking); startupConfiguration.setCameraResolution(CameraSettings.CameraResolution.Auto); int requiredFeatures = ArchitectStartupConfiguration.Features.ImageTracking; MissingDeviceFeatures missingDeviceFeatures = ArchitectView.isDeviceSupported(this, requiredFeatures); if ((ArchitectView.getSupportedFeaturesForDevice(Application.Context) & requiredFeatures) == requiredFeatures) { architectView.OnCreate(startupConfiguration); architectView.RegisterUrlListener(this); } else { architectView = null; Toast.MakeText(this, missingDeviceFeatures.getMissingFeatureMessage(), ToastLength.Long).Show(); StartActivity(typeof(ErrorActivity)); } }