An open-source example app demonstrating how to use the ArcGIS platform to collect features and related records, both online and offline, using the ArcGIS Runtime SDK for Android.
Data Collection for Android shows how a robust application can be built around the ArcGIS Platform using the ArcGIS Runtime SDK for Android and Kotlin. It demonstrates best practices around some simple but key functionality of the ArcGIS Runtime. Using your organization’s web maps, you can use Data Collection as is, or extend it to meet your specific needs.
Mobile Data Collection leverages several aspects of the Runtime SDK including:
Read the docs for a detailed explanation of the application, including its architecture and how it leverages the ArcGIS platform, as well as how you can begin using the app right away.
Data Collection is an Android Studio project and app module that can be directly cloned and imported into Android Studio.
client_id
in the application’s app_settings.xml
file.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- TODO: add your own client id here-->
<string name="client_id">YOUR_CLIENT_ID</string>
<!-- This redirect URI is the default value for https://www.arcgis.com -->
<string name="redirect_uri">data-collection://auth</string>
</resources>
data-collection://auth
.Note that the scheme for the
DefaultOAuthIntentReceiver
in the Android Manifest file is derived from the redirect uri.
```xml
<data
android:host="auth"
android:scheme="data-collection"></data>
</intent-filter>
</activity>
```
Fork the Data Collection for Android repo.
Once you have forked the repo, you can make a local clone.
cd
into the data-collection-android
folderIf you make changes in the fork and would like to sync those changes with the upstream repository, you must first configure the remote. This will be required when you have created local branches and would like to make a pull request to your upstream branch.
git remote -v
to list the current configured remote repo for your fork.git remote add upstream https://github.com/Esri/data-collection-android
to specify new remote upstream repository that will be synced with the fork. You can type git remote -v
to verify the new upstream.If there are changes made in the original repository, you can sync the fork to keep it updated with the upstream repository.
git fetch upstream
to fetch the commits from the upstream repository.git checkout master
to checkout your fork’s local master branch.git merge upstream/master
to sync your local master
branch with upstream/master
. Note: Your local changes will be retained and your fork’s master branch will be in sync with the upstream repository.Find a bug or want to request a new feature enhancement? Let us know by submitting an issue.
Anyone and everyone is welcome to contribute. We do accept pull requests.
Generation of this and other documents’ table of contents in this repository was performed using the MDTOC package for Atom.
Copyright 2020 Esri
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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
A copy of the license is available in the repository’s LICENSE file.
For information about licensing your deployed app, see License your app.