Skip to content

Commit

Permalink
Update to v2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Graziano Capelli authored and Graziano Capelli committed Sep 5, 2016
1 parent b62dcdb commit 046819e
Show file tree
Hide file tree
Showing 51 changed files with 54 additions and 72 deletions.
Binary file added apk/GPSLogger-2.0.1.apk
Binary file not shown.
Binary file added apk/GPSLogger-latest.apk
Binary file not shown.
22 changes: 8 additions & 14 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
Expand All @@ -80,9 +72,16 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
Expand All @@ -96,17 +95,12 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/23.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "eu.basicairdata.graziano.gpslogger"
minSdkVersion 8
targetSdkVersion 23
versionCode 7
versionName '2.0.0'
versionCode 8
versionName '2.0.1'
}
buildTypes {
release {
Expand Down
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<!--
~ AndroidManifest.xml
~ Created by G.Capelli (BasicAirData) on 8/4/2016
~ v.2.0.0
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* DatabaseHandler - Java Class for Android
* Created by G.Capelli (BasicAirData) on 1/5/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -209,6 +208,10 @@ public void onCreate(SQLiteDatabase db) {
// Upgrading database
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

// Use this function in case of DB version upgrade.
// not used for now !!!

// Drop older table if existed
//db.execSQL("DROP TABLE IF EXISTS " + TABLE_LOCATIONS);
//db.execSQL("DROP TABLE IF EXISTS " + TABLE_PLACEMARKS);
Expand All @@ -218,6 +221,11 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
onCreate(db);
}

// Ensure DB creation!
public boolean CreateDBifNeeded() {
SQLiteDatabase db = this.getWritableDatabase();
return (db != null);
}

// ----------------------------------------------------------------------- LOCATIONS AND PLACEMARKS

Expand Down Expand Up @@ -392,7 +400,7 @@ public void addPlacemarkToTrack(LocationExtended placemark, Track track) {

// Get single Location
public LocationExtended getLocation(long id) {
SQLiteDatabase db = this.getReadableDatabase();
SQLiteDatabase db = this.getWritableDatabase();
LocationExtended extdloc = null;

Cursor cursor = db.query(TABLE_LOCATIONS, new String[] {KEY_ID,
Expand Down Expand Up @@ -428,7 +436,7 @@ public LocationExtended getLocation(long id) {

// Get single Location
public LocationExtended getLocation(long TrackID, long locationNumber) {
SQLiteDatabase db = this.getReadableDatabase();
SQLiteDatabase db = this.getWritableDatabase();
LocationExtended extdloc = null;

String selectQuery = "SELECT * FROM " + TABLE_LOCATIONS + " WHERE "
Expand Down Expand Up @@ -577,7 +585,7 @@ public List<LatLng> getLatLngList(long TrackID, long startNumber, long endNumber
// Get the total amount of Locations stored in the DB
public long getLocationsTotalCount() {
String countQuery = "SELECT * FROM " + TABLE_LOCATIONS;
SQLiteDatabase db = this.getReadableDatabase();
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(countQuery, null);
cursor.close();
return cursor.getCount();
Expand All @@ -587,7 +595,7 @@ public long getLocationsTotalCount() {
// Get the number of Locations of a Track
public long getLocationsCount(long TrackID) {
String countQuery = "SELECT * FROM " + TABLE_LOCATIONS + " WHERE " + KEY_TRACK_ID + " = " + TrackID;
SQLiteDatabase db = this.getReadableDatabase();
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(countQuery, null);
cursor.close();
return cursor.getCount();
Expand All @@ -596,7 +604,7 @@ public long getLocationsCount(long TrackID) {

// Get last Location ID
public long getLastLocationID(long TrackID) {
SQLiteDatabase db = this.getReadableDatabase();
SQLiteDatabase db = this.getWritableDatabase();
Track trk = null;
long result = 0;

Expand Down Expand Up @@ -792,7 +800,7 @@ public Track getTrack(long TrackID) {

// Get last TrackID
public long getLastTrackID() {
SQLiteDatabase db = this.getReadableDatabase();
SQLiteDatabase db = this.getWritableDatabase();
Track trk = null;
long result = 0;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* EGM96 - Singleton Java Class for Android
* Created by G.Capelli (BasicAirData) on 24/4/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Exporter - Java Class for Android
* Created by G.Capelli (BasicAirData) on 16/7/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -32,6 +31,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;


public class Exporter extends Thread {
Expand Down Expand Up @@ -94,8 +94,9 @@ public void run() {
}
}

SimpleDateFormat dfdate = new SimpleDateFormat("yyyy-MM-dd"); // date formatter for GPX timestamp
SimpleDateFormat dftime = new SimpleDateFormat("HH:mm:ss"); // time formatter for GPX timestamp
SimpleDateFormat dfdt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); // date and time formatter for GPX timestamp
dfdt.setTimeZone(TimeZone.getTimeZone("GMT"));

File KMLfile = null;
File GPXfile = null;
final String newLine = System.getProperty("line.separator");
Expand Down Expand Up @@ -242,7 +243,7 @@ public void run() {
GPXbw.write("</speed>" + newLine);
}
GPXbw.write(" <time>"); // Time
GPXbw.write(dfdate.format(loc.getLocation().getTime()) + "T" + dftime.format(loc.getLocation().getTime()) + "Z");
GPXbw.write(dfdt.format(loc.getLocation().getTime()));
GPXbw.write("</time>" + newLine);
GPXbw.write(" </trkpt>" + newLine);
}
Expand Down Expand Up @@ -327,7 +328,7 @@ public void run() {
}

GPXbw.write(" <time>"); // Time
GPXbw.write(dfdate.format(loc.getLocation().getTime()) + "T" + dftime.format(loc.getLocation().getTime()) + "Z");
GPXbw.write(dfdt.format(loc.getLocation().getTime()));
GPXbw.write("</time>" + newLine);

GPXbw.write(" <name>"); // Name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* FragmentAboutDialog - Java Class for Android
* Created by G.Capelli (BasicAirData) on 26/7/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* FragmentGPSFix - Java Class for Android
* Created by G.Capelli (BasicAirData) on 10/5/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* FragmentPlacemarkDialog - Java Class for Android
* Created by G.Capelli (BasicAirData) on 9/7/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* FragmentRecordingControls - Java Class for Android
* Created by G.Capelli (BasicAirData) on 20/5/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* SettingsFragment - Java Class for Android
* Created by G.Capelli (BasicAirData) on 23/7/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* FragmentTrack - Java Class for Android
* Created by G.Capelli (BasicAirData) on 4/6/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* FragmentTracklist - Java Class for Android
* Created by G.Capelli (BasicAirData) on 19/6/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* GPSActivity - Java Class for Android
* Created by G.Capelli (BasicAirData) on 5/5/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* GPSApplication - Java Class for Android
* Created by G.Capelli (BasicAirData) on 20/5/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -267,13 +266,16 @@ public List<Track> getTrackList() {

@Override
public void onCreate() {

// ---------------------------------------------------------------- Initialize the Database
GPSDataBase = new DatabaseHandler(this);
GPSDataBase.CreateDBifNeeded();

super.onCreate();
singleton = this;

mlocManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); // Location Manager

// ---------------------------------------------------------------- Initialize the Database
GPSDataBase = new DatabaseHandler(this);

// ---------------------------------------------------- Create the Directories if not exist
File sd = new File(Environment.getExternalStorageDirectory() + "/GPSLogger");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* LatLng - Java Class for Android
* Created by G.Capelli (BasicAirData) on 3/7/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* LocationExtended - Java Class for Android
* Created by G.Capelli (BasicAirData) on 2/6/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* SettingsActivity - Java Class for Android
* Created by G.Capelli (BasicAirData) on 23/7/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Track - Java Class for Android
* Created by G.Capelli (BasicAirData) on 1/5/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* TrackInfoAdapter - Java Class for Android
* Created by G.Capelli (BasicAirData) on 19/6/2016
* v.2.0.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/drawable/progress.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<!--
~ progress.xml
~ Created by G.Capelli (BasicAirData) on 8/6/2016
~ v.2.0.0
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/drawable/rounded_corner_dark.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<!--
~ rounded_corner_dark.xml
~ Created by G.Capelli (BasicAirData) on 8/6/2016
~ v.2.0.0
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout-land/fragment_gpsfix.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<!--
~ fragment_gpsfix.xml (land)
~ Created by G.Capelli (BasicAirData) on 8/6/2016
~ v.2.0.0
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<!--
~ fragment_recording_controls.xml (land)
~ Created by G.Capelli (BasicAirData) on 8/6/2016
~ v.2.0.0
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout-land/fragment_track.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<!--
~ fragment_track.xml (land)
~ Created by G.Capelli (BasicAirData) on 8/6/2016
~ v.2.0.0
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout-w533dp/card_trackinfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<!--
~ card_trackinfo.xml (w533dp)
~ Created by G.Capelli (BasicAirData) on 8/6/2016
~ v.2.0.0
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_gps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<!--
~ activity_gps.xml
~ Created by G.Capelli (BasicAirData) on 8/6/2016
~ v.2.0.0
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
Expand Down
Loading

0 comments on commit 046819e

Please sign in to comment.