Start a new topic

Wikitude plugin is not compatible with devextreme?

Wikitude plugin is not compatible with devextreme?


Hi,

I have been trying to get work the Wikitude Cordova plugin in an devextreme multi-channel project, but I have not success.

Has anyone had the same problem?

 

Thanks. :)

Hi Flavio,
Can you be a little bit more precise about what exactly is not working for you? It's hard to give some advise based on your previous message.

Best regards,

Andreas

Hi Andreas,

I have integrated the wikitude plugin on devextreme project. ;)

I don't know because my example not show a POI (the same lon/lat on native android sdk show a POI).

 

function onDeviceReady() {

 

            WikitudePlugin._sdkKey = "my key ;) ";

 

 

            var requiredFeatures = ;

            try

            {

                ARWikitude.app.wikitudePlugin = cordova.require("com.wikitude.phonegap.WikitudePlugin.WikitudePlugin");

                ARWikitude.app.wikitudePlugin.isDeviceSupported(onDeviceSupported, onDeviceNotSupported, requiredFeatures);

            }

            catch (ex) {

                alert("load ex: " + ex.message);

            }

 

                      

        };

 

 

    

 

    function onDeviceSupported() {

        // ... code that is executed if the device is supported ...

        //alert("device supported");

        var requiredFeatures = ;

        var arExperienceUrl = "";//www/experience/index.html";

        var startupConfiguration = {

            "camera_position": "back"

        };

 

        try

        {

            ARWikitude.app.wikitudePlugin.loadARchitectWorld(

                onARExperienceLoadedSuccessful,

                onARExperienceLoadError,

                arExperienceUrl,

                requiredFeatures,

                startupConfiguration

            );

        }

        catch (ex) {

            alert("load ex: " + ex.message);

        }

    }

 

    function onDeviceNotSupported(errorMessage) {

        // ... code that is executed if the device is not supported ...

 

        alert("device unsupported");

    }

 

 

    function onARExperienceLoadedSuccessful(loadedURL) {

        // ... do something when the augmented reality experience finished loading

        //alert("loaded");

 

        try

        {

 

            var lon = 14.401588150904507;

            var lat = 37.255718339690475;

 

            var poiData = {

                "id": 1,

                "longitude": lon, //(lon + (Math.random() / 5 - 0.1)),

                "latitude": lat, //(lat + (Math.random() / 5 - 0.1)),

                "altitude": 100.0,

                "description": "This is the description of POI#1",

                "title": "POI#1"

            };

 

 

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

            /*

            var markerDrawable_idle = new AR.ImageResource("marker_idle.png");

            //alert("image: " + markerDrawable_idle);

            var markerImageDrawable_idle = new AR.ImageDrawable(markerDrawable_idle, 2.5, {

                zOrder: 0,

                opacity: 1.0

            });

            */

 

 

            var titleLabel = new AR.Label(poiData.title, 1, {

                zOrder: 1,

                offsetY: 0.55,

                style: {

                    textColor: '#FFFFFF',

                    fontStyle: AR.CONST.FONT_STYLE.BOLD

                }

            });

 

            var descriptionLabel = new AR.Label(poiData.description, 0.8, {

                zOrder: 1,

                offsetY: -0.55,

                style: {

                    textColor: '#FFFFFF'

                }

            });

 

            // create GeoObject

            var markerObject = new AR.GeoObject(markerLocation, {

                drawables: {

                    //cam:

                    cam:

                },

                onEnterFieldOfVision : function(){ alert("entrato");},

                //the function executed when the GeoObject exits the field of vision

                onExitFieldOfVision: function () { alert("uscito"); },

            });

        }

        catch (ex) {

            alert("load ex: " + ex.message);

        }

    }

Hi Flavio,
The reason might be that you try to create AR objects within the scope of your cordova application and not within the Architect World. This will not work. The code you have written in your onARExperienceLoadedSuccessful trigger belongs in the Architect World that you load with a call to ARWikitude.app.wikitudePlugin.loadARchitectWorld.

The Architect World url in your case is defined here: var arExperienceUrl = "";//www/experience/index.html";

What is the content of the .html/.js Architect World that you have written?

Best regards,

Andreas

 
Login or Signup to post a comment