Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #645 from Esri/100.6
Browse files Browse the repository at this point in the history
100.6
  • Loading branch information
tschie committed Aug 22, 2019
2 parents 754174e + e93c065 commit 20a05c7
Show file tree
Hide file tree
Showing 88 changed files with 1,983 additions and 68 deletions.
4 changes: 2 additions & 2 deletions README.md
@@ -1,5 +1,5 @@
# Overview
ArcGIS Runtime SDK for Android v100.5.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.
ArcGIS Runtime SDK for Android v100.6.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.

# Prerequisites
* The samples are building with `compileSdkVersion 28`
Expand All @@ -8,7 +8,7 @@ ArcGIS Runtime SDK for Android v100.5.0 samples. The `master` branch of this re
## SDK Maven repo
The SDK is available through the Bintray Maven repo, you can take a look at the repository with the link below:

[ ![Download](https://api.bintray.com/packages/esri/arcgis/arcgis-android/images/download.svg?version=100.5.0) ](https://bintray.com/esri/arcgis/arcgis-android/100.5.0/link)
[ ![Download](https://api.bintray.com/packages/esri/arcgis/arcgis-android/images/download.svg?version=100.6.0) ](https://bintray.com/esri/arcgis/arcgis-android/100.6.0/link)

## Developer Instructions
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.
Expand Down
@@ -0,0 +1 @@
/build
61 changes: 61 additions & 0 deletions java/apply-scheduled-updates-to-preplanned-map-area/README.md
@@ -0,0 +1,61 @@
# Apply scheduled updates to preplanned map area

Apply scheduled updates to a downloaded preplanned map area.

![Apply scheduled updates to preplanned map area app](apply-scheduled-updates-to-preplanned-map-area.png)

## Use case

With scheduled updates, the author can update the features within the preplanned areas on the service once, and multiple end-users can request these updates to bring their local copies up to date with the most recent state. Importantly, any number of end-users can download the same set of cached updates which means that this workflow is extremely scalable for large operations where you need to minimize load on the server.

This workflow can be used by survey workers operating in remote areas where network connectivity is not available. The workers could download mobile map packages to their individual devices and perform their work normally. Once they regain internet connectivity, the mobile map packages can be updated to show any new features that have been added to the online service.

## How to use the sample

Start the app. It will display an offline map, check for available updates, and show update availability and size. Select 'Apply Updates' to apply the updates to the local offline map and show the results.

## How it works

1. Create an `OfflineMapSyncTask` with your offline map.
2. If desired, get `OfflineMapUpdatesInfo` from the task to check for update availability or update size.
3. Get a set of default `OfflineMapSyncParameters` for the task.
4. Set the parameters to download all available updates.
5. Use the parameters to create an `OfflineMapSyncJob`.
6. Start the job and get the results once it completes successfully.
7. Check if the mobile map package needs to be reopened, and do so if necessary.
8. Finally, display your offline map to see the changes.

## Relevant API

* MobileMapPackage
* OfflineMapSyncJob
* OfflineMapSyncParameters
* OfflineMapSyncResult
* OfflineMapSyncTask
* OfflineMapUpdatesInfo

## Offline Data
1. Download the data from [ArcGIS Online](https://arcgisruntime.maps.arcgis.com/home/item.html?id=740b663bff5e4198b9b6674af93f638a).
2. Extract the contents of the downloaded zip file to disk.
2. Open your command prompt and navigate to the folder where you extracted the contents of the data from step 1.
3. Execute the following command:
`adb push canyonlands/. /sdcard/ArcGIS/Samples/MapPackage/canyonlands`

Link | Local Location
---------|-------|
|[Canyonlands MMPK](https://arcgisruntime.maps.arcgis.com/home/item.html?id=740b663bff5e4198b9b6674af93f638a)| `<sdcard>`/ArcGIS/Samples/MapPackage/canyonlands|

## About the data

The data in this sample shows the roads and trails in the Canyonlands National Park, Utah. Data by [U.S. National Parks Service](https://public-nps.opendata.arcgis.com/). No claim to original U.S. Government works.

## Additional information

**Note:** preplanned areas using the Scheduled Updates workflow are read-only. For preplanned areas that can be edited on the end-user device, see [Take a map offline - preplanned](https://developers.arcgis.com/java/latest/guide/take-map-offline-preplanned.htm).

#### Tags
Edit and Manage Data
offline, preplanned
pre-planned
synchronize
update
@@ -0,0 +1,28 @@
{
"category": "Edit and Manage Data",
"description": "Apply scheduled updates to a downloaded preplanned map area.",
"ignore": false,
"images": [
"apply-scheduled-updates-to-preplanned-map-area.png"
],
"keywords": [
"offline",
"preplanned",
"pre-planned",
"synchronize",
"update"
],
"redirect_from": "",
"relevant_apis": [
"MobileMapPackage",
"OfflineMapSyncJob",
"OfflineMapSyncParameters",
"OfflineMapSyncResult",
"OfflineMapSyncTask",
"OfflineMapUpdatesInfo"
],
"snippets": [
"src/main/java/com/esri/arcgisruntime/sample/applyscheduledupdatestopreplannedmaparea/MainActivity.java"
],
"title": "Apply scheduled updates to preplanned map area"
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions java/apply-scheduled-updates-to-preplanned-map-area/build.gradle
@@ -0,0 +1,24 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion rootProject.ext.compileSdkVersion

defaultConfig {
applicationId "com.esri.arcgisruntime.sample.applyscheduledupdatestopreplannedmaparea"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
// arcgis-android & appcompat lib dependencies from rootProject build.gradle
implementation "com.android.support.constraint:constraint-layout:$constraintLayoutVersion"
}
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.esri.arcgisruntime.sample.applyscheduledupdatestopreplannedmaparea">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

0 comments on commit 20a05c7

Please sign in to comment.