Giter VIP home page Giter VIP logo

arcgis-runtime-toolkit-android's Introduction

ArcGIS Runtime Toolkit Android

doc badge

The ArcGIS Runtime Toolkit for Android contains views that you can use with ArcGIS Runtime SDK for Android.

You can use the Toolkit in your projects by:

  1. Reference from Jfrog - the fastest way to get toolkit into your app

    • Ensure the Esri public Jfrog Maven repository is in your project's gradle file - https://esri.jfrog.io/artifactory/arcgis
    allprojects {
    	repositories {
    		...
    		maven { url 'https://esri.jfrog.io/artifactory/arcgis' }
    		...
    	}
    }
    
    • Add the toolkit dependency to the module's gradle file
    dependencies {
    	implementation 'com.esri.arcgisruntime:arcgis-android-toolkit:100.15.0'
    }
    
  2. Build from source - do this if you want to customize the toolkit

    $ ./gradlew clean assembleDebug --info

See the setup instructions for a more detailed guide.

Features

  • ArcGISArView - Integrates SceneView with ARCore to enable augmented reality (AR)
  • Bookmarks - Displays the bookmarks present in a map
  • Compass - Shows the current orientation of a map or scene by displaying a compass icon that points towards North
  • Scalebar - Displays the representation of an accurate linear measurement on a map
  • PopupView - Displays a Popup's attribute list
  • FloorFilterView - Displays a control to filter floor aware maps by site, facility, and level

Requirements

The toolkit requires the ArcGIS Runtime SDK for Android. Refer to the Instructions section above if you are using Gradle. See this guide for complete instructions and other options for installing the SDK.

The following table shows which versions of the SDK are compatible with the toolkit:

SDK Version Toolkit Version
100.6.0 100.6.0
100.6.0 100.6.1
100.7.0 100.7.0
100.8.0 100.8.0
100.9.0 100.9.0
100.10.0 100.10.0
100.11.0 100.11.0
100.12.0 100.12.0
100.13.0 100.13.0
100.14.0 100.14.0
100.15.0 100.15.0

Resources

Issues

Find a bug or want to request a new feature enhancement? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing

Copyright 2019-2022 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.

arcgis-runtime-toolkit-android's People

Contributors

alan-edi avatar androidmap avatar doneill avatar fallsdownhill avatar gunt0001 avatar hud10837 avatar lduncandroid avatar mbcoder avatar mikeynick avatar mrnelson6 avatar ncastle1 avatar puneet-pdx avatar sorenoid avatar summerhall avatar tschie avatar xuemingrocks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arcgis-runtime-toolkit-android's Issues

Open Source the App Framework API

In open sourcing the app framework we open up the possibility of outside contribution to our extendable API in the form of docs/samples/bug fixes/enhancements. We need to change github organizations from ArcGIS to Esri to make the repo public. More details to come to ensure we have the repo ready for making public open source.

Pausing & resuming map cause scalebar to have an error

Hi,

I was trying out the scale bar & compass using 100.6 toolkit.
Both are performing well when the map is active.
However, if user minimize the map app & resume back, the scalebar class will have an error in ondraw method, line 455, stating:

com.esri.arcgisruntime.ArcGISRuntimeException: Invalid argument: can not assign an empty point to a vertex
...

at com.esri.arcgisruntime.toolkit.scalebar.Scalebar.onDraw(Scalebar.kt:455)

Can anyone assist to identify what is causing the issue?
Thank you so much.

QA MapViewHelper methods

Introduce MapViewHelper class in API App Framework that allows adding graphics to the map and set up simplified callout and hit tests methods. These methods should be removed from the MapView class in the Core API.

Update version number to 10.2.3

api ref will need to be changed to 10.2.3.

  • update build script (pom.xml)
  • update doclava build to 10.2.3
  • update doclava jar file in docres folder

Scalebar implementation

Scalebar View component that visualizes an accurate distance that a user can use to visually gauge distances on a MapView.

ArLocationDataSource: Update to include options for reporting height as MSL

Background:

  • Android's location library reports altitude in WGS84/height above ellipsoid (HAE)
  • iOS's location library and many of Esri's data products use height relative to Mean Sea Level (MSL)
  • The difference between WGS84/HAE and MSL can be significant and varies by location, so it is not trivial for the user to correct.

Options:

  1. Listen for and parse NMEA messages - GGA and GNS in particular - to read the altitude provided in MSL by the GNSS device
    • This is what the popular gpsTest app does to report MSL values - source and source
    • This is somewhat finicky as it depends on behavior that varies considerably between devices, but appears simplest in terms of toolkit implementation; otherwise we'd need to ship an elevation model.
  2. Use a geoid model to correct elevation values before passing them on.
    • EGM2008 is available in a GIS format; perhaps we could use that
  3. Use GeometryEngine doesn't currently support projectZ, so not an option
  4. Use a web service
    • Relatively simple to implement, but do we want to hard-code projection service into the location data source?
    • Is it acceptable to wait on a web service for getting the altitude as often as once a second (or more often)? probably not

Additional Requirements:

  • There needs to be an option to enable or disable this; customers may still want to use the more accurate HAE values rather than MSL
    • Proposed: returnAltitudeAsMeanSeaLevel

Failing D8 due to a missing class

Our automated builds have begun failing due to a D8 issue.

> Task :toolkit-test-app:mergeReleaseShaders
> Task :toolkit-test-app:compileReleaseShaders
> Task :toolkit-test-app:generateReleaseAssets
> Task :toolkit-test-app:mergeReleaseAssets
> Task :toolkit-test-app:signingConfigWriterRelease
> Task :toolkit-test-app:checkReleaseDuplicateClasses
> Task :arcgis-android-toolkit:bundleLibRuntimeRelease
/home/jenkins/.gradle/caches/transforms-2/files-2.1/5b431831390386eada5e5d4d3c7a4f09/jars/classes.jar: D8: Type `com.google.ar.sceneform.animation.AnimationLibraryLoader` was not found, it is required for default or static interface methods desugaring of `void com.google.ar.sceneform.SceneView.initializeAnimation()`
> Task :toolkit-test-app:transformClassesWithDexBuilderForRelease
> Task :toolkit-test-app:transformClassesWithMultidexlistForRelease
> Task :toolkit-test-app:transformDexArchiveWithDexMergerForRelease
> Task :arcgis-android-toolkit:bundleLibResRelease
> Task :arcgis-android-toolkit:transformNativeLibsWithIntermediateJniLibsForRelease
> Task :toolkit-test-app:mergeReleaseJniLibFolders
> Task :toolkit-test-app:transformNativeLibsWithMergeJniLibsForRelease
> Task :toolkit-test-app:processReleaseJavaRes NO-SOURCE
> Task :toolkit-test-app:transformResourcesWithMergeJavaResForRelease
> Task :toolkit-test-app:packageRelease
> Task :toolkit-test-app:assembleRelease

Integrate the Measure Tool

We have a self contained measure tool in the Android SDK that needs to be integrated as a tool/widget in the toolkit.

Flyover mode does not request Camera permission

When a user is attempting to implement "Flyover" mode and sets app:renderVideoFeed="false" in XML, the Camera permission isn't requested as it is assumed that the user does not want to see the camera, though ARCore requires this permission to enable tracking and ARCore is used in Flyover mode when available.

Remove renderVideoFeed flag from https://github.com/Esri/arcgis-runtime-toolkit-android/blob/master/arcgis-android-toolkit/src/main/java/com/esri/arcgisruntime/toolkit/ar/ArcGISArView.kt#L562

Create a Geocoding Tool

Geocoding workflows are complex and more so than other API's. We can greatly simplify the workflow with and Geocoding Widget in the Toolkit.

Rename Framework to Toolkit

Major tasks defined below.

  • Rename Repo
  • Edit build scripts (disk name changes)
  • Update Plugin in SDK Repo
  • Update docs/blog

Update 6 refresh

  • Update Gradle wrapper
  • Update gradle plugin
  • Update Android compilation version
  • Update Min SDK
  • Update Build Tools

Add a way to enable an easy map navigation widget

Today, when testing with an emulator, you can zoom in and pan on a basic "HelloWorld"-like app. For zooming out, you either need to restart the app in the emulator or quickly write a simple zoomout button or something.

Along with the planning and design of a set of toolkit widgets for the ArcGIS Runtime SDK for Android, we also need a map navigation or "home button" widget that could be enabled on the map, like what the JavaScript API contains: https://developers.arcgis.com/en/javascript/jssamples/widget_home.html

This request comes from a student in the Esri Android Bootcamp course.
It took 10 minutes for the class, corporately, to add a simple zoomout button.

In the layout xml where the map is defined, there could be an attribute like: "enableMapNavigation = true", and the simple +,-,"home" buttons would show on the map.

arcore 1.8.0 on Android 10

Using the exception of arcore 1.8.0 on Android 10,

2019-11-13 16:19:38.136 30834-30834/com.esri.arcgisruntime.sample.navigateinar E/Filament: Panic
in void *filament::CircularBuffer::alloc(size_t):124
reason: couldn't allocate 6144 KiB of memory for the command buffer
2019-11-13 16:19:38.137 30834-30834/com.esri.arcgisruntime.sample.navigateinar E/Filament: --------- beginning of crash

After trying to update to 1.12.0, a new error will be thrown. Is it the wrong way to change the dependency? Thank you. I look forward to your reply!

Caused by: java.lang.NoSuchMethodError: No static method getInstance()Lcom/google/ar/sceneform/animation/AnimationEngine; in class Lcom/google/ar/sceneform/animation/AnimationEngine; or its super classes (declaration of 'com.google.ar.sceneform.animation.AnimationEngine' appears in /data/app/com.esri.arcgisruntime.sample.navigateinar-M99l1YRcJCdGOuCpQ4Q8qw==/base.apk)

image

Compass crashes application on rotation from portrait to landscape.

I have the compass initialized after I setup my mapView. when I rotate the device from portrait to landscape I get the error below.

I'm using 100.6.0 SDK

mMapView.setMap(new ArcGISMap(map));
mCompass = new Compass(mMapView.getContext());
mCompass.setAutoHide(false);
mCompass.addToGeoView(mMapView);

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.thevillages.myfirstapp, PID: 28447
com.esri.arcgisruntime.ArcGISRuntimeException: Invalid argument: Null value.
at com.esri.arcgisruntime.internal.jni.CoreMapView.nativeGetRotation(Native Method)
at com.esri.arcgisruntime.internal.jni.CoreMapView.s(SourceFile:224)
at com.esri.arcgisruntime.internal.h.b.o.p(SourceFile:236)
at com.esri.arcgisruntime.mapping.view.MapView.getMapRotation(SourceFile:317)
at com.esri.arcgisruntime.toolkit.compass.Compass$viewpointChangedListener$1.viewpointChanged(Compass.kt:136)
at com.esri.arcgisruntime.internal.h.b.af$1.run(SourceFile:51)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Migrate project from Eclipse to Android Studio

We started this project for Android in Eclipse and would like to migrate to Android Studio. Android tools team strongly suggest generating a gradle build file when working with Android Studio.

ArLocationDataSource doc incorrect

/**
 * A type of LocationDataSource that requests location updates from the Android platforms location API. To be used in
 * conjunction with [ArcGISArView] when ARCore is unavailable.
 *
 * The Android framework's `android.location.LocationManager` is used to select one or more
 * `android.location.LocationProvider`s based on the parameters passed to the constructor. If both the GPS and the
 * network location providers are disabled, then the ArLocationDataSource will fail to start and an
 * IllegalStateException will be returned from [LocationDataSource.getError].
 *
 * To use this class, the app must be granted Location permissions in the Android platform settings.
 *
 * @see ArcGISArView
 *
 * @since 100.6.0
 */

Re-word doc to describe usage even when ARCore is available.

Remove Javadoc hardcoded project name and version

We are using an open source implementation of doclava for our javadoc which fixed an issue with hover support in IDE's on methods and fields. The open source implementation differs from the current version of doclava and we lost support for project name and version. We worked around this issue by hardcoding the project name and version in masthead.cs. We need to fix this such that the version and project name are picked up by the build script parameters in the future.

Compass implementation

The Compass (alias North arrow) shows where north is in the MapView. Supports reset rotation.

Make isTracking setter private

I understand it doesn't make sense to set isTracking. It ends up being exposed as setTracking(bool) in Java, which causes confusion - setTracking probably doesn't do what users will expect based on the name.

Update ARCore to 1.12.0 to prevent Filament Panic on API 29

When building toolkit and running on devices running Android Q (API 29), a native panic exception is thrown:

2019-10-29 15:50:12.090 8238-8238/com.esri.arcgisruntime.sample.exploresceneinflyoverar E/Filament: Panic
    in void *filament::CircularBuffer::alloc(size_t):124
    reason: couldn't allocate 6144 KiB of memory for the command buffer

google/filament#1345

Updating ARCore to 1.12.0 fixes this.

Regression testing will be required.

Create an Edit Widget

Editing workflows are complex and more so than other API's. We can greatly simplify the workflow with and Edit Widget in the Toolkit. Details to come.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.