コード例 #1
0
        protected override void OnPostCreate(Bundle savedInstanceState)
        {
            base.OnPostCreate(savedInstanceState);
            architectView.OnPostCreate();  // Mandatory ArchitectView lifecycle call

            /*
             * Loads the AR-Experience, it may be a relative path from assets,
             * an absolute path (file://) or a server url.
             *
             * To get notified once the AR-Experience is fully loaded,
             * an ArchitectWorldLoadedListener can be registered.
             */
            architectView.Load(ExperienceRootDir + arExperiencePath);
        }
コード例 #2
0
        /// <summary>
        /// After initialisation - starts wikitude AR View with created world
        /// </summary>
        /// <param name="savedInstanceState">Saved instance state.</param>
        protected override void OnPostCreate(Bundle savedInstanceState)
        {
            base.OnPostCreate(savedInstanceState);

            if (architectView != null)
            {
                architectView.OnPostCreate();
            }

            try {
                architectView.Load(world);
            } catch (Exception ex) {
                Log.Error("ARArt", ex.ToString());
            }
        }
コード例 #3
0
        protected override void OnPostCreate(Bundle savedInstanceState)
        {
            base.OnPostCreate(savedInstanceState);

            if (architectView != null)
            {
                architectView.OnPostCreate();

                try
                {
                    architectView.Load(worldUrl);
                    architectView.CallJavascript("chargeModel('" + Intent.GetIntExtra("id", 0) + "')");
                }
                catch (Exception ex)
                {
                    Log.Error("WIKITUDE_SAMPLE", ex.ToString());
                }
            }
        }
コード例 #4
0
        protected override void OnPostCreate(Bundle savedInstanceState)
        {
            base.OnPostCreate(savedInstanceState);

            if (architectView != null)
            {
                architectView.OnPostCreate();
            }

            try
            {
                var world = Intent.Extras.GetString(EXTRAS_KEY_ACTIVITY_ARCHITECT_WORLD_URL);

                architectView.Load(world);
            }
            catch (Exception ex)
            {
                Log.Error("WIKITUDE_SAMPLE", ex.ToString());
            }
        }
コード例 #5
0
        public override void OnActivityCreated(Bundle savedInstanceState)
        {
            base.OnActivityCreated(savedInstanceState);

            var arExperiencePath = "ARPages/ARPage/index.html";

            var config = new ArchitectStartupConfiguration
            {
                LicenseKey       = Utils.Keys.WikitudeLicense,
                CameraPosition   = CameraSettings.CameraPosition.Back,
                CameraResolution = CameraSettings.CameraResolution.FULLHD1920x1080,
                CameraFocusMode  = CameraSettings.CameraFocusMode.Continuous,
                ArFeatures       = ArchitectStartupConfiguration.Features.ImageTracking | ArchitectStartupConfiguration.Features.Geo
            };

            architectView.OnCreate(config);
            architectView.OnPostCreate();
            architectView.Load(arExperiencePath);
            architectView.AddArchitectJavaScriptInterfaceListener(this);
        }
コード例 #6
0
        public override void OnActivityCreated(Bundle savedInstanceState)
        {
            base.OnActivityCreated(savedInstanceState);

            var experience = ArExperience.Deserialize(Arguments.GetByteArray(IntentExtrasKeyExperienceData));

            var arExperiencePath = experience.Path;

            var config = new ArchitectStartupConfiguration
            {
                LicenseKey       = GetString(Resource.String.wikitude_license_key),
                CameraPosition   = Util.PlatformConverter.ConvertSharedToPlatformPosition(experience.CameraPosition),
                CameraResolution = Util.PlatformConverter.ConvertSharedToPlatformResolution(experience.CameraResolution),
                CameraFocusMode  = Util.PlatformConverter.ConvertSharedToPlatformFocusMode(experience.CameraFocusMode),
                Camera2Enabled   = experience.Camera2Enabled,
                ArFeatures       = (int)experience.FeaturesMask
            };

            architectView.OnCreate(config);
            architectView.OnPostCreate();

            architectView.Load(arExperiencePath);
        }