Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alan/generategeodatabasereplicafromfeatureservice migration #297

Merged
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
e690b96
generate-geodatabase-replica-from-feature-service: initial migration …
alan-edi Dec 18, 2024
9ba05f7
generate-geodatabase-replica-from-feature-service: improve error repo…
alan-edi Dec 23, 2024
0b08389
generate-geodatabase-replica-from-feature-service: delete TODOs
alan-edi Dec 23, 2024
ebd27dc
generate-geodatabase-replica-from-feature-service: rename calculateDo…
alan-edi Dec 23, 2024
237df47
generate-geodatabase-replica-from-feature-service: delete redundant l…
alan-edi Dec 24, 2024
b3cd64a
generate-geodatabase-replica-from-feature-service: unregister the geo…
alan-edi Dec 24, 2024
6aff845
generate-geodatabase-replica-from-feature-service: update README & me…
alan-edi Dec 24, 2024
a5111cc
generate-geodatabase-replica-from-feature-service: update screenshot
alan-edi Dec 24, 2024
a3747c3
Merge branch 'v.next' into alan/generategeodatabasereplicafromfeature…
alan-edi Dec 24, 2024
f430f2d
generate-geodatabase-replica-from-feature-service: code review changes
alan-edi Dec 30, 2024
f2f9bcb
generate-geodatabase-replica-from-feature-service: update screenshot
alan-edi Dec 31, 2024
619ed28
generate-geodatabase-replica-from-feature-service: put onSuccess befo…
alan-edi Jan 7, 2025
0c7ec96
generate-geodatabase-replica-from-feature-service: fix some comments …
alan-edi Jan 7, 2025
bfa10e8
generate-geodatabase-replica-from-feature-service: close geodatabase …
alan-edi Jan 8, 2025
7f87a0e
generate-geodatabase-replica-from-feature-service: replace 4 state va…
alan-edi Jan 13, 2025
53d4eda
generate-geodatabase-replica-from-feature-service: rename UiStatus to…
alan-edi Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Zoom to any extent. Then click the generate button to generate a geodatabase of

1. Create a `GeodatabaseSyncTask` with the URL of the feature service and load it.
2. Create `GenerateGeodatabaseParameters` specifying the extent and whether to include attachments.
3. Create a `GenerateGeodatabaseJob` with `geodatabaseSyncTask.generateGeodatabaseAsync(parameters, downloadPath)`. Start the job with `job.start()`.
3. Create a `GenerateGeodatabaseJob` with `geodatabaseSyncTask.createGenerateGeodatabaseJob(parameters, downloadPath)`. Start the job with `job.start()`.
4. When the job is done, `job.result()` will return the geodatabase. Inside the geodatabase are feature tables which can be used to add feature layers to the map.
5. Call `syncTask.unregisterGeodatabaseAsync(geodatabase)` after generation when you're not planning on syncing changes to the service.
5. Call `geodatabaseSyncTask.unregisterGeodatabase(geodatabase)` after generation when you're not planning on syncing changes to the service.

## Relevant API

Expand All @@ -27,6 +27,10 @@ Zoom to any extent. Then click the generate button to generate a geodatabase of
* Geodatabase
* GeodatabaseSyncTask

## Additional information

This sample uses the GeoView-Compose Toolkit module to be able to implement a composable SceneView.

## Tags

disconnected, local geodatabase, offline, replica, sync
disconnected, geoview-compose, local geodatabase, offline, replica, sync, toolkit
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,31 @@
],
"keywords": [
"disconnected",
"geoview-compose",
"local geodatabase",
"offline",
"replica",
"sync",
"toolkit",
"GenerateGeodatabaseJob",
"GenerateGeodatabaseParameters",
"Geodatabase",
"GeodatabaseSyncTask"
],
"language": "kotlin",
"redirect_from": "/android/latest/sample-code/generate-geodatabase.htm",
"redirect_from": [
"/android/latest/sample-code/generate-geodatabase.htm"
],
"relevant_apis": [
"GenerateGeodatabaseJob",
"GenerateGeodatabaseParameters",
"Geodatabase",
"GeodatabaseSyncTask"
],
"snippets": [
"src/main/java/com/esri/arcgismaps/sample/generategeodatabasereplicafromfeatureservice/MainActivity.kt"
"src/main/java/com/esri/arcgismaps/sample/generategeodatabasereplicafromfeatureservice/components/GenerateGeodatabaseReplicaFromFeatureServiceViewModel.kt",
"src/main/java/com/esri/arcgismaps/sample/generategeodatabasereplicafromfeatureservice/MainActivity.kt",
"src/main/java/com/esri/arcgismaps/sample/generategeodatabasereplicafromfeatureservice/screens/GenerateGeodatabaseReplicaFromFeatureServiceScreen.kt"
],
"title": "Generate geodatabase replica from feature service"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
alias(libs.plugins.arcgismaps.android.library)
alias(libs.plugins.arcgismaps.android.library.compose)
alias(libs.plugins.arcgismaps.kotlin.sample)
alias(libs.plugins.gradle.secrets)
}
Expand All @@ -11,9 +12,7 @@ secrets {

android {
namespace = "com.esri.arcgismaps.sample.generategeodatabasereplicafromfeatureservice"
// For view based samples
buildFeatures {
dataBinding = true
buildConfig = true
}
}
Expand Down
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fiddled about with the bounding box so I could get a screenshot free of watermark/UI elements. Use it if you want:
generate-geodatabase-replica-from-feature-service

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but actually I think it's better to show the UI elements, so I'm fairly happy with the screenshot I've got.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading