Start a new topic

Lots of errors in Wikitude

Lots of errors in Wikitude


Hi,

I get a pretty big list of errors in my Android app with Wikitude, the app makes no errors if i don't call the ARchitect engine.

Wikitude opens on the app, and it sometimes displays the geoobject with their indicators, but most of the times the object shows but the indicators doesn't show or it doesn't behave in a good way.

I believe my manifest is right and the libraries are properly linked. This is a cronologic screenshot of the errors:



Here's my js code for wikitude:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta name="viewport" content="target-densitydpi=device-dpi, width = 540, user-scalable = 0" />

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title></title>

 

<!-- Include the ARchitect library -->

<script src="architect://architect.js"></script>

<script src="radar.js"></script>

 

</head>

 

<body>

<script>

 

AR.logger.activateDebugMode ( );

var markerLocation;

var imageResource = new AR.ImageResource("Smiley.png");

var imageResource2 = new AR.ImageResource("arrow2.png");

var geoObject1;

var imageDrawable = new AR.ImageDrawable(imageResource, 3);

 

 

function setTargetLocation(jsonData) {

var jsonObject = JSON.parse(jsonData);

var latitude = parseFloat(jsonObject.lat);

var longitude = parseFloat(jsonObject.lon);

var altitude = parseFloat(jsonObject.alt);

var accuracy = parseFloat(jsonObject.acc);

 

this.radarCircle = new AR.Circle(0.06, {

        horizontalAnchor: AR.CONST.HORIZONTAL_ANCHOR.CENTER,

        opacity: 0.8,

        style: {

            fillColor: "#00FF00"

        }

    });

PoiRadar.show();

this.imageDrawable2 = new AR.ImageDrawable(imageResource2, 0.3);

 

markerLocation = new AR.GeoLocation(latitude, longitude);

geoObject1 = new AR.GeoObject(markerLocation, {

 enabled : true,

 drawables : { cam : imageDrawable,

 indicator : this.imageDrawable2,

 radar: this.radarCircle}

});

}

 

AR.context.onLocationChanged = function(latitude, longitude, altitude, accuracy){

  var location = new AR.GeoLocation(latitude, longitude);

};

 

</script>

 

</body>

</html>

Hi Pablo,

Did you already try the provided sample app? Is it working the way it should on your device?
Please especially check Manifest permissions, feature-requirements and targetSDK as well as lifecycle handling of the architect-view.

Kind regards,
Andreas

Hi Andreas,

Thanks for your response, the sample app works fine, and I'm pretty confident in that all you described is properly handled in my app. Still, indicators work one out of ten times, I have no idea why, are they correctly positioned in my js code?

Hi again!
Do I understand you correct: The sample app is working as expected but when you create your own application doing exactly the same you run into troubles?
Is the AR-Experience on a server or in the asset-folder? In case it is is stored on a server, please check the onError callback of an AR.ImageResource.

Regards,
Andreas
Login or Signup to post a comment