Provides information of the Application. More...
Import Statement: | import ArcGIS.AppFramework 1.0 |
Inherits: |
Properties
- aboutSource : url
- access : string
- accessInformation : string
- avgRating : int
- created : time
- dependencies : object
- description : string
- helpFile : string
- helpPath : string
- isEditable : bool
- isLocal : bool
- isOnlineRequired : bool
- isPublished : bool
- isSignInRequired : bool
- isUpdateAvailable : bool
- isUpdatedLocally : bool
- isValid : bool
- itemId : string
- itemInfo : object
- json : object
- licenseInfo : string
- majorVersion : int
- microVersion : int
- minorVersion : int
- modified : time
- numRatings : int
- owner : string
- path : string
- pathUrl : url
- pinned : bool
- projectFile : string
- properties : object
- settingsSource : url
- snippet : string
- source : url
- tags : QStringList
- thumbnail : url
- title : string
- type : AppType
- typeString : string
- version : string
Signals
Methods
- object propertyValue(string name)
- object propertyValue(string name, object defaultValue)
- refresh()
- setValue(string key, object value)
- object value(string key)
- object value(string key, object defaultValue)
- write()
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.
Name | Value |
---|---|
AppInfo.Unknown | 0 |
AppInfo.App | 1 |
AppInfo.Template | 2 |
AppInfo.Tool | 4 |
Property Documentation
Returns the URL to the about file defined by aboutFile in appInfo.json.
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.
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.
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.
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.
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.
Returns the value of helpFile, in appInfo.json. This indicates whether the app has a help QML page.
Returns an absolute path for the value of helpFile defined in appInfo.json. This indicates whether the app has a help QML page.
Boolean Value. Returns true if the app has been downloaded to the device.
Returns the true/false boolean value defined by onlineRequired in appInfo.json. This indicates whether the app requires an active internet connection.
Boolean value. Returns true if the app has been uploaded to an online organization.
Returns a true/false boolean value defined by signInRequired in appInfo.json. This indicates whether the app requires signin to ArcGIS Online or Portal.
Boolean value. Returns true if the it is determined that the online version of the app is newer than the one on a device.
String Value. The itemid is the unique id that is created once an app is uploaded from ArcGIS AppStudio.
JSON object. A collection of properties that describe the online version of the app item. Provides the contents of the iteminfo.json file.
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) }
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.
Number value. This value returns the number of times an app has been rated online in an organization.
If published online, this string tells you the owner within the organization.
A string representing the path where the app is stored. For example, "C:/Users/yourName/ArcGIS/AppStudio/Apps/yourApp"
Reads/writes the true/false boolean value defined by pinned, in the .info.json hidden file.
JSON object. Set of values that the app uses to define how the app looks and works.
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.
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.
The tags that are stored from the online item. These can be created and edited in ArcGIS AppStudio.
Returns the URL of the image that is used as the gallery picture in ArcGIS AppStudio.
Returns the type of item that the item is stored as in an organization. For example, ArcGIS AppStudio apps have the type: Native application.
Returns a string that describes the item type. For example, an ArcGIS AppStudio app returns: "app".
String value. This is a combination of the major, minor and micro values. For example, 1.0.4
Signal Documentation
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
.
This property is currently under review. Please ignore.
Note: The corresponding handler is onStatusChanged
.
Method Documentation
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"
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"}
Method to refresh AppInfoList.
This is commonly used for gallery items that show many items from an organization.
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().
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.
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().
Method used to overwrite the entire appInfo component.
For example,
Item { AppInfo { id: newAppInfo } Component.onCompleted: newAppInfo.write() }