Skip navigation
All Places > AppStudio for ArcGIS > Blog > 2018 > January
2018

A quick blog to share the news that MyUSNG is now available in the Windows Store and can be downloaded for both Windows Desktop and Windows Mobile!

 

For those that are unfamiliar with the app, the United States National Grid (USNG) is a nationally consistent language for location (displayed in a user friendly format), which is commonly used during Search and Rescue operations in the United States (http://usngcenter.org/). MyUSNG reports the location of your device in USNG the format, and includes a simple map that will let you capture the USNG of locations around you and share them. You can also center the map using USNG locations, a range of coordinate formats (including MGRS, USNG, UTM and Latitude and Longitude) or the World Geocode service.

 

If you want to capture, and share locations with others then this is a valuable app for you!

 

To get it on Windows Desktop and Mobile, go here: Get MyUSNG - Microsoft Store en-AU 

Or here for IOS and Android.

 

Note that MYUSNG is an Esri Labs Project and is not an official product. It is built using AppStudio for ArcGIS.

This functionality is currently in beta, meaning functionality isn’t yet finalized, and we’re looking forward to your feedback.

Applications can communicate with each other through a variety of ways. For example, you can use a custom URL scheme to launch one app from another one and invoke actions specified in the link, check out this blog post for understandingSurvey123's custom URL scheme. You can also use the newly added inter-app communication functionality to pass text or a URL to another app. Inter-app communication functionality brings up the standard iOS, macOS or Android share sheet that allows you to share text or URL to other applications. For instance, instead of copying a URL, navigating and pasting URL into another app, you can easily share a URL in the source app by triggering share sheet using inter-app communication functionality. This blog post explains how to achieve this. 

 

First of all, you need to enter data or copy data to the clipboard.

    property url urlInfo: "https://appstudio.arcgis.com/"

    Column {
        spacing: 10

        TextField {
            id: inputText
            placeholderText: "Enter some text"
        }

        Text {
            id: sampleURL
            text: urlInfo
        }

        Button {
            id: copyURL
            text: "Copy as URL"

            onClicked: {
                AppFramework.clipboard.copy(sampleURL.text)
            }
        }
    }

 

Once data is entered or copied to the clipboard, you can use the AppFramework.clipboard.share(QJSValue) method to share text or a URL to other apps. The following code snippet shows how to share input text across apps.

 

        //Share input text
        TextField {
            id: inputText
            placeholderText: "Enter some text"
        }

        Button {
            id: shareURLButton
            text: "Share as Text"

            onClicked: {
                AppFramework.clipboard.share(inputText.text)
            }
        }

 

The following code demonstrates how to share a URL from clipboard. 

 

        // Share URL from clipboard
        Text {
            id: sampleURL
            text: urlInfo
        }

        Button {
            id: copyURL
            text: "Copy as URL"

            onClicked: {
                AppFramework.clipboard.copy(sampleURL.text)
            }
        }


        Button {
            id: shareURL
            text: "Share as URL"

            onClicked: {
                AppFramework.clipboard.share()
            }
        }

 

Inter-app Communication Sample App

 

The Inter-app Communication sample app is available on AppStudio Desktop.  To create an app based on this sample, follow these steps:

 

  • Open AppStudio Desktop
  • Click on the New App button 
  • Search and select Inter-App Communication sample 
  • Click on the Create Button

   

 This sample is also available in the appstudio-samples GitHub repo.                   

 

Hopefully, this blog post gives you some idea of what this functionality is currently capable of.
Feedback and suggestions are welcomed in the comment section below, and I would also like to hear
how you plan to use this feature in your own AppStudio apps.

 

To learn more about Inter-app communication, check out the API Guide.