From 958366ccabaaa2768fd4030fdb7c4cfc7ba04dd2 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 26 Dec 2015 09:42:32 +1300 Subject: [PATCH] Update project SDK and API key --- app/build.gradle | 11 ++-- app/src/main/AndroidManifest.xml | 6 +- .../org/traccar/manager/MainActivity.java | 59 +++++-------------- app/src/main/res/layout/activity_main.xml | 13 ++-- .../res/values/google_maps_api.xml | 2 +- .../release/res/values/google_maps_api.xml | 18 ------ 6 files changed, 33 insertions(+), 76 deletions(-) rename app/src/{debug => main}/res/values/google_maps_api.xml (61%) delete mode 100644 app/src/release/res/values/google_maps_api.xml diff --git a/app/build.gradle b/app/build.gradle index 9a8ffc4..e06fb40 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 22 - buildToolsVersion "22.0.1" + compileSdkVersion 23 + buildToolsVersion "23.0.1" defaultConfig { applicationId "org.traccar.manager" minSdkVersion 10 - targetSdkVersion 22 + targetSdkVersion 23 versionCode 1 versionName "1.0" } @@ -19,6 +19,7 @@ android { } dependencies { - compile 'com.android.support:appcompat-v7:22.2.1' - compile 'com.google.android.gms:play-services:7.5.0' + 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' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index dc12d49..2f2c1cd 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -14,11 +14,9 @@ android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > + - - * If it isn't installed {@link SupportMapFragment} (and - * {@link com.google.android.gms.maps.MapView MapView}) will show a prompt for the user to - * install/update the Google Play services APK on their device. - *

- * A user can return to this FragmentActivity after following the prompt and correctly - * installing/updating/enabling the Google Play services. Since the FragmentActivity may not - * have been completely destroyed during this process (it is likely that it would only be - * stopped or paused), {@link #onCreate(Bundle)} may not be called again so we should call this - * method in {@link #onResume()} to guarantee that it will be called. - */ - private void setUpMapIfNeeded() { - // Do a null check to confirm that we have not already instantiated the map. - if (mMap == null) { - // Try to obtain the map from the SupportMapFragment. - mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)) - .getMap(); - // Check if we were successful in obtaining the map. - if (mMap != null) { - setUpMap(); - } - } - } - - /** - * This is where we can add markers or lines, add listeners or move the camera. In this case, we - * just add a marker near Africa. - *

- * This should only be called once and when we are sure that {@link #mMap} is not null. - */ - private void setUpMap() { - mMap.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title("Marker")); - } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index c036319..1e523d2 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,4 +1,9 @@ - + + diff --git a/app/src/debug/res/values/google_maps_api.xml b/app/src/main/res/values/google_maps_api.xml similarity index 61% rename from app/src/debug/res/values/google_maps_api.xml rename to app/src/main/res/values/google_maps_api.xml index 27fc920..2c7a04f 100644 --- a/app/src/debug/res/values/google_maps_api.xml +++ b/app/src/main/res/values/google_maps_api.xml @@ -1,5 +1,5 @@ - AIzaSyB2sTYAPuWFpWHCP-cbGBYL2qJVmsMnfrQ + AIzaSyAMQYClXhA2tZdfCzu9EK9wUDWtCRQ6Bj0 diff --git a/app/src/release/res/values/google_maps_api.xml b/app/src/release/res/values/google_maps_api.xml deleted file mode 100644 index 66e392a..0000000 --- a/app/src/release/res/values/google_maps_api.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - YOUR_KEY_HERE - -