diff --git a/app/build.gradle b/app/build.gradle index 8ff7e64..462ed50 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "org.y20k.trackbook" minSdkVersion 22 targetSdkVersion 24 - versionCode 1 - versionName "0.9.0 (The Great Gig in the Sky)" + versionCode 2 + versionName "0.9.1 (The Great Gig in the Sky)" vectorDrawables.useSupportLibrary = true } buildTypes { diff --git a/app/src/main/java/org/y20k/trackbook/MainActivity.java b/app/src/main/java/org/y20k/trackbook/MainActivity.java index a0ee6f6..bdbfcdf 100644 --- a/app/src/main/java/org/y20k/trackbook/MainActivity.java +++ b/app/src/main/java/org/y20k/trackbook/MainActivity.java @@ -9,7 +9,7 @@ * Copyright (c) 2016 - Y20K.org * Licensed under the MIT-License * http://opensource.org/licenses/MIT - * + * * Trackbook uses osmdroid - OpenStreetMap-Tools for Android * https://github.com/osmdroid/osmdroid */ diff --git a/app/src/main/java/org/y20k/trackbook/MainActivityFragment.java b/app/src/main/java/org/y20k/trackbook/MainActivityFragment.java index 754027c..92d65cf 100644 --- a/app/src/main/java/org/y20k/trackbook/MainActivityFragment.java +++ b/app/src/main/java/org/y20k/trackbook/MainActivityFragment.java @@ -321,7 +321,7 @@ public class MainActivityFragment extends Fragment implements TrackbookKeys { /* Setter for tracking state */ - public void setTrackingState (boolean trackingState) { + public void setTrackingState(boolean trackingState) { mTrackerServiceRunning = trackingState; // got a new track (from notification) @@ -333,7 +333,7 @@ public class MainActivityFragment extends Fragment implements TrackbookKeys { // turn on/off tracking for MainActivity Fragment - prevent double tracking if (mTrackerServiceRunning) { stopPreliminaryTracking(); - } else if (!mLocalTrackerRunning){ + } else if (!mLocalTrackerRunning && mFragmentVisible) { startPreliminaryTracking(); } diff --git a/app/src/main/java/org/y20k/trackbook/helpers/TrackbookKeys.java b/app/src/main/java/org/y20k/trackbook/helpers/TrackbookKeys.java index 1817193..3f098be 100644 --- a/app/src/main/java/org/y20k/trackbook/helpers/TrackbookKeys.java +++ b/app/src/main/java/org/y20k/trackbook/helpers/TrackbookKeys.java @@ -40,6 +40,11 @@ public interface TrackbookKeys { /* ARGS */ String ARG_PERMISSIONS_GRANTED = "ArgPermissionsGranted"; + String ARG_TRACKING_STATE = "ArgTrackingState"; + String ARG_TRACK = "ArgTrack"; + + /* TAGS */ + String TAG_MAIN_ACTIVITY_FRAGMENT = "TagMainActivityFragment"; /* PREFS */ String PREFS_NAME = "org.y20k.trackbook.prefs"; diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml index 9ec3f79..ed17590 100644 --- a/app/src/main/res/layout/content_main.xml +++ b/app/src/main/res/layout/content_main.xml @@ -9,3 +9,4 @@ android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:layout="@layout/fragment_main" /> +