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.
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.
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)
}
..
}
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.
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";
}
}
..
}
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.
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)
}
}
Other changes and new features include the following:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.