AppInfo QML Type

Provides information of the Application. More...

Import Statement: import ArcGIS.AppFramework 1.0
Inherits:

AppFrameworkObject

Properties

Signals

Methods

Detailed Description

Here you can see an example that shows all the properties of AppInfo.

App {

        id: app
        width: 800
        height: 750

        AppInfo {
                id: appInfo
        }

        Text {
                anchors.fill: parent
                wrapMode: Text.WordWrap
                text: JSON.stringify(appInfo, undefined, 2)
        }
}

Enumerations

AppType enumeration

Enum describing the capabilities of an app.

NameValue
AppInfo.Unknown0
AppInfo.App1
AppInfo.Template2
AppInfo.Tool4

Property Documentation

[read-only] aboutSource : url

Returns the URL to the about file defined by aboutFile in appInfo.json.


[read-only] access : string

Returns the access state of the app. This can be one of three values: "public", "private" or "org".

This value is described in the app's iteminfo.json, and describes how the app has been shared.


accessInformation : string

This property is used for the definition of the app's usage. This value is descried in the app's iteminfo0.json file and describes information regarding the credits.


[read-only] avgRating : int

Provides the average rating the app has been scored from the item online in an organization. This value is dewscribed in the app's iteminfo.json file.


[read-only] created : time

Time stamp displaying when the application was created.


dependencies : object

Returns a list of ArcGIS Online items that are related to this app. This indicates whether the app has related resources, such as TPKs. This property is currently not being used.


description : string

A property that can be used to store an internal description of the app. This is different to the itemInfo's description that is seen online and in the Settings tool.This value is described in the app's iteminfo.json file. This can contain simple HTML code.


[read-only] helpFile : string

Returns the value of helpFile, in appInfo.json. This indicates whether the app has a help QML page.


[read-only] helpPath : string

Returns an absolute path for the value of helpFile defined in appInfo.json. This indicates whether the app has a help QML page.


[read-only] isEditable : bool

Boolean value. The default value is false.


[read-only] isLocal : bool

Boolean Value. Returns true if the app has been downloaded to the device.


[read-only] isOnlineRequired : bool

Returns the true/false boolean value defined by onlineRequired in appInfo.json. This indicates whether the app requires an active internet connection.


[read-only] isPublished : bool

Boolean value. Returns true if the app has been uploaded to an online organization.


[read-only] isSignInRequired : bool

Returns a true/false boolean value defined by signInRequired in appInfo.json. This indicates whether the app requires signin to ArcGIS Online or Portal.


[read-only] isUpdateAvailable : bool

Boolean value. Returns true if the it is determined that the online version of the app is newer than the one on a device.


[read-only] isUpdatedLocally : bool

Boolean value. Returns true if the app has been edited locally.


[read-only] isValid : bool

Boolean value. Returns true if the app is valid.


itemId : string

String Value. The itemid is the unique id that is created once an app is uploaded from ArcGIS AppStudio.


[read-only] itemInfo : object

JSON object. A collection of properties that describe the online version of the app item. Provides the contents of the iteminfo.json file.


[read-only] json : object

JSON object. A collection of properties that are for the app configuration such as the capabilites from the settings tool. Provides the contents of the appinfo.json file.

TextArea {
anchors.fill: parent
text: JSON.stringify(app.info.json)
}

licenseInfo : string

String value. Store the app license information here which is stored in the "Access and Use Constraints" section of an app. This can contain simple html code.


majorVersion : int

Describes the largest incremental version of the application.


microVersion : int

Describes the smallest incremental version of the application.


minorVersion : int

Describes a incremental version of the application.


[read-only] modified : time

Time stamp that tells the last time the app was modified.


[read-only] numRatings : int

Number value. This value returns the number of times an app has been rated online in an organization.


[read-only] owner : string

If published online, this string tells you the owner within the organization.


path : string

A string representing the path where the app is stored. For example, "C:/Users/yourName/ArcGIS/AppStudio/Apps/yourApp"


pathUrl : url

A url representing the path where the app is stored


pinned : bool

Reads/writes the true/false boolean value defined by pinned, in the .info.json hidden file.


[read-only] projectFile : string

String value. Path of the app (Qt project) project file.


[read-only] properties : object

JSON object. Set of values that the app uses to define how the app looks and works.


[read-only] settingsSource : url

Returns the URL to the settings file as defined by settingsFile in appInfo.json. If there is no settings file associated with the app, this will be empty.


snippet : string

The description that is stored from the online item.


[read-only] source : url

Returns the URL to the mainFile from appInfo.json, if present. Otherwise, returns the URL to main.qml. This is the app's starting QML page.


tags : QStringList

The tags that are stored from the online item. These can be created and edited in ArcGIS AppStudio.


[read-only] thumbnail : url

Returns the URL of the image that is used as the gallery picture in ArcGIS AppStudio.


title : string

Returns the title of the app.


[read-only] type : AppType

Returns the type of item that the item is stored as in an organization. For example, ArcGIS AppStudio apps have the type: Native application.


[read-only] typeString : string

Returns a string that describes the item type. For example, an ArcGIS AppStudio app returns: "app".


[read-only] version : string

String value. This is a combination of the major, minor and micro values. For example, 1.0.4


Signal Documentation

requirementChanged()

Signal emitted whenever AppInfo is loaded for a new app. Be aware this can trigger changes to isOnlineRequired and/or isSignInRequired.

Note: The corresponding handler is onRequirementChanged.


statusChanged()

This property is currently under review. Please ignore.

Note: The corresponding handler is onStatusChanged.


Method Documentation

object propertyValue(string name)

Returns a value based on the well known property if it exists in appInfo.

The property is the value that is looked for in appInfo.

var portalAddress = app.info.propertyValue("portalUrl");

The name parameter

String value. "portalUrl"


object propertyValue(string name, object defaultValue)

Optionally supply a default value if the appInfo property doesn't exist.

The second property in the method defines a fall back value. For example,

var portalAddress = app.info.propertyValue("portalUrl", "http://www.arcgis.com");

The name parameter

String value. For example, "portalUrl"

The defaultValue parameter

Object. For example, "http://www.arcgis.com" or 2 or ["Ashton", "Indie"] or {"AppStudio": "rocks"}


refresh()

Method to refresh AppInfoList.

This is commonly used for gallery items that show many items from an organization.


setValue(string key, object value)

Method that allows a user to set property values.

This method can be used to store information that is important to the functioning of the app. This is convenient for storing properties, such as different user properties that use the app.

For example,

app.info.settings.setValue("userName", "Ashton");

The key parameter

Key is the name the value will be stored under. For example, "userName"

The value parameter

The value that will be set to the key. For example, "Indie Matisse"

See also value().


object value(string key)

Method to read a value from appInfo.

For example,

var name = app.info.value("userName");

The key parameter

String value. The property in appInfo that going to be read.


object value(string key, object defaultValue)

Method to write a new appInfo.json file.

For example,

var user = app.info.value("userName");

The key parameter

The property name of the value that will be returned.

The defaultValue parameter

Object. For example, "Bruce" or [1,2,3,4]

See also setValue().


write()

Method used to overwrite the entire appInfo component.

For example,

Item {
        AppInfo {
                id: newAppInfo
        }

        Component.onCompleted: newAppInfo.write()
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.