Start a new topic

Offline use and License Check

Hello there !


Sorry in advance if this topic has already been covered somewhere, I looked around but couldn't find an answer...


We have created (and published) an app calle Street Science that allows users to complete augmented reality treasure hunts. Some of these treasure hunts are geolocalized in urban areas - each point of interest to be discovered is associated with GPS coordinates that are shown on a map.

Our app allows users to pick a treasure hunt and download it ahead of time (that includes the WTC file and all the educational content associated with the targets), so that they can complete the treasure hunt even if they use a tablet that has no SIM card and no internet connection (they won't see the real-time map, or they real-time location of course, but in offline mode, a static offline map helps them find the POIs).


This has worked fine until now, and still works fine on iOS. However, on ALL Android devices, now the Wikitude SDK won't start if there is no data connection whatsoever, even though everything needed for the treasure hunt has already been downloaded. 


We use :


sdk: cordova

com.wikitude.phonegap.wikitudeplugin version 9.10

  minSdkVersion = 22 

compileSdkVersion = 30

 targetSdkVersion = 30 androidxActivityVersion = '1.2.0' androidxAppCompatVersion = '1.2.0' androidxCoordinatorLayoutVersion = '1.1.0' 

androidxCoreVersion = '1.3.2' androidxFragmentVersion = '1.3.0' junitVersion = '4.13.1' androidxJunitVersion = '1.1.2' androidxEspressoCoreVersion = '3.3.0' cordovaAndroidVersion = '7.0.0'


This is the code currently in place to start the SDK (on both iOS and Android, works with zero connectivity in Airplane mode on iOS perfectly) :


WikitudePlugin._sdkKey = environment.wikitudeKey;


 /** Check if your device supports AR */

 WikitudePlugin.isDeviceSupported((success) => {

 console.log('Your platform supports AR/Wikitude. Have fun developing!!');

 Stats.trackEvent('Wikitude', 'Success');

 }, (fail) => {

 alert('AR impossible sur ce téléphone');

 Stats.trackEvent('Wikitude', fail);

 console.log('Your platform failed to run AR/Wikitude: ' + fail);

 },

 [WikitudePlugin.FeatureGeo] // or WikitudePlugin.Feature2DTracking

 );


And this is the code in place in order to display an error message in case of a malfunction :


WikitudePlugin.loadARchitectWorld(

 (success) => {

 hasNotLoaded = false;

 console.log('ARchitect World loaded successfully.');

 this.api.addLog('ARchitect World loaded successfully.');

 },

 (fail) => {

 console.log('Failed to load ARchitect World!');

 this.api.addLog('Failed to load ARchitect World! ' + JSON.stringify(fail));

 // WikitudePlugin.close();

 // alert('Unable to start AR on this device');

 },

 basePath + '?lang=' + this.currentLang,

 ['geo'],

 {}

 );


And this is error message we now get on Android devices :


2022-10-07 15:16:08.734 18297-20583/fr.pandaroo.streetscience E/WKTD: >ERROR: [Runtime][00:01:27.432.536] > Could not resolve host: sdk-track.wikitude.com (code 6)


2022-10-07 15:16:08.734 18297-20583/fr.pandaroo.streetscience E/WKTD: >ERROR: [Runtime][00:01:27.432.679] > Error executing network connection (code 1002) (underlying error: Could not resolve host: sdk-track.wikitude.com (code 6))


2022-10-07 15:16:08.736 1353-1728/? D/NetdEventListenerService: DNS Requested by : 0, 10595, 7


2022-10-07 15:16:08.736 18297-20582/fr.pandaroo.streetscience E/WKTD: >ERROR: [Runtime][00:01:27.434.519] > Could not resolve host: licensecheck.wikitude.com (code 6)


2022-10-07 15:16:08.736 18297-20582/fr.pandaroo.streetscience E/WKTD: >ERROR: [Runtime][00:01:27.434.557] > Error executing network connection (code 1002) (underlying error: Could not resolve host: licensecheck.wikitude.com (code 6))


We have a current licence, that is set on runtime.


Could you please advise on why the SDK won't start now if there is no internet or data connection ? The Offline functionality is important to us and we would like to fix this ASAP.


Thanks so much in advance for any help you could get us !

#FingersCrossed

Login or Signup to post a comment