New Capabilities are introduced in the AppFramework as a part of AppStudio 2.0. These capabilities are not provided natively by Qt. Following capabilities are currently in beta
These capabilities are currently in Beta. What does that mean?
What it means is that we are looking forward to your feedback, the use cases, what you like and what you want us to improve upon. It also means that if you choose to implement these plugins in Production App. Future changes may affect your app may require additional changes to support these functionalities in your app.
1. Local Notification - This is a new plugin added to the AppFramework. It provides developers the ability to implement in-app notification to end users such as an alert, message or geotification. When the Local Notification gets triggered on the client device the Notification icon appears in the Notification bar which is same as the application icon. The Notification icon cannot be customized or modified. Users may choose to have one or multiple notifications within the app. Every notification scheduled has a corresponding id available to distinguish between multiple Local Notifications.
Note:- An app running within Player or AppStudio Desktop (AppRun) will show the notification icon of Player or AppRun respectively when triggered.
import ArcGIS.AppFramework.Notifications.Local 1.0
Note: This property is supported on Android API 19+ versions.
For e.g. 5 seconds means the notification will be triggered in 5 second
var id = notification.schedule(title, message, duration)
bool success = notification.clear(id)
Note: It will return false for invalid inputs and for notifications which have already triggered.
2. Vibration (Singleton) - New plugin added in AppFramework with AppStudio 2.0 version. This allows developers to enable vibration within an app. It is a non visual feedback or alert. Common use cases to provide vibration are to indicate an event such a message received or finished creating a model making a network request or just an alert etc.
Note: Currently, there is no way to provide number of seconds as an input for it to vibrate. On android device, it will vibrate for 1 second and on iOS it will use the system default.
import ArcGIS.AppFramework.Notifications 1.0
3. Background Location - New capability has been introduced to AppStudio 2.0 which allows the apps to use location data in background mode. Some of the common use cases using this capability are logging location data using position source, or trigger a notification, geo-fencing etc. This capability is currently available for mobile platforms only as this is already supported on desktop.
You can monitor the state of the application using the following property
4. Promises - Often while creating your apps, you may want to make something happen after something else is done. You may want to want to make an asynchronous request and perform something on completion of the request. Or you may simply want to execute set of operations in a particular sequence. Promises can be used to manage such asynchronous computation, allowing for separate processes to continue in parallel.
Promises are a pattern that helps with one particular kind of asynchronous programming: a function (or method) that returns a single result asynchronously. One popular way of receiving such a result is via a callback. Promises provide a simpler alternative for executing, composing, and managing asynchronous operations when compared to traditional callback-based approaches. The Promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.
A promise can be in one of 3 states:
When a promise is pending, it can transition to the fulfilled or rejected state. Once a promise is fulfilled or rejected, however, it will never transition to any other state, and its value or failure reason will not change.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.