Start a new topic

compass problem wiko tommy 2


I just bought a wiko tommy 2 to replace my phone, it has a compass that works on other applications but remains fixed on the example geoAr of wikitude and our app. We test the requirement when launching the app (['geoAR']) the app passes this test. Any information that can help me is welcome (I'm desperate the store refuses to exchange it ...)




Hi,

So all the needed requirmeents for geo AR to work are fulfilled with this device:

http://www.wikitude.com/external/doc/documentation/latest/android/supporteddevicesandroid.html#supported-android-devices?

If so, can you please send over a video of the behaviour in your AR experience. Please make sure that you test outside.

Thx

Nicola

 

HI,i found that it work fine with wikitude 6.0;0-3.4.0 , 

i'v just upload two screenrecords if that can help finding my issue.

The two version run the same www/ folder.

We have a 'onDeviceNotSupported' callback which is well executed with device not compatible


cordova#7.1.0, android#7.1.1


wikitude 7.2.1-3.5.2:https://youtu.be/OItssXi10B0


wikitude 6.0.0-3.4.0https://youtu.be/zcjzfSlA-2Y


hope you can do something  


Hi Raphael,


this was a known issue of SDK 7.0, but was fixed with 7.1.

Please verify that the plugin version is 7.2.1.


If you are sure that the version is correct please try to use:


PackageManager.hasSystemFeature(PackageManager.FEATURE_SENSOR_GYROSCOPE)


This should return 'false' on the Wiko Tommy2.


Best Regards,

Alex

hi,

Back to this geo-ar project !

I still have not been able to solve my issue. I  double check the wikitude version : 7.2.1.

I forgot to mention that I use the cordova plugin and so I can not figure out where am I supposed to insert the java code from the post above.

thx for your help.

Hi,


In the case of our cordova sample app there is a MainActivity. In the onCreate of this Activity you should be able to use PackageManger.hasSystemFeature. 

Please check what this method returns on the wiko tommy 2 and report back. 


Best Regards,

Alex

hi, 

thanks again for your help,

for short it looks like "PackageManager.hasSystemFeature (PackageManager.FEATURE_SENSOR_GYROSCOPE)" returns me true.


but the way I got this result was more complicated than I had planned, here is what I did:


I did not use the wikitude cordova sample app, so I pasted the line 

System.out.println(PackageManager.hasSystemFeature (PackageManager.FEATURE_SENSOR_GYROSCOPE));

 

into our own activity located in: "platforms / android / src / our / package / name / MainActivity .Java",

The build failed with an error like : you can't call a non static method from a static context.

After some research on the internet I came to modify a little this line, our MainActivity became:

 

package our.package.name;

import android.os.Bundle;
import org.apache.cordova.*;
// I added this line too
import android.content.pm.PackageManager;

public class MainActivity extends CordovaActivity
{
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        boolean hasGyro = this.getPackageManager()
                .hasSystemFeature(PackageManager.FEATURE_SENSOR_GYROSCOPE);
        System.out.println(" ##### hasGyro ? #####" + hasGyro);

        // enable Cordova apps to be started in the background
        Bundle extras = getIntent().getExtras();
        if (extras != null && extras.getBoolean("cdvStartInBackground", false)) {
            moveTaskToBack(true);
        }

        // Set by <content src="index.html" /> in config.xml
        loadUrl(launchUrl);
    }
}

 

I then rebuild, copy the apk on my phone and start a shell with adb:  

rafiki@rafiki: $ adb shell

 then: 

V3933AC:/ $ logcat | grep hasGyro


the result in the console:

 

05-09 12:12:56.423 16470 16470 I System.out:  ##### hasGyro ? #####true

 


I did these operations with both wikitude 7.2.1 and 6.0.0 same output each time.


Thanks in advance

Login or Signup to post a comment