Also, found a reasonable alternative to the solutions here in the chromium 
source - looks like from a google search this had to be patched there, too 
-- 

https://src.chromium.org/viewvc/chrome/trunk/src/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java?pathrev=246398

See starting line 194.   When people discuss fragmentation, it's kind of 
funny because it's things like this that I find bothersome, things breaking 
through no fault of our own, and only on specific devices!  Good thing this 
broke on flagship devices, otherwise it might be a struggle for myself or 
others who come across this to make sense of it and deploy a quick fix... 

On Sunday, January 26, 2014 7:24:41 PM UTC-5, Adam Ratana wrote:
>
> Just got bit by this when I updated the target-sdk from 16.    Prior to 
> that this was not happening for my S4 and Note 3 users.
>
> On Wednesday, October 2, 2013 1:39:12 PM UTC-4, String wrote:
>>
>> I've already worked around the problem; I wasn't posting here looking for 
>> solutions, more to put this out there so that the next dev getting 
>> motion-sensor errors on a Note 3 (or similar) would be able to find it. 
>> Sorry I didn't make that clear.
>>
>> My solution looks like this:
>>
>> try {
>> SensorManager.getRotationMatrixFromVector(R, rotationVector);
>> } catch (IllegalArgumentException e) {
>> if (rotationVector.length > 3) {
>> // Note 3 bug
>>  float[] newVector = new float[] {
>>   rotationVector[0],
>>   rotationVector[1],
>>   rotationVector[2]
>>  };
>>  SensorManager.getRotationMatrixFromVector(R, newVector); 
>> }
>> }
>>
>> I couldn't come up with a good decision criteria for trapping the bug 
>> preemptively, so I went with catching the exception instead. I've confirmed 
>> that this solution works with a Note 3 user who was experiencing the bug, 
>> plus it doesn't break on other devices (including a Galaxy Nexus on 4.3 and 
>> a Galaxy S4 on 4.2.2).
>>
>> String
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to