Commit 944ded78 authored by John David Taylor's avatar John David Taylor Committed by GitHub

Make the app default to the classic sensor code even if the phone rep… (#158)

* Make the app default to the classic sensor code even if the phone reports that it has a rotation vector sensor if it doesn't also have a gyro.  Too many phones lie about this.

* remove space

* Updated various versions.

* try updating the travis sdk to java 8
parent 2e48c4d9
language: android
jdk: oraclejdk7
jdk: oraclejdk8
# Use the Travis Container-Based Infrastructure
sudo: false
......@@ -10,7 +10,7 @@ cache:
env:
global:
- ANDROID_API_LEVEL=23
- ANDROID_API_LEVEL=24
- EMULATOR_API_LEVEL=21
- ANDROID_BUILD_TOOLS_VERSION=23.0.3
- ANDROID_ABI=armeabi-v7a
......
......@@ -2,15 +2,15 @@ apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 23
compileSdkVersion 24
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.google.android.stardroid"
minSdkVersion 15
targetSdkVersion 23
versionCode 1475
versionName "1.9.1f"
targetSdkVersion 24
versionCode 1480
versionName "1.9.2"
buildConfigField 'String', 'GOOGLE_ANALYTICS_CODE', '""'
}
signingConfigs {
......
......@@ -227,15 +227,17 @@ public class StardroidApplication extends Application {
&& hasDefaultSensor(Sensor.TYPE_GYROSCOPE)) {
hasRotationSensor = true;
analytics.trackEvent(
Analytics.SENSOR_CATEGORY, Analytics.ROT_SENSOR_AVAILABILITY, "OK - All", 1);
Analytics.SENSOR_CATEGORY, Analytics.ROT_SENSOR_AVAILABILITY, "OK - All Sensors", 1);
} else if (hasDefaultSensor(Sensor.TYPE_ACCELEROMETER) && hasDefaultSensor(
Sensor.TYPE_MAGNETIC_FIELD)) {
hasRotationSensor = true;
// Even though it allegedly has the rotation vector sensor too many gyro-less phones
// lie about this, so put these devices on the 'classic' sensor code for now.
hasRotationSensor = false;
analytics.trackEvent(
Analytics.SENSOR_CATEGORY, Analytics.ROT_SENSOR_AVAILABILITY, "OK - No gyro", 1);
Analytics.SENSOR_CATEGORY, Analytics.ROT_SENSOR_AVAILABILITY, "Disabled - No gyro", 1);
} else {
analytics.trackEvent(
Analytics.SENSOR_CATEGORY, Analytics.ROT_SENSOR_AVAILABILITY, "Missing Mag/Accel", 0);
Analytics.SENSOR_CATEGORY, Analytics.ROT_SENSOR_AVAILABILITY, "Disabled - Missing Mag/Accel", 0);
}
} else {
analytics.trackEvent(
......
......@@ -3,8 +3,9 @@
<string name="whats_new_text" translation_description="Description of new features in this version in html">
<![CDATA[
<h1>New in version %s</h1>
\t • Work around for a Samsung S4 and Note 3 bug that caused a crash on start up<br/>
\t • Using the gyro is now the default for phones that support it<br/>
\t • Workaround for a Samsung S4 and Note 3 bug that caused a crash on start up<br/>
\t • Workaround for a bug in some phones that misreport rotation sensor status<br/>
]]>
</string>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment