Skip to content

Commit ac7b88f

Browse files
TADraesekehud10837
andauthored
100.10 (Esri#866)
* pull from master * Hud10837/surface placement (Esri#832) * update java sample to new design * kotlinize * clean up * add readme and metadata details * add kotlin readme etc * Update kotlin/surface-placement/src/main/AndroidManifest.xml Co-Authored-By: TADraeseke <TADraeseke@users.noreply.github.com> * move apply block to multiple lines * make enum references all caps * remove rogue backtick * add metadata updater instructions for new files (Esri#827) * Update build.gradle * Update build.gradle * add slider * finish rebase * tweak layout * reformat * add seekbar * update readmes and format * update metadata * add s * add s * update scereenshots * revert metadata updater change * Update kotlin/surface-placement/src/main/java/com/esri/arcgisruntime/sample/surfaceplacement/MainActivity.kt Co-authored-by: TADraeseke <TADraeseke@users.noreply.github.com> * move slider and add value text * move slider java and format * make slider background opaque * edit layout * update screenshots and java sample Co-authored-by: TADraeseke <TADraeseke@users.noreply.github.com> * fix metadata snippet generation (Esri#840) * Hud10837/realistic lighting and shadows (Esri#836) * create module * working sample * rearrange * update ui * add comments and clean * update ui and metadata * complete checklist * change category * change gradle version * change data * fix time zone * fix time zone format * version number * Update kotlin/realistic-lighting-and-shadows/README.metadata.json Co-authored-by: TADraeseke <tdraeseke@esri.com> * address pr comments * block touch events below frame layout * update data and basemap * make comments two lines Co-authored-by: TADraeseke <tdraeseke@esri.com> * add lifecycle overrides Co-authored-by: TADraeseke <tdraeseke@esri.com> * Trev8939/feature linked anno (Esri#838) * initial commit * working with read only loudoun data * working prototype * rename and add readme and screenshot files * revert not sample files * add behaviour to select correct end of polyline and disallow selection of multisegment polylines * PR fixes * add fix for dot-qualified call with operator * add instructions that only straight polylines can be selected * further PR fixes * shorten toast length * update README * Hud10837/identify fixes (Esri#839) * feature layer selection * feature layer show attributes * list related features * feature layer selection kotlin * address pr comments * reformat function call Co-authored-by: TADraeseke <tdraeseke@esri.com> * separate text view name Co-authored-by: TADraeseke <tdraeseke@esri.com> * address pr comments Co-authored-by: TADraeseke <tdraeseke@esri.com> * Hud10837/readme updates (Esri#842) * animate images with image overlay * update readmes * Hud10837/layer view state (Esri#841) * create module * simplify and implement new behavior * add readme * change ui * clean up and add screenshot * change data source * add comment * address pr comments * update readme and screenshot * add hide layer option * add error message and fix ui * format errors * update metadata * implement java sample * update java readme and metadata * change string resource names * address pr comments * address pr comments * separate map view name Co-authored-by: TADraeseke <tdraeseke@esri.com> * Fix strings * move airplane mode message Co-authored-by: TADraeseke <tdraeseke@esri.com> * minor fixes feature linked anno * hud10837/readme-changes-aug-4 (Esri#845) * update readmes * update identify workflow readmes * Hud10837/group layer exclusive (Esri#844) * almost working initial kotlin version * clean code and add comments * remove toast * clean code * add readme * add exclusive radio buttons to java sample * add metadata and copyright and reformat code * address pr comments kotlin * address pr comments java * fix settings gradle * Update settings.gradle * Update settings.gradle * update open scene portal item to netherlands scene * change open scene portal item to berlin scene * rename bottom_sheet.xml and other generic xml files (Esri#848) * Hud10837/mosaic rule (Esri#847) * initial implementation * implement spinner * failing to load * clean up and add metadata * Update kotlin/apply-mosaic-rule-rasters/src/main/java/com/esri/arcgisruntime/sample/applymosaicrulerasters/MainActivity.kt Co-authored-by: TADraeseke <tdraeseke@esri.com> * Update kotlin/apply-mosaic-rule-rasters/src/main/java/com/esri/arcgisruntime/sample/applymosaicrulerasters/MainActivity.kt Co-authored-by: TADraeseke <tdraeseke@esri.com> * remove ags * change data * Update kotlin/apply-mosaic-rule-rasters/README.md Co-authored-by: TADraeseke <tdraeseke@esri.com> * Update kotlin/apply-mosaic-rule-rasters/README.md Co-authored-by: TADraeseke <tdraeseke@esri.com> Co-authored-by: TADraeseke <tdraeseke@esri.com> * add try/catch to configure subnetwork trace add (Esri#849) * make smaller barrier in route around barriers and give checkbox unique name in group layers (Esri#851) * Hud10837/route tracker (Esri#850) * buggy * add route tracker location data source to navigate route * add route tracker location data source * Update kotlin/navigate-route/src/main/java/com/esri/arcgisruntime/sample/navigateroute/MainActivity.kt Co-authored-by: TADraeseke <tdraeseke@esri.com> * Update kotlin/navigate-route/src/main/java/com/esri/arcgisruntime/sample/navigateroute/MainActivity.kt Co-authored-by: TADraeseke <tdraeseke@esri.com> * Update kotlin/navigate-route/README.md Co-authored-by: TADraeseke <tdraeseke@esri.com> * update java readme Co-authored-by: TADraeseke <tdraeseke@esri.com> * update sample to congressional districts (Esri#852) * Trev8939/update dependency versions (Esri#853) * set versions to 100.9 * rename mosaic rule * Update README.md * Update version.gradle * Update version.gradle * http to https Merging this to test in daily build * Hud10837/edit with branch versioning (Esri#855) * initial veprototype almost working * debugging * working prototype * change method of getting createdversionname * the same but better * add comments and kdoc * add lifecycle overrides * separate edit location into its own button * clean up * remove redundant boolean * clear selection on cancel * remove redundant defaultversionname member * remove redundant currentversionname member * clean up dialog builders * fix typo * update metadata * update category * update edit with branch versioning * update edit with branch versioning (Esri#858) Co-authored-by: trev8939 <tdraeseke@esri.com> * set version.gradle up U10 * give unique name and password * update integrated mesh layer screenshots * fix edit with branch versioning screenshot * Update README.metadata.json * Update README.metadata.json * Samples to new metered basemaps (Esri#862) * up to and including display map * add comment and done up to feature layer selection * all kotlin samples to metered basemaps * up to and including display map * part way up to find service area * up to feature layer geodatabase * all new basemaps * fix viewpoint setter and update readmes * set initial viewpoint to map view setter * increment to 100.10 release * increment to 100.10 * update README and build.gradle files * Update README.md * Update README.md * Update README.md Co-authored-by: hud10837 <hud10837@esri.com> Co-authored-by: TADraeseke <TADraeseke@users.noreply.github.com> Co-authored-by: hud10837 <hmiears@esri.com>
1 parent 69ab096 commit ac7b88f

File tree

337 files changed

+2664
-1963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+2664
-1963
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
# Overview
2-
ArcGIS Runtime SDK for Android v100.9.0 samples. The `master` branch of this repository contains sample app modules for the latest available version of the [ArcGIS Runtime SDK for Android](https://developers.arcgis.com/android/). Samples released under older versions can be found through the [git tags](https://github.com/Esri/arcgis-runtime-samples-android/tags). Please read our [wiki](https://github.com/Esri/arcgis-runtime-samples-android/wiki) for help with working with this repository.
2+
ArcGIS Runtime SDK for Android v100.10.0 samples. The `master` branch of this repository contains sample app modules for the latest available version of the [ArcGIS Runtime SDK for Android](https://developers.arcgis.com/android/). Samples released under older versions can be found through the [git tags](https://github.com/Esri/arcgis-runtime-samples-android/tags). Please read our [wiki](https://github.com/Esri/arcgis-runtime-samples-android/wiki) for help with working with this repository.
33

44
# Prerequisites
55
* The samples are building with `compileSdkVersion 29`
66
* [Android Studio](http://developer.android.com/sdk/index.html)
7+
* [An ArcGIS Developers API key](https://developers.arcgis.com/android/get-started/#3-get-an-api-key)
78

89
## Developer Instructions
910
Please read our [developer instructions wiki page](https://github.com/Esri/arcgis-runtime-samples-android/wiki/dev-instructions) to set up your developer environment with Android Studio. Instructions include forking and cloning the repository for those new to Git.
1011

12+
## Accessing Esri location services
13+
Accessing Esri location services, including basemaps, routing, and geocoding, requires authentication using either an API Key or an ArcGIS identity:
14+
1. API key: A permanent key that gives your application access to Esri location services. Visit your [ArcGIS Developers Dashboard](https://developers.arcgis.com/dashboard) to create a new API key or access an existing API key.
15+
16+
The Android samples in this repository have been structured to use an API key, set once, which will run in all samples. Set your API key in the `gradle.properties` file located in the `/.gradle` folder within your home directory (`/Users/<user_name>/.gradle/gradle.properties`). The API_KEY property should contain quotes around the key itself: `API_KEY = "YOUR_API_KEY"`
17+
18+
2. ArcGIS identity: An ArcGIS named user account that is a member of an organization in ArcGIS Online or ArcGIS Enterprise.
19+
1120
## Run a sample
1221
Once you have set up your developer environment you can run any sample from within Android Studio by selecting the app module from the **Edit Configurations** drop down and clicking the **Run** button from the toolbar.
1322

@@ -57,7 +66,7 @@ Anyone and everyone is welcome to [contribute](.github/CONTRIBUTING.md). We do a
5766
Please see our [guidelines for contributing doc](https://github.com/Esri/contributing/blob/master/README.md)
5867

5968
## Licensing
60-
Copyright 2020 Esri
69+
Copyright 2021 Esri
6170

6271
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
6372

java/add-enc-exchange-set/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ android {
99
targetSdkVersion rootProject.ext.targetSdkVersion
1010
versionCode rootProject.ext.versionCode
1111
versionName rootProject.ext.versionName
12+
buildConfigField("String", "API_KEY", API_KEY)
1213
}
1314

1415
buildTypes {

java/add-enc-exchange-set/src/main/java/com/esri/arcgisruntime/sample/addencexchangeset/MainActivity.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import android.widget.Toast;
2626

2727
import androidx.appcompat.app.AppCompatActivity;
28+
import com.esri.arcgisruntime.ArcGISRuntimeEnvironment;
2829
import com.esri.arcgisruntime.geometry.Envelope;
2930
import com.esri.arcgisruntime.geometry.GeometryEngine;
3031
import com.esri.arcgisruntime.hydrography.EncCell;
@@ -34,7 +35,7 @@
3435
import com.esri.arcgisruntime.layers.EncLayer;
3536
import com.esri.arcgisruntime.loadable.LoadStatus;
3637
import com.esri.arcgisruntime.mapping.ArcGISMap;
37-
import com.esri.arcgisruntime.mapping.Basemap;
38+
import com.esri.arcgisruntime.mapping.BasemapStyle;
3839
import com.esri.arcgisruntime.mapping.Viewpoint;
3940
import com.esri.arcgisruntime.mapping.view.MapView;
4041

@@ -52,10 +53,14 @@ protected void onCreate(Bundle savedInstanceState) {
5253
super.onCreate(savedInstanceState);
5354
setContentView(R.layout.activity_main);
5455

56+
// authentication with an API key or named user is required to access basemaps and other
57+
// location services
58+
ArcGISRuntimeEnvironment.setApiKey(BuildConfig.API_KEY);
59+
5560
// get a reference to the map view
5661
mMapView = findViewById(R.id.mapView);
5762
// create a map with the BasemapType topographic
58-
ArcGISMap map = new ArcGISMap(Basemap.createOceans());
63+
ArcGISMap map = new ArcGISMap(BasemapStyle.ARCGIS_OCEANS);
5964
// set the map to be displayed in this view
6065
mMapView.setMap(map);
6166

java/add-features-feature-service/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ android {
99
targetSdkVersion rootProject.ext.targetSdkVersion
1010
versionCode rootProject.ext.versionCode
1111
versionName rootProject.ext.versionName
12+
buildConfigField("String", "API_KEY", API_KEY)
1213
}
1314

1415
buildTypes {

java/add-features-feature-service/src/main/java/com/esri/arcgisruntime/sample/addfeaturesfeatureservice/MainActivity.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,22 @@
2222
import java.util.concurrent.ExecutionException;
2323

2424
import android.os.Bundle;
25-
import androidx.annotation.Nullable;
26-
import androidx.appcompat.app.AppCompatActivity;
2725
import android.util.Log;
2826
import android.view.MotionEvent;
2927
import android.widget.Toast;
3028

29+
import androidx.annotation.Nullable;
30+
import androidx.appcompat.app.AppCompatActivity;
31+
import com.esri.arcgisruntime.ArcGISRuntimeEnvironment;
3132
import com.esri.arcgisruntime.concurrent.ListenableFuture;
3233
import com.esri.arcgisruntime.data.Feature;
3334
import com.esri.arcgisruntime.data.FeatureEditResult;
3435
import com.esri.arcgisruntime.data.ServiceFeatureTable;
3536
import com.esri.arcgisruntime.geometry.Point;
3637
import com.esri.arcgisruntime.layers.FeatureLayer;
3738
import com.esri.arcgisruntime.mapping.ArcGISMap;
38-
import com.esri.arcgisruntime.mapping.Basemap;
39+
import com.esri.arcgisruntime.mapping.BasemapStyle;
40+
import com.esri.arcgisruntime.mapping.Viewpoint;
3941
import com.esri.arcgisruntime.mapping.view.DefaultMapViewOnTouchListener;
4042
import com.esri.arcgisruntime.mapping.view.MapView;
4143

@@ -51,10 +53,14 @@ public class MainActivity extends AppCompatActivity {
5153
super.onCreate(savedInstanceState);
5254
setContentView(R.layout.activity_main);
5355

56+
// authentication with an API key or named user is required to access basemaps and other
57+
// location services
58+
ArcGISRuntimeEnvironment.setApiKey(BuildConfig.API_KEY);
59+
5460
mMapView = findViewById(R.id.mapView);
5561

5662
// create a map with streets basemap
57-
ArcGISMap map = new ArcGISMap(Basemap.Type.STREETS, 40.0, -95.0, 4);
63+
ArcGISMap map = new ArcGISMap(BasemapStyle.ARCGIS_STREETS);
5864

5965
// create service feature table from URL
6066
mServiceFeatureTable = new ServiceFeatureTable(getString(R.string.service_layer_url));
@@ -83,6 +89,7 @@ public class MainActivity extends AppCompatActivity {
8389

8490
// set map to be displayed in map view
8591
mMapView.setMap(map);
92+
mMapView.setViewpoint(new Viewpoint( 40.0, -95.0, 10000000.0));
8693
}
8794

8895
/**

java/add-graphics-renderer/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ android {
99
targetSdkVersion rootProject.ext.targetSdkVersion
1010
versionCode rootProject.ext.versionCode
1111
versionName rootProject.ext.versionName
12+
buildConfigField("String", "API_KEY", API_KEY)
1213
}
1314
buildTypes {
1415
release {

java/add-graphics-renderer/src/main/java/com/esri/arcgisruntime/sample/addgraphicsrenderer/MainActivity.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@
1818

1919
import android.graphics.Color;
2020
import android.os.Bundle;
21-
import androidx.appcompat.app.AppCompatActivity;
2221

22+
import androidx.appcompat.app.AppCompatActivity;
23+
import com.esri.arcgisruntime.ArcGISRuntimeEnvironment;
2324
import com.esri.arcgisruntime.geometry.Point;
2425
import com.esri.arcgisruntime.geometry.PolygonBuilder;
2526
import com.esri.arcgisruntime.geometry.PolylineBuilder;
2627
import com.esri.arcgisruntime.geometry.SpatialReferences;
2728
import com.esri.arcgisruntime.mapping.ArcGISMap;
28-
import com.esri.arcgisruntime.mapping.Basemap;
29+
import com.esri.arcgisruntime.mapping.BasemapStyle;
30+
import com.esri.arcgisruntime.mapping.Viewpoint;
2931
import com.esri.arcgisruntime.mapping.view.Graphic;
3032
import com.esri.arcgisruntime.mapping.view.GraphicsOverlay;
3133
import com.esri.arcgisruntime.mapping.view.MapView;
@@ -43,14 +45,19 @@ protected void onCreate(Bundle savedInstanceState) {
4345
super.onCreate(savedInstanceState);
4446
setContentView(R.layout.activity_main);
4547

48+
// authentication with an API key or named user is required to access basemaps and other
49+
// location services
50+
ArcGISRuntimeEnvironment.setApiKey(BuildConfig.API_KEY);
51+
4652
// create MapView from layout
47-
mMapView = (MapView) findViewById(R.id.mapView);
53+
mMapView = findViewById(R.id.mapView);
4854
// create a map with the Basemap Type topographic
49-
ArcGISMap mMap = new ArcGISMap(Basemap.Type.TOPOGRAPHIC, 15.169193, 16.333479, 2);
55+
ArcGISMap map = new ArcGISMap(BasemapStyle.ARCGIS_TOPOGRAPHIC);
5056
// add graphics overlay
5157
addGraphicsOverlay();
5258
// set the map to be displayed in this view
53-
mMapView.setMap(mMap);
59+
mMapView.setMap(map);
60+
mMapView.setViewpoint(new Viewpoint(15.169193, 16.333479, 100000000.0));
5461
}
5562

5663
private void addGraphicsOverlay() {

java/add-graphics-with-symbols/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ android {
99
targetSdkVersion rootProject.ext.targetSdkVersion
1010
versionCode rootProject.ext.versionCode
1111
versionName rootProject.ext.versionName
12+
buildConfigField("String", "API_KEY", API_KEY)
1213
}
1314
buildTypes {
1415
release {

java/add-graphics-with-symbols/src/main/java/com/esri/arcgisruntime/sample/addgraphicswithsymbols/MainActivity.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@
1818

1919
import android.graphics.Color;
2020
import android.os.Bundle;
21-
import androidx.appcompat.app.AppCompatActivity;
2221

22+
import androidx.appcompat.app.AppCompatActivity;
23+
import com.esri.arcgisruntime.ArcGISRuntimeEnvironment;
2324
import com.esri.arcgisruntime.geometry.Point;
2425
import com.esri.arcgisruntime.geometry.PointCollection;
2526
import com.esri.arcgisruntime.geometry.Polygon;
2627
import com.esri.arcgisruntime.geometry.Polyline;
2728
import com.esri.arcgisruntime.geometry.SpatialReference;
2829
import com.esri.arcgisruntime.geometry.SpatialReferences;
2930
import com.esri.arcgisruntime.mapping.ArcGISMap;
30-
import com.esri.arcgisruntime.mapping.Basemap;
31+
import com.esri.arcgisruntime.mapping.BasemapStyle;
32+
import com.esri.arcgisruntime.mapping.Viewpoint;
3133
import com.esri.arcgisruntime.mapping.view.Graphic;
3234
import com.esri.arcgisruntime.mapping.view.GraphicsOverlay;
3335
import com.esri.arcgisruntime.mapping.view.MapView;
@@ -46,12 +48,17 @@ protected void onCreate(Bundle savedInstanceState) {
4648
super.onCreate(savedInstanceState);
4749
setContentView(R.layout.activity_main);
4850

51+
// authentication with an API key or named user is required to access basemaps and other
52+
// location services
53+
ArcGISRuntimeEnvironment.setApiKey(BuildConfig.API_KEY);
54+
4955
// inflate MapView from layout
50-
mMapView = (MapView) findViewById(R.id.mapView);
56+
mMapView = findViewById(R.id.mapView);
5157
// create a map with the BasemapType topographic
52-
ArcGISMap map = new ArcGISMap(Basemap.Type.OCEANS, 56.075844, -2.681572, 11);
58+
ArcGISMap map = new ArcGISMap(BasemapStyle.ARCGIS_OCEANS);
5359
// set the map to be displayed in this view
5460
mMapView.setMap(map);
61+
mMapView.setViewpoint(new Viewpoint(56.075844, -2.681572, 100000.0));
5562
// add graphics overlay to MapView.
5663
GraphicsOverlay graphicsOverlay = addGraphicsOverlay(mMapView);
5764
//add some buoy positions to the graphics overlay

java/analyze-hotspots/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ android {
99
targetSdkVersion rootProject.ext.targetSdkVersion
1010
versionCode rootProject.ext.versionCode
1111
versionName rootProject.ext.versionName
12+
buildConfigField("String", "API_KEY", API_KEY)
1213
}
1314

1415
buildTypes {

0 commit comments

Comments
 (0)