ArcGIS AppStudio Blog

cancel
Showing results for 
Search instead for 
Did you mean: 

Latest Activity

(105 Posts)
Esri Regular Contributor

Sometimes it's not enough to get just the longitude and latitude of a location displayed in your app, and you need to additionally record metadata about the location value. For example, you may also need to record errors in longitude and latitude values, differential age, and the number of satellites in use when the location was captured. To do this you must receive NMEA sentences from your location sensor into your app. When using an external GNSS receiver, this is a given – it’s the only way to work with an external receiver – but when your high precision GNSS receiver is built into your device, you need to specifically connect to those NMEA messages, to get this information. 

I recently tested with the DT Research DT301X-TR, a rugged windows tablet to get this working, but the principle described here would apply to any Windows or Android tablet that has an on-board GNSS receiver that can output NMEA sentences. 

The following discussion is also relevant to all apps built with AppStudio  I may reference Survey123 and QuickCapture, but any app you build with AppStudio can access NMEA from on-board GNSS receivers too. 

On all hardware that is compatible with these apps, you can read location information via the device's integrated location provider. Each operating system uses a similar concept, providing location coordinates and some level of accuracy information to any app that is running on the device. In our apps, this is the default location connection. The provider list typically looks like this by default. 

When you connect this way, you generally receive data for: latitude, longitude, altitude, horizontal and vertical accuracies, speed and direction. 

Even in the case of external GNSS receivers, some manufacturers have provided ways for you to receive location information from their hardware through the integrated location provider. Typically, you install the manufacturers own app on your device, that app performs calculations to improve accuracy, and then the corrected latitude and longitudes are passed on to all other apps on the device. If you don’t need to record the additional metadata in your app of choice, then this may be all you need. 

Additional data that can be collected directly from NMEA messages include: magnetic variation, geoid separation, latitude and longitude errors, HDOP, VDOP, PDOP, differential age, reference station id’s, and the number of satellites visible and in use. For a full list of metadata that can be used in an app see the Position component in the API Reference. 

If you need to record additional information that is provided by an on-board GNSS receiver via NMEA sentences, you must make a serial connection to that receiver. Windows and Android can present GNSS hardware as COM ports – if the manufacturer provides access to these ports for the GNSS receiver, you can connect directly to the receiver in your ArcGIS app. 

To add a serial connection, choose to add a location provider of type USB. From the list, choose the correct COM port, and see the connection in the app. 

Figuring out which COM port to choose, can be tricky, and trial and error is a common tactic.  With built in receivers, the port number should be fixed and be provided by the hardware manufacturer. On Windows, you can attach and detach USB devices readily, so you may have many more COM ports listed. Viewing the list of Ports in Control Panel > Device Manager may list an identifiable name against each port number. Alternatively, ports that are occupied by Bluetooth devices can be identified in the More Bluetooth Options dialog in the Bluetooth Settings page, for elimination. 

Once connected, all available data will be displayed in the app, and depending on the functionality of the app, can be saved to records that you capture in the app. 

For more information on working with GNSS receivers in different apps @@@see 

 

more
1 0 76
Esri Regular Contributor

The AppStudio Framework, or AppFramework, contains platform-neutral QML components to allow you to create apps that work across multiple platforms. The components that the AppFramework provides are intended for use in providing base functionality for your app, including managing file paths, networking interfaces, and image manipulation, as well as tools specific to working within the AppStudio environment. The AppFramework library is unique in that it has features and capabilities that are neither natively provided by the underlying Qt framework nor the ArcGIS Runtime but are necessary and commonly used for developing apps. We are excited to share new features and enhancements added to AppStudio 4.3 release with you in this blog post.

New SystemTheme component

The SystemTheme component is used to contain the visual theme being used for the device so that it can be used within the app, e.g. light and dark mode. A SystemTheme object contains the information on the operating system theme, which is then used for a number of example controls within the app. You can take a look at the sample code in the API reference and inside the Status Bar sample. We have also implemented this in AppStudio Player version 4.3. 

New Battery component (BETA)

AppFramework now has a new Battery component to monitor battery levels, power modes, and power source. To see this in action, see Screen and System Info sample. 

import ArcGIS.AppFramework.Platform 1.0
..

App{
..

Text {
text: "Battery Level: %1%".arg(Battery.level)
}

..
} ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

DocumentDialog component enhancements

The DocumentDialog component is used to access documents external to your app, we have added few enhancements to this component such as it now uses the native device file pickers on mobile devices and supports selecting folders and multiple files. You can take a look at the new sample, Working with Files, to see how it is being used to browse and select files. 

New VersionNumber component

The VersionNumber component provides an interface to check the app's current version, as well as to edit if necessary. Version numbers are separated into three separate numbers, separated by decimal points. The first is the macro number, followed by the minor, and then the micro.

This code sample demonstrates a potential usage of VersionNumber, by comparing the version number of the current AppStudio version with one provided in a text field.

App{
..
Button {
text: "Compare"
onClicked: {
var ver1 = AppFramework.versionNumber(AppFramework.version);
var ver2 = AppFramework.versionNumber("1.2.3");

var result = ver1.compare(ver2);
if (result < 0 )
logTextArea.text = "Result: " + result + ". AppFramework Version is less than version 1.2.3";
else if (result === 0 )
logTextArea.text = "Result: " + result + ". AppFramework Version is equal to version 1.2.3";
else
logTextArea.text = "Result: " + result + ". AppFramework Version is greater than version 1.2.3";
}
}
..
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

CameraDialog component enhancements

The CameraDialog component provides access to the system's camera to take photos and movies, using the best resolution supported by the system. For iOS and Android, it will open the device's native camera app. For other platforms (macOS, Windows, and Linux) this component will instead open a custom camera app.

In this release, we added few new properties, captureToLocation property which allows saving images or video to a specific location, and captureFlags property to save images and videos to the camera roll. We also just released a new Camera Dialog sample

 

New error handling pattern

DocumentDialog uses a new error handling pattern, please take a look at the DocumentDialogError component. And EmailComposer has been enhanced with a new error handling pattern, please take a look at the EmailComposerError component.

Note: if your app uses the onComposeError signal handler, it needs to be changed to use the new onErrorChanged signal. Please refer to the example below. 

EmailComposer {
id: emailComposer
to: "example@example.com"
cc: ["example2@example.com", "example3@example.com"]
bcc: "example4@example.com"
subject: "Feedback for " + app.info.title
onErrorChanged: {
var reason = error.errorCode
console.log(reason)
}
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

File Handling updates with Content URIs

Other changes and new features include the following:

  • We improved the performance of BarcodeReader and added support for barcodes with white lines on black background.
  • We added timeout property in NetworkRequest and Networking.
  • We improved ciphers for encryption on Android in SecureStorage.

Other bug fixes and enhancements are listed in the https://community.esri.com/groups/appstudio/blog/2020/09/21/arcgis-appstudio-version-43-is-now-avail... blog post. 

Learn more about AppStudio:

  • New to AppStudio? Check out this website to learn more about what ArcGIS AppStudio can do to you and your organization.
  • Check out our recent workshop recordings to get started with creating native apps using AppStudio.
  • Let us know about your creations built using AppStudio to be featured in AppStudio Showcase Gallery.
  • Provide your ideas and suggestions to us on ArcGIS Ideas site.
  • Follow us on Twitter @ArcGISAppStudio to keep up-to-date on the latest information.
  • The AppStudio team periodically hosts workshops and webinars; please sign up for the AppStudio newsletter if you are interested in information regarding AppStudio events.

more
0 0 138
New Contributor II

What's New?

AppStudio has over 80 samples included in AppStudio Desktop and AppStudio Player, which show you a lot of specific functionalities that you can add to your AppStudio apps. In this release, there have been many enhancements made to the AppStudio AppFramework so existing samples have been updated, and new ones have been added.

Samples described here include:

  • NEW! Camera Dialog
  • NEW! Working with Files
  • UPDATED! Permission Request
  • UPDATED! Screen and System Info
  • UPDATED! Secure Storage
  • UPDATED! Share text, URL or files
  • UPDATED! Email Composer
  • UPDATED! Trace Utility Network
  • UPDATED! GNSS Discover

Please check the following link to see the full StoryMap introducing the updates in samples!

New and Updated Samples In ArcGIS AppStudio 4.3 Release

more
0 0 486
Regular Contributor

We are excited to announce the release of ArcGIS AppStudio Version 4.3. This release rolls out many new features and enhancements to help you and your team create rich experiences in building and distributing cross-platform native apps. Read this blog to learn more. 

 

Bug fixes and enhancements:

 

BUG-000130535

Analyze Viewshed Template throws exception in QtCreator: QML QQuickText: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead."

ENH-000130587

Provide the ability to configure custom popups in the App Studio Map Viewer template.

BUG-000129877

The MapViewer template does not respect the pop-up settings from ArcGIS Online in AppStudio for ArcGIS version 4.2.

BUG-000125089

Unclear how to download AppStudio for ArcGIS cloud Make compiled application files.

BUG-000127192

The AppStudio for ArcGIS Map Viewer template fails to prompt for authentication when published to an Integrated Windows Authenticated (IWA) Portal for ArcGIS.

BUG-000128324

NmeaSource fails to receive the serial port GPS data.

BUG-000130937

 

Failed to copy Replicator application on App Studio version 4.2.80 

ENH-000132190

Add documentation stating that to build an application using "Cloud Make", the application has to be stored in ArcGIS Online. 

BUG-000128567

When attempting to create a new app on a machine configured with an automatic configuration script, the loading icon keep spinning but the new app fails to create.

BUG-000101099

MOR_LOC_ALL: Untranslated tabs when selecting Properties in the AppStudio for ArcGIS settings.

BUG-000103412

The AppStudio for ArcGIS settings are not translated on a German operating system (OS).

BUG-000130566

 

In IOS device, opening app created using Quick Report(4.2) ask for "Bluetooth access permission" though Bluetooth capabilities in app set to false.

BUG-000119095

The AppStudio for ArcGIS (Desktop Edition) installation window shows English text at some places in the German environment.

BUG-000119094

 

The AppStudio Player for ArcGIS installation window shows English text at some places in the German environment.

ENH-000121517

 

Change for terminology in Configuring Apps Using AppStudio for ArcGIS tutorials.

 

Known issues:

1. The existing Quick Report app (4.2 or earlier) or the app uses Email Composer onComposeError signal handler won’t run and displays an error message.

                             

 

Starting in AppStudio 4.3, the Email Composer's error signaling has changed. The error can be resolved by opening the app in Qt Creator, searching for onComposeError, and change to onErrorChanged.

Note: If you have a quick report template app, browsing to the LandingPage.qml file, and changing onComposeError to onErrorChanged (found around line 655).

2. Secured web maps and web scenes aren't loading in my app.

This is an issue with the ArcGIS Runtime for Qt that will be fixed in a future release. As a workaround, add this property to the web map or scene to set the token expiration to 90 days:

oAuthClientInfo.refreshTokenExpirationInterval = 129600;

 

See a full list of known issues here.

Learn more about AppStudio:

  • New to AppStudio? Check out this website to learn more about what ArcGIS AppStudio can do to you and your organization.
  • Check out our recent workshop recordings to get started with creating native apps using AppStudio.
  • Let us know about your creations built using AppStudio to be featured in AppStudio Showcase Gallery.
  • Provide your ideas and suggestions to us on ArcGIS Ideas site.
  • Follow us on Twitter @ArcGISAppStudio to keep up-to-date on the latest information.
  • The AppStudio team periodically hosts workshops and webinars; please sign up for the AppStudio newsletter if you are interested in information regarding AppStudio events.

more
1 0 141
Occasional Contributor

NOTICE: ArcGIS AppStudio Deprecation Information – September 2020

The goal of AppStudio is to bring native app creation tools to all ArcGIS users. If you peel back the technical layers of the AppStudio stack you will find various components such as the Qt SDK, Android SDK, Apple Xcode, and ArcGIS Runtime that enable things like cross-platform development and geospatial mapping tools. These components are development projects in themselves, each with release timelines and retirement dates. This blog post is an update on some recent and future software deprecations. We hope this information will help you in planning your strategy when developing AppStudio apps and supporting your users.

AppStudio 2.1 Cloud Make Servers Shutdown– Effective September 2020
This is a notice that the ArcGIS Cloud Make servers that supported previously retired AppStudio 2.1 and ArcGIS Runtime 10.2.6 has been taken offline. Please see this blog post for more detailed information about the AppStudio 2.1 deprecation.
https://community.esri.com/groups/appstudio/blog/2018/12/15/important-notice-appstudio-21-deprecatio...

Android 5.0 – Deprecation Q4 2020
AppStudio 4.4 is scheduled to be released in Q4 2020 and will be the last release to support Android 5.0. After the release of AppStudio 4.4, the minimum supported version will be Android 6.0.

Ubuntu Linux 16.04 – Deprecation Q1 2021
ArcGIS AppStudio 4.3 supports Ubuntu 16.04 and 18.04. ArcGIS AppStudio 5.0 is scheduled to release in Q1 or 2021 and at that time we will deprecate support for Ubuntu Linux 16.04. AppStudio 5.0 will have support for Ubuntu 18.04 and 20.04.

Universal Windows Platform (UWP) Apps – Deprecation Q1 2021
AppStudio 5.0 is scheduled to be released in the first quarter of 2021 and will not support building Universal Windows Platform apps. AppStudio 4.4 in Q4 of 2020 will be the last version to support UWP. If you are delivering Windows apps in the future it is suggested that you use Windows 64 bit builds.

Windows 32bit Operating Systems – Future Deprecation
For users who are running AppStudio apps on Windows 32bit devices, it is necessary that you have a migration strategy to move to Windows 64bit devices in the future. The Qt Company is ending support for building Windows 32-bit apps with the release of Qt 6.0 in Dec of 2020. ArcGIS AppStudio will stay on a Qt 5.x version until at least the end of 2021 which will provide Windows 32bit support.

ANGLE Rendering Support for Windows Apps – Future Deprecation
When AppStudio moves to the Qt 6.0 framework the ANGLE graphics rendering option will be deprecated, currently, the target date for this is Q1 2022.

more
1 0 115
Regular Contributor

AppStudio 4.2 release introduces a new way to customize AppStudio Player by creating Profiles. Profiles give you the ability to control the content and appearance of the Player and is managed by configuring a group in your ArcGIS organization. We are continuing to improve this feature to make it easier than ever to create and launch Profiles. We encourage you to create a Profile and test it in Player 4.3 beta.  

  

Improvements to Profile 

 

1. Launch profiles in Player directly  

In the upcoming version (4.3), it is no longer required to create an app link to distribute and launch a Profile. To distribute your Profiles, you simply add a customprofile tag to a group and share the group with the end-users. Upon signing in to ArcGIS Online, or Enterprise account, the end-user can view all the available Profiles and launch them in the Player directly.   

2. Switch between multiple profiles 

To accomplish different workflows, you may need to create multiple Profiles that are tailored to your organization’s needs. You can now easily switch between different Profiles in the Player. This improvement displays all the available Profiles on one page and eliminates the need for end-users to juggle multiple app links for different Profiles. 

 

3. Improvements to the user interface color 

To improve readability, the Player will now change the text and icon colors automatically to optimize contrast against the provided branding color. 

 

Get Started  

1. Create a Profile  

Review this blog post to learn how to create a Profile.   

 

Note :  

  • It is important to add customprofile tag for the group so it will appear in the Player Profile page.  
  • Remember to invite end-users to the group or share the group with the organization.  

 

2. Download AppStudio Player 4.3 beta 

 AppStudio Player 4.3 beta is available in Apple’s TestFlight and Android Beta Program. 

 

3. Launch a Profile  

Sign into Player Tap on side menu > navigate to the Profile page select the preferred Profile  

4. Remove Profile (optional) 

Tap on side menu > navigate to Profile or About page > tap on Remove Profile button at the bottom.  

 

Now you are all set for testing Profile in Player. Your feedback and suggestions are constructive for us to deliver a stable, high-performance product to everyone for the final release. For bugs or other suggestions, you may find, please submit a bug report or email us at appstudiofeedback@esri.com. 

Learn more about AppStudio:

  • New to AppStudio? Check out this website to learn more about what ArcGIS AppStudio can do to you and your organization.
  • Check out our recent workshop recordings to get started with creating native apps using AppStudio.
  • Let us know about your creations built using AppStudio to be featured in AppStudio Showcase Gallery.
  • Provide your ideas and suggestions to us on ArcGIS Ideas site.
  • Follow us on Twitter @ArcGISAppStudio to keep up-to-date on the latest information.
  • The AppStudio team periodically hosts workshops and webinars; please sign up for the AppStudio newsletter if you are interested in information regarding AppStudio events.

more
0 0 490
Regular Contributor

We are excited to announce that ArcGIS AppStudio 4.3 is now available as a public beta. Downloads are available through the Early Adopter Community. We encourage you to experience the new features and enhancements (and report bugs) by participating in the beta program. Your feedback will help us greatly improve AppStudio and deliver a stable, high-performance product to everyone for the final release.

 

Get your apps ready for Google Play requirements

Starting  August 3rd, 2020, new apps submitted to the Google Play Store must target Android 10 (API level 29), and by November 2nd, 2020, all apps that are updated must target at least Android 10 (API level 29). We have made significant changes to AppStudio Desktop, Player, AppFramework, and templates to make sure your AppStudio apps will meet Google Play’s target API level requirement. Review this blog post to learn more details about the changes for Android 10. We highly encourage you to download the AppStudio 4.3 beta from the Early Adopter Community and test your app to make sure it continues to work well on Android 10 devices.

 

What’s new

This release also rolls out many exciting new features and enhancements. Highlights of the beta release include:

 

  • Support for ArcGIS Runtime SDK version 100.8.
  • AppStudio Player
    • Supports configuring portal URL and portal Name with Mobile Device Management (MDM).
    • Supports applying and switching custom profiles without using the app link.
  • Map Viewer Template
    • Supports offline routing in mobile map packages (MMPK).
    • Includes a new Sketch tool that allows you to snip, sketch, and share screenshots.
    • Supports custom pop-ups for both HTML descriptions and attributes fields.
  • Quick Report Template
    • Supports copying report values and pasting to new reports.
    • Includes a new Summary page that allows you to review and edit the report before submitting it.
  • 3D Scene viewer Template 
    • Supports identifying features for the Map Image layer, Feature Layers, and Feature collection layers.
    • Supports showing and viewing attachments.
  • AppFramework
    • Provides access to the operating system theme.
    • Includes a new version number and Battery component.
    • Enhancements to DocumentDialog to use the native OS file picker dialog.
    • Improved support for file handing.
    • Improved support for multiple attachments in Email Composer.

 

Review this documentation in the Early Adopter Community to see a comprehensive list of new features, enhancements, and bug fixes.

 

Getting Started

The beta program is open to anyone – join the Early Adopter Community today to gain access to the latest version of ArcGIS AppStudio 4.3 Beta.

 

  • AppStudio Desktop - You can download the beta version of AppStudio Desktop 4.3 here.
  • AppStudio Player (iOS) - AppStudio Player 4.3 (Beta) is available via Apple's TestFlight. Please click on this link to download.
  • AppStudio Player (Android) - AppStudio Player 4.3 (Beta) is available via the Android Beta Program. Please go to this link to download it.

 

You are now all set to start testing the AppStudio 4.3 Beta!

 

Feedback

Your feedback is much appreciated and will help us to improve the final release of ArcGIS AppStudio 4.3. For bugs or other issues you may find, please submit a bug report or email us at appstudiofeedback@esri.com.

 

The ArcGIS AppStudio 4.3 final release is scheduled for late August. We want to thank everyone who contributes to this release in advance, and we wish you happy testing!

 

Learn more about AppStudio:

  • Find AppStudio contents at 2020 Esri User Conference. 
  • New to AppStudio? Check out this website to learn more about what ArcGIS AppStudio can do to you and your organization.
  • Check out our recent workshop recordings to get started with creating native apps using AppStudio.
  • Let us know about your creations built using AppStudio to be featured in AppStudio Showcase Gallery.
  • Provide your ideas and suggestions to us on ArcGIS Ideas site.
  • Follow us on Twitter @ArcGISAppStudio to keep up-to-date on the latest information.
  • The AppStudio team periodically hosts workshops and webinars; please sign up for the AppStudio newsletter if you are interested in information regarding AppStudio events.

 

more
1 0 724
Esri Regular Contributor

Working with the file system is an important part of developing any AppStudio app. For an Android app, up until targeting Android 10, when you gave an app storage permission, it could access any file on the device. When an app targets Android 10, Google enforces the concept of Scoped Storage, which enhances user control and privacy while cutting back the file clutter that removed apps leave behind. 

Google is changing the rules for submissions to Google Play. Starting on August 3, 2020, all new apps submitted to the Google Play store must be built for Android 10 by targeting SDK 29. And starting on November 2, 2020, all new apps and existing apps (app updates) must target Android 10 by targeting SDK 29. The upcoming AppStudio 4.3 and AppStudio 4.3 Beta will have default Android targetSdkVersion set to SDK 29.

This blog discusses exactly what this means and how it may impact users of your app.

How will users be affected? 

Users of your apps will be affected if both of the scenarios are applied,   

  • They have installed an older version of your app and have upgraded to a version of your app built with AppStudio 4.3 (Android targerSdkVersion set to SDK 29), AND,
  • They have unsaved work ( e.g. input, forms, data, surveys, images, databases, etc ) from the older version of your app.

You should advise your users to save their work before installing app updates targeting SDK 29. This may mean submitting their unsaved work online.

Currently, up until targeting SDK 28, when your user uninstalls your app, their work will persist on storage location like /sdcard. After targeting SDK 29, when the user uninstalls your app, data stored with the app will be deleted. 

How you should prepare your apps and users?

The worst-case scenario, after targeting SDK 29, is the app will not be able to access old data from before. 

The primary method of preparation is you should give users ample warning as soon as possible. Tell them that changes are coming and that they should prepare. Also, tell them to save their work online before upgrading their application. Such messaging can mitigate any loss of data better than any app code will do.

The secondary method of preparation is to offer your users in-app mechanisms for access or migration of their data. However, as indicated, Google is closing off access to the older files location and you have limited opportunities to maximize your user’s success with this option. Also, you don’t want to implement migration code that’s stuck in your codebase for, potentially, forever (as you don’t know when the user will conduct the migration).

AppStudio 4.2 and Android 10

AppStudio 4.2 default Android targetSdkVersion set to SDK 28. If you wish to opt-ni and want to target SDK 29, you can edit appinfo.json to change the "targetSdkVersion" property to 29

"deployment": {
"android": {
"targetSdkVersion": 29
}
}‍‍‍‍‍

AppStudio 4.3 and Android Scoped Storage

The upcoming AppStudio 4.3 and AppStudio 4.3 Beta will have default Android targetSdkVersion set to SDK 29. So when your app is built using AppStudio 4.3, it will already target SDK 29 required by Google Play. 

If you wish to opt-out and do not want to target SDK 29, you can edit appinfo.json to change the "targetSdkVersion" property to 28. 

"deployment": {
"android": {
"targetSdkVersion": 28
}
}
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

If you want to keep the targetSdkVersion at SDK 28 but still want to use the new Android Scoped Storage, you can set the "scopedStorage" property in appinfo.json. This will allow apps to get ready with the changes in AppFramework.userHomePath without incurring losing access to the old location.

"deployment": {
"android": {
"scopedStorage" : true
}
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

The changes in AppFramework.userHomePath 

For apps targetting SDK 28 and apps setting "scopedStorage" property to false the AppFramework.userHomePath will default to “/sdcard”. For apps targetting SDK 29 or apps setting "scopedStorage" property to true the AppFramework.userHomePath will default to Scope Storage location.

"/storage/emulated/0/Android/data/com.myorg.myawesomeapp/files"‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Apps should use AppFramework.userHomePath or ~ to save data using the following code snippet as a guide:

let fileInfo = AppFramework.fileInfo( "~/Data/file.dat" );
let fileFolder = fileInfo.folder();
let data = "sample data";
fileFolder.makeFolder();
fileFolder.writeTextFile( fileInfo.fileName, "sample data" );‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Apps should use AppFramework.userHomePath or ~ to read data using the following code snippet as a guide:

let fileInfo = AppFramework.fileInfo( "~/Data/file.dat" );
let fileFolder = fileInfo.folder();
let data = fileFolder.readTextFile( fileInfo.fileName );‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

The above methods are supplied as a guide because:

  • The fileInfo object is a good way to expand userHomePath via the ~ shorthand
  • The fileInfo object contains an easy way to access a FileFolder object ( which is needed to ensure the folder actually is created before writing files within )

Apps effectively using AppFramework.userHomePath or ~ will automatically migrate to the newer location.

When apps target SDK 28 and below (i.e. AppStudio 4.2 and below), we are currently defaulting AppFramework.userHomePath to “/sdcard”.

When apps target SDK 29 and above (i.e. AppStudio 4.3 and above), we will be setting AppFramework.userHomePath to a new location defined by the Scoped Storage. And when uninstalling and re-install, data will be gone.

New AppStudioHomeLocation enumeration

In AppStudio 4.2, we have introduced a new StandardPaths.AppStudioHomeLocation enumeration. To use it,

let userHomePaths = AppFramework.standardPaths.standardLocations( StandardPaths.AppStudioHomeLocation );‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

On Android, this will return a string array containing two values, the first value will contain the new target SDK 29 userHomeLocation location and the second value will contain the target SDK 28 userHomePath.

[ "/storage/emulated/0/Android/data/com.myorg.myawesomeapp/files", "/sdcard" ]

This location could be to check the old SDK 28 location to see if there was old content that we could migrate to the user location.

This could be used to implement data migration, however, only a small group of users will be able to use it to migrate their data effectively. i.e. those users who haven’t upgraded their phone to Android Q, or those users who are running a target SDK 28 version of your app.

AppStudio Player as a distribution tool 

We have made the changes in AppStudio Player 4.3 to target Android 10, and introduced a new feature called Custom Profile so you could better use AppStudio Player as a distribution tool. Using AppStudio Player as a distribution tool for your AppStudio apps would make sure that your apps would continue to work since the changes are done by us in the AppStudio Player side.

If you have any questions regarding this or anything related to AppStudio, please leave your comment below or reach out to us at appstudiofeedback@esri.com. 

  • New to AppStudio? Check out this website to learn more about what AppStudio for ArcGIS can do to you and your organization. 
  • Become an AppStudio for ArcGIS developer! Watch this video on how to sign up for a free trial. 
  • Follow us on Twitter @ArcGISAppStudio  to keep up-to-date on the latest information and let us know about your creations built using AppStudio to be featured in the AppStudio Showcase.
  • The AppStudio team periodically hosts workshops and webinars; please sign up for the AppStudio newsletter if you are interested in information regarding AppStudio events.

more
0 0 515
Esri Regular Contributor

Faking-it is generally frowned upon – but demonstrating an app that is designed to work outdoors with a GNSS receiver at say a conference, or for your colleagues in the office, warrants a little creative location simulation. For years we’ve hit this problem ourselves at the user conference in San Diego, and after various iterations of fake GPS, I’d like to share our latest offering, by way of an AppStudio sample.

As of AppStudio 4.2, the GNSS Discover sample has the ability for you to:

  • Record a NMEA log file from a connected location provider
  • Playback recorded NMEA messages as if they were coming directly from the connected location provider.

You can also play back files created from other apps – not just GNSS Discover. Some GNSS receivers have the ability to save these files and there are tools online that allow to create simulated files. You can also save the file on your phone and copy it to your desktop to playback. The same file is compatible on all platforms.


What is a NMEA log file?

NMEA 0183 is the data specification standard that AppStudio uses to communicate with GNSS receivers. NMEA messages contain lines of data called sentences. To cut a long story short, save these sentences to a file, and you can replay them in an AppStudio app just like when they are coming directly from a satellite system. The contents of the file will look something like this:

Record a NMEA log file

To capture a NMEA log file with the GNSS Discover sample, create an app with the sample and download it to Player. Connect a receiver to your device and head outside for a walk (or ride, or drive). For more information see Connect your receiver to your device.

  • Click the satellite icon at the top of the app and go to the GNSS location status page.
  • Switch to the Debug tab.
  • Click the Record button.

Whilst you are recording, you can return to the map screen or anywhere else in the app. When you are finished moving around, come back to the Debug tab and Stop recording.

Recorded log files are saved to the folder [User home directory]\ArcGIS\AppStudioPlayer. Each time you capture a new log a new file is created.

Playback a NMEA log file

Playback of a NMEA log file is almost indistinguishable from connecting to a physical receiver. On the location providers page, click Via File, browse to the NMEA log file and click OK.

On the About page of the file location provider there are two settings to consider: loop at end of file (great if you want to capture a short circuit that you can continuously loop through), and update rate. The default update rate is 1Hz which is typical of most receivers. This would mean the playback is in real time. Depending on your demonstration, it might suit to speed things up!

Once you have configured a file location provider, you can use the app in exactly the same way as you would with an external position source. The location status pages will show all the information as you would see from the external position source, and if your app is designed to capture locations, all the available metadata will be captured.

And of course – as this is now in AppStudio, you can expect for this feature to be coming soon in Survey123 and QuickCapture. Record a NMEA log in one app and use it in any of the others. Magic!

more
2 0 167
New Contributor II

What's New?

AppStudio has over 80 samples included in AppStudio and AppStudio Player, which showcase a lot of specific functionalities that you can add to your AppStudio apps. We are excited to announce that we have some new samples in ArcGIS AppStudio 4.2 release. In this release, we upgraded ArcGIS Runtime to 100.7 which lets us take advantage of the new mapping related features from ArcGIS Runtime in our apps. In the StoryMap, I will introduce three samples in this version 4.2:

  • NEW! Find Connected Features in Utility Networks
  • NEW! Create, Edit and Save KML File
  • UPDATED! Portal User Info (4.2)

      Please check the following link to see the full StoryMap introducing the updates in samples!

      New and Updated Samples in ArcGIS AppStudio 4.2 Release 

more
1 0 571