From 76a62f9fafd7e1aebac866438d3d7610ca632f54 Mon Sep 17 00:00:00 2001 From: Tobrun Van Nuland Date: Mon, 22 Aug 2016 14:40:59 +0200 Subject: [PATCH] [android] #5977 - MyLocationView.setPadding example + formatting Manifest --- .../src/main/AndroidManifest.xml | 111 ++++++----- .../activity/FeatureOverviewActivity.java | 1 + .../navigation/CarDrivingActivity.java | 187 ++++++++++++++++++ .../drawable-xxxhdpi/ic_taxi_top_small.png | Bin 0 -> 10087 bytes .../main/res/layout/activity_car_driving.xml | 24 +++ .../src/main/res/values/strings.xml | 2 + .../android/scripts/generate-test-code.js | 2 +- 7 files changed, 274 insertions(+), 53 deletions(-) create mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/navigation/CarDrivingActivity.java create mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_taxi_top_small.png create mode 100644 platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_car_driving.xml diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml index 1a46671adeb..d582719af66 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml @@ -1,12 +1,12 @@ - + - - - - - + + + + + - - + + + android:value="@string/category_infowindow" /> + android:value="@string/category_infowindow" /> + android:value="@string/category_infowindow" /> + android:value="@string/category_annotation" /> + android:value="@string/category_annotation" /> + android:value="@string/category_annotation" /> + android:value="@string/category_annotation" /> + android:value="@string/category_camera" /> + android:value="@string/category_camera" /> + android:value="@string/category_camera" /> + android:value="@string/category_fragment" /> + android:value="@string/category_fragment" /> + android:value="@string/category_camera" /> + android:value="@string/category_camera" /> + android:value="@string/category_custom_layer" /> + android:value="@string/category_userlocation" /> + android:value="@string/category_userlocation" /> + android:value="@string/category_userlocation" /> + android:value="@string/category_userlocation" /> + android:value="@string/category_annotation" /> + android:value="@string/category_annotation" /> + android:value="@string/category_directions" /> + android:value="@string/category_geocoding" /> + android:value="@string/category_camera" /> + android:value="@string/category_maplayout" /> + android:value="@string/category_maplayout" /> + android:value="@string/category_offline" /> + android:value="@string/category_imagegenerator" /> + android:value="@string/category_maplayout" /> + android:value="@string/category_annotation" /> + android:value="@string/category_annotation" /> + android:value="@string/category_navigation" /> + android:value="@string/category_fragment" /> + android:value="@string/category_fragment" /> + android:value="@string/category_style" /> + android:value="@string/category_imagegenerator" /> + android:value="@string/category_maplayout" /> @@ -359,25 +359,32 @@ android:name="@string/category" android:value="@string/category_features" /> - + + + - - + + + android:value="https://cloudfront-staging.tilestream.net" /> + android:value="sk.eyJ1IjoiYmxlZWdlIiwiYSI6InNpcml1c2x5In0.KyT-boMyC_xZYTYojTc8zg" /> - + diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/FeatureOverviewActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/FeatureOverviewActivity.java index 69e9cf04889..de5af8f170a 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/FeatureOverviewActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/FeatureOverviewActivity.java @@ -208,6 +208,7 @@ private boolean requiresLocationPermission(String name, String category) { { add(resources.getString(R.string.activity_double_map)); add(getString(R.string.activity_location_picker)); + add(getString(R.string.activity_car_driving)); } }; diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/navigation/CarDrivingActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/navigation/CarDrivingActivity.java new file mode 100644 index 00000000000..2ef5fefc753 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/navigation/CarDrivingActivity.java @@ -0,0 +1,187 @@ +package com.mapbox.mapboxsdk.testapp.activity.navigation; + +import android.Manifest; +import android.content.pm.PackageManager; +import android.graphics.Color; +import android.graphics.PorterDuff; +import android.graphics.drawable.Drawable; +import android.location.Location; +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.annotation.UiThread; +import android.support.v4.app.ActivityCompat; +import android.support.v4.content.ContextCompat; +import android.support.v4.content.res.ResourcesCompat; +import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.Toolbar; +import android.view.MenuItem; + + +import com.mapbox.mapboxsdk.camera.CameraPosition; +import com.mapbox.mapboxsdk.camera.CameraUpdateFactory; +import com.mapbox.mapboxsdk.constants.MyBearingTracking; +import com.mapbox.mapboxsdk.constants.MyLocationTracking; +import com.mapbox.mapboxsdk.geometry.LatLng; +import com.mapbox.mapboxsdk.maps.MapView; +import com.mapbox.mapboxsdk.maps.MapboxMap; +import com.mapbox.mapboxsdk.maps.OnMapReadyCallback; +import com.mapbox.mapboxsdk.maps.TrackingSettings; +import com.mapbox.mapboxsdk.maps.widgets.MyLocationViewSettings; +import com.mapbox.mapboxsdk.testapp.R; + +public class CarDrivingActivity extends AppCompatActivity implements MapboxMap.OnMyLocationChangeListener { + + private MapView mMapView; + private MapboxMap mapboxMap; + private Location mLocation; + private static final int PERMISSIONS_LOCATION = 0; + + @Override + protected void onCreate(final Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_car_driving); + + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + + final ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + actionBar.setDisplayHomeAsUpEnabled(true); + actionBar.setDisplayShowHomeEnabled(true); + } + + mMapView = (MapView) findViewById(R.id.mapView); + mMapView.onCreate(savedInstanceState); + mMapView.getMapAsync(new OnMapReadyCallback() { + @Override + public void onMapReady(@NonNull MapboxMap mapboxMap) { + CarDrivingActivity.this.mapboxMap = mapboxMap; + + // view settings + MyLocationViewSettings settings = mapboxMap.getMyLocationViewSettings(); + settings.setPadding(getWindow().getDecorView().getMeasuredHeight() / 3, getWindow().getDecorView().getMeasuredHeight() / 3, 0, 0); + + // get car + Drawable car = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_taxi_top_small, getTheme()); + settings.setForegroundTintColor(Color.TRANSPARENT); + settings.setForegroundDrawable(car, car); + + // remove accuracy circle + settings.setAccuracyAlpha(0); + + // disable dismissal when a gesture occurs + TrackingSettings trackingSettings = mapboxMap.getTrackingSettings(); + trackingSettings.setDismissLocationTrackingOnGesture(false); + trackingSettings.setDismissBearingTrackingOnGesture(false); + + mapboxMap.setOnMyLocationChangeListener(CarDrivingActivity.this); + + if (savedInstanceState == null) { + toggleGps(true); + } + } + }); + } + + @UiThread + public void toggleGps(boolean enableGps) { + if (enableGps) { + if ((ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) || + (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED)) { + ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSIONS_LOCATION); + } else { + enableLocation(true); + } + } else { + enableLocation(false); + } + } + + private void enableLocation(boolean enabled) { + if (enabled) { + mapboxMap.setMyLocationEnabled(true); + Location location = mapboxMap.getMyLocation(); + if (location != null) { + setInitialPosition(new LatLng(location)); + } + } else { + mapboxMap.setMyLocationEnabled(false); + } + } + + @Override + public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults) { + switch (requestCode) { + case PERMISSIONS_LOCATION: { + if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { + enableLocation(true); + } + } + } + } + + private void setInitialPosition(LatLng latLng) { + mapboxMap.moveCamera(CameraUpdateFactory.newCameraPosition( + new CameraPosition.Builder().target(latLng).zoom(15).tilt(20f).build())); + mapboxMap.setMyLocationEnabled(true); + + TrackingSettings trackingSettings = mapboxMap.getTrackingSettings(); + trackingSettings.setMyLocationTrackingMode(MyLocationTracking.TRACKING_FOLLOW); + //ยง trackingSettings.setMyBearingTrackingMode(MyBearingTracking.GPS); + } + + @Override + public void onMyLocationChange(@Nullable Location location) { + if (location != null) { + if (mLocation == null) { + // initial location to reposition map + setInitialPosition(new LatLng(location)); + } + mLocation = location; + } + } + + @Override + public void onResume() { + super.onResume(); + mMapView.onResume(); + } + + @Override + public void onPause() { + super.onPause(); + mMapView.onPause(); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + mMapView.onSaveInstanceState(outState); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + mMapView.onDestroy(); + } + + @Override + public void onLowMemory() { + super.onLowMemory(); + mMapView.onLowMemory(); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + onBackPressed(); + return true; + default: + return super.onOptionsItemSelected(item); + } + } + +} diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_taxi_top_small.png b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/drawable-xxxhdpi/ic_taxi_top_small.png new file mode 100644 index 0000000000000000000000000000000000000000..e04c1991609bf74a48eb3e594446d888b2ba6c36 GIT binary patch literal 10087 zcmY*;b95!nvh|6boY+n##))QP+qP}n=ER=Zwrz7Vu{FWOcHaE%z2E)b>$SSOx_Z~% zUEP1x>PQ7SaU^&=cmM!^Bq<@H^mk_Y+dW{R|BiKU`JDg&BDSTlu!5wpFo}Yby_uzr zDF7f5nW7G(p*)V2qpbuB#{dMQ$^RrfnH3_SfLEGiOe6&`ws!C$@+rfDSK!OUS za&}tL1QL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Vi3v3?3_o9TTu9G_30y8-d> z-tXC|`<;JL=WE8?YRTxT>J9a)A|z)7TZYrfvk^Dh?SF5%bm4I2xQNS5iMSZfGSV^p z&MC70zFIN@*Zz3Xv{BbA?e`|5)bmy%a3w4*;EBg$aEhlVY1ltC{+qXH z%qZk zPnU};xz!$tUceQG?WPbb$?oz#Q^`*a%`>I6``)VS429@3{4X!Vp2wI?&)_|zCI=Qn z5iMr3KO_ytY+bq>PjvZdyRAnK)7;p{zVgM6Z~4Nlc5bH}>7jYH=7!YA2gJh`pyt4+ zA^x)Kg`W)aZr1S>C9+>5)oLIkmy{s>9g89Iv=>?iSGF(q9;EVdCD<(Dw^Wa5SoA5l zWUaZC2zpsh_>u;c|VmecB@nr=R)%} z4#nLS+hlcu#!^zG$eFW%TvA*sZI@Ta?hEN+HZB%l>aq@p0@R-x!Kd-6wwpYiaLTmp zen^`g<7)~%1040b9=?@lUdi(9MAWW;e3xHjx&?(U1FvF-D?r8&@CF$UW-wlIK)@8o ziU+Y6ai}0@Z`U)#a(5`v^%@2L!27HTj3byM`K8QzAk8)Nx_H3x)6slkCp!#w$5sUa z(1a{py1J)tIoge&Uwirsw@A8Q4H3kyK*u?f7SNt43{Med7+qey;b?5JQ`>$Sybv@^ zuH0rBEDbTrY>W&Zq-J5bK z|Ftgu(->!2>~_Fw#78GywruXsQsMk9O<+8|e3svCg<8^3Xly)0=DD}}1==6LBc1z6 z0quG{hXR;?MM~}Q!{6?VPbh#9T5K-`L$}XF#pghA{tI=yFB9 zcJ89{Ql1>6Tdj|?ojTVHC#!!6^4;-zFe)1jDZk2Is4Ll8m}i*wBld~57Wm!V=K&FM z8W6H~oDRmUZ5B*~CK+?X0-Y+eH#lYvcFFwkx)l(kmvlYQ`E+_S4w literal 0 HcmV?d00001 diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_car_driving.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_car_driving.xml new file mode 100644 index 00000000000..c61055ee4e4 --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_car_driving.xml @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml index 4436e40200b..d8f2edd85ec 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml @@ -38,6 +38,7 @@ Location Picker + Driving animation Double Map Activity @@ -106,6 +107,7 @@ Query rendered feature properties on click Count all rendered features in box Hightligh buildings in box + MyLocationView follow map update example Concurrent Open InfoWindows Deselect Markers On Tap diff --git a/platform/android/scripts/generate-test-code.js b/platform/android/scripts/generate-test-code.js index 016e1c53fec..07efd9daa35 100644 --- a/platform/android/scripts/generate-test-code.js +++ b/platform/android/scripts/generate-test-code.js @@ -14,7 +14,7 @@ global.camelize = function (str) { } -const excludeActivities = ["MyLocationTrackingModeActivity","MyLocationToggleActivity","MyLocationTintActivity","MyLocationDrawableActivity","DoubleMapActivity", "LocationPickerActivity","GeoJsonClusteringActivity","RuntimeStyleTestActivity", "AnimatedMarkerActivity", "ViewPagerActivity","MapFragmentActivity","SupportMapFragmentActivity","SnapshotActivity","NavigationDrawerActivity"]; +const excludeActivities = ["CarDrivingActivity","MyLocationTrackingModeActivity","MyLocationToggleActivity","MyLocationTintActivity","MyLocationDrawableActivity","DoubleMapActivity", "LocationPickerActivity","GeoJsonClusteringActivity","RuntimeStyleTestActivity", "AnimatedMarkerActivity", "ViewPagerActivity","MapFragmentActivity","SupportMapFragmentActivity","SnapshotActivity","NavigationDrawerActivity"]; const appBasePath = 'platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity'; const testBasePath = 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/activity/gen'; const subPackages = fs.readdirSync(appBasePath);