You are not logged in.

KiboOst

Trainee

  • "KiboOst" started this thread

Posts: 83

Location: France

Occupation: TD

  • Send private message

1

Tuesday, June 16th 2015, 11:01am

Gyroscope on galaxytab3

Hi,

On a new galaxytab3 (android 4.4.2), both gyroscope have severe problems:

gyro.js : the image shake a lot even when the tab is not moving at all (on a table)
gyro2.js : no shake, but the image is rotated 90° (the ground appear on the right, sky on the left)
Seems more related to orientation sensor than gyro ? Starting it from lansdcape or portrait doesn't change anything.

Any way to fix that, or we should disable gyro on android devices ?

2

Tuesday, June 16th 2015, 1:40pm

Hi,

which browser:
- the build-in default browser?
- Chrome?
- Firefox?

Normally the gyro2.js should work correctly - I don't have a test device where it doesn't...


Quoted

Any way to fix that, or we should disable gyro on android devices ?
Disabling the gyro for ALL Android devices because of one or two buggy devices (or buggy browsers) wouldn't make sense. But it would be possible to add a device specific check for that particular device (or a device+browser combination) and disable it only for that one.

Best regards,
Klaus

KiboOst

Trainee

  • "KiboOst" started this thread

Posts: 83

Location: France

Occupation: TD

  • Send private message

3

Tuesday, June 16th 2015, 3:17pm

All browser actually ...
Same with this link, so it's not my xml:
http://krpano.com/plugins/gyro2/gyro1-gyro2-comparison/

I don't say disable it in krpano core, just in my xml.
Actually, I would make it enable only for iOS, android with its granularity is too cumbersome to trust.

This is with 1.19pr2

How could I say enable="false" for android ? Having two with device="html5.and.android" and other with device="html5.and.not.android" ?

<plugin name="gyro" devices="html5" keep="true"
url="%SWFPATH%/plugins/gyro2.js"
enabled="true"
onavailable="set(layer[gyroicon].visible,true);"
/>

If you have any url to test let me know.

EDIT:
<action name="check_gyro">
if(device.android,
set(plugin[gyro].enabled,false);
);
</action>

added the action in start and voilà !

4

Tuesday, June 16th 2015, 4:03pm

Hi,

as said I wouldn't disable the gyro for ALL Android devices - there are many Android devices where the gyro is working very very well - even better than iOS!

Here an example to blacklist only the 'Samsung Galaxy Tab 3' - according to a quick web-search there exists several different version of devices with that name, so this example is checking for several different user-agents:

Source code

1
2
3
4
5
6
7
8
9
10
11
<plugin name="gyro" ... onloaded="gyro_blacklist();" />

<action name="gyro_blacklist">
  <!-- trace(browser.useragent); -->
  indexoftxt(i1, get(browser.useragent) 'GT-P5210');
  indexoftxt(i2, get(browser.useragent) 'GT-P5200');
  indexoftxt(i3, get(browser.useragent) 'SM-T310');
  indexoftxt(i4, get(browser.useragent) 'SM-T311');
  indexoftxt(i5, get(browser.useragent) 'SM-T210');
  if(i1 GT 0 OR i2 GT 0 OR i3 GT 0 OR i4 GT 0 OR i5 GT 0, removeplugin(get(name)); );
</action>


You can also in-comment the trace to see the user agent of your current device and maybe only block that one. It might be possible that the other ones are fine.

The 'indexoftxt' calls are searching the browsers user-agent string for the given text and the if() call checks if the that text was found (by checking if the index/position of the found text is greater than 0).

Best regards,
Klaus

KiboOst

Trainee

  • "KiboOst" started this thread

Posts: 83

Location: France

Occupation: TD

  • Send private message

5

Tuesday, June 16th 2015, 4:10pm

thanks !!
Mine is indeed GT-P5210

KiboOst

Trainee

  • "KiboOst" started this thread

Posts: 83

Location: France

Occupation: TD

  • Send private message

6

Tuesday, September 8th 2015, 4:13pm

Still the same with 1.19pr3 gyro2
Even with autocalibration.

Anyway, nice to have touch_mode full back ;-)

KiboOst

Trainee

  • "KiboOst" started this thread

Posts: 83

Location: France

Occupation: TD

  • Send private message

7

Wednesday, September 9th 2015, 9:38am

ok ok ok !!!!
I've just installed some simple bubble level apps, and it is the same ! It is like my gyro is turned 90° horizontaly inside the tab !!

Will check if I can find a way to calibrate it, or maybe return the tab !

Sorry for that, will post how to calibrate it if I find a way to.

KiboOst

Trainee

  • "KiboOst" started this thread

Posts: 83

Location: France

Occupation: TD

  • Send private message

8

Friday, September 11th 2015, 9:26am

Ok, exact same behavior with another same model !