From b5375c8832963070917d572ed520345f75f1b9a8 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 5 Nov 2016 10:38:13 +1300 Subject: Start app from scratch --- app/build.gradle | 19 +++++----- .../java/org/traccar/manager/ApplicationTest.java | 13 ------- app/src/main/AndroidManifest.xml | 18 ++------- .../java/org/traccar/manager/MainActivity.java | 42 +++++++++------------ app/src/main/res/layout/activity_main.xml | 6 +-- app/src/main/res/mipmap-hdpi/ic_launcher.png | Bin 3418 -> 3361 bytes app/src/main/res/mipmap-mdpi/ic_launcher.png | Bin 2206 -> 2065 bytes app/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 4842 -> 4780 bytes app/src/main/res/mipmap-xxhdpi/ic_launcher.png | Bin 7718 -> 7703 bytes app/src/main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 11220 bytes app/src/main/res/values/google_maps_api.xml | 5 --- app/src/main/res/values/strings.xml | 3 +- app/src/main/res/values/styles.xml | 4 +- build.gradle | 7 +--- gradle/wrapper/gradle-wrapper.properties | 3 +- 15 files changed, 38 insertions(+), 82 deletions(-) delete mode 100644 app/src/androidTest/java/org/traccar/manager/ApplicationTest.java create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher.png delete mode 100644 app/src/main/res/values/google_maps_api.xml diff --git a/app/build.gradle b/app/build.gradle index e06fb40..7a3cfe5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,25 +1,26 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" + compileSdkVersion 24 + buildToolsVersion "23.0.3" defaultConfig { applicationId "org.traccar.manager" - minSdkVersion 10 - targetSdkVersion 23 - versionCode 1 - versionName "1.0" + minSdkVersion 14 + targetSdkVersion 24 + versionCode 10 + versionName "2.0" } + buildTypes { release { minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt') } } } dependencies { - compile 'com.android.support:appcompat-v7:23.1.0' - compile 'com.google.android.gms:play-services:8.4.0' - compile 'com.squareup.retrofit:retrofit:2.0.0-beta2' + testCompile 'junit:junit:4.12' + testCompile 'org.robolectric:robolectric:3.0' } diff --git a/app/src/androidTest/java/org/traccar/manager/ApplicationTest.java b/app/src/androidTest/java/org/traccar/manager/ApplicationTest.java deleted file mode 100644 index 25062ea..0000000 --- a/app/src/androidTest/java/org/traccar/manager/ApplicationTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.traccar.manager; - -import android.app.Application; -import android.test.ApplicationTestCase; - -/** - * Testing Fundamentals - */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2f2c1cd..d4bd89b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,33 +1,23 @@ + package="org.traccar.manager"> - - - - - - - + android:theme="@style/AppTheme"> + android:name=".MainActivity"> - + diff --git a/app/src/main/java/org/traccar/manager/MainActivity.java b/app/src/main/java/org/traccar/manager/MainActivity.java index 68d5135..c8d202d 100644 --- a/app/src/main/java/org/traccar/manager/MainActivity.java +++ b/app/src/main/java/org/traccar/manager/MainActivity.java @@ -1,36 +1,30 @@ +/* + * Copyright 2016 Anton Tananaev (anton@traccar.org) + * + * 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package org.traccar.manager; +import android.app.Activity; import android.os.Bundle; -import android.support.v4.app.FragmentActivity; -import com.google.android.gms.maps.CameraUpdateFactory; -import com.google.android.gms.maps.GoogleMap; -import com.google.android.gms.maps.OnMapReadyCallback; -import com.google.android.gms.maps.SupportMapFragment; -import com.google.android.gms.maps.model.LatLng; -import com.google.android.gms.maps.model.MarkerOptions; - -public class MainActivity extends FragmentActivity implements OnMapReadyCallback { - - private GoogleMap map; +public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - // Obtain the SupportMapFragment and get notified when the map is ready to be used. - SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() - .findFragmentById(R.id.map); - mapFragment.getMapAsync(this); - } - - @Override - public void onMapReady(GoogleMap googleMap) { - map = googleMap; - - LatLng sydney = new LatLng(-34, 151); - map.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney")); - map.moveCamera(CameraUpdateFactory.newLatLng(sydney)); } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 1e523d2..3d47df2 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,9 +1,7 @@ - - diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png index cde69bc..56d818d 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png index c133a0c..dcb1f79 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png index bfa42f0..4c368f4 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 324e72c..2bfb40b 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..edf7f6f Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/values/google_maps_api.xml b/app/src/main/res/values/google_maps_api.xml deleted file mode 100644 index 2c7a04f..0000000 --- a/app/src/main/res/values/google_maps_api.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - AIzaSyAMQYClXhA2tZdfCzu9EK9wUDWtCRQ6Bj0 - - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6b4abc1..482efed 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,4 +1,3 @@ - TraccarManager - Main + Traccar Manager diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 766ab99..44ec70b 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,8 +1,6 @@ - - diff --git a/build.gradle b/build.gradle index 1b7886d..7a8e3ab 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,9 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - buildscript { repositories { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files + classpath 'com.android.tools.build:gradle:2.2.0' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4a1684f..dbdc05d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Wed Sep 02 15:52:58 NZST 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip -- cgit v1.2.3