this.window.isDeviceSupported = function() {

        var isDeviceSupported = wikitude.isDeviceSupported(_this.augmentedRealityMode);

        if (isDeviceSupported) {

            _this.window.arview = wikitude.createWikitudeView({
                "licenseKey": WikitudeLicenseKey,
                "augmentedRealityMode": _this.augmentedRealityMode,
                bottom: 0,
                left: 0,
                right: 0,
                top: 65
            });
        }

        return isDeviceSupported;
    };
Ejemplo n.º 2
0
	self.addEventListener('open', function() {

		_this.arview = wikitude.createWikitudeView({
			licenseKey : WikitudeLicenseKey,
			bottom : 0, left : 0, right : 0, top : 0
		});

		mainView.add(_this.arview);
		
		if (Titanium.Platform.name == 'android') {

			// Titanium.Geolocation.distanceFilter = 1;
				
            self.activity.addEventListener('resume', function() {
		      if (!_this.LOCATION_LISTENER_ADDED) {
		            Titanium.Geolocation.addEventListener('location', _this.locationListener);
		            _this.LOCATION_LISTENER_ADDED = true;
		        }
		    });
            
            self.activity.addEventListener('pause', function() {
                if (_this.LOCATION_LISTENER_ADDED) {
	                Titanium.Geolocation.removeEventListener('location', _this.locationListener);
	                _this.LOCATION_LISTENER_ADDED = false;
	            }
            });
            
            self.activity.addEventListener('destroy', function(e) {
		        if (_this.LOCATION_LISTENER_ADDED) {
		            Titanium.Geolocation.removeEventListener('location', _this.locationListener);
		            _this.LOCATION_LISTENER_ADDED = false;
		        }
		    });
            
         	self.activityListenerLoaded = true;	   
         };
         
        _this.arview.addEventListener('URL_WAS_INVOKED', onUrlWasInvoked); // setup event listener

		_this.arview.architectWorldUri = url; // load ARchitect world
         
         
       });