tizen_app_manager

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

tizen app manager

tizen_app_manager #

Tizen application manager APIs. Used to get app info and app running context on a Tizen device.
Usage #
To use this package, add tizen_app_manager as a dependency in your pubspec.yaml file.
dependencies:
tizen_app_manager: ^0.2.3
copied to clipboard
Retrieving current app info #
To retrieve information of the current app, get app ID with AppManager.currentAppId and then get AppInfo with AppManager.getAppInfo.
import 'package:tizen_app_manager/tizen_app_manager.dart';

String appId = await AppManager.currentAppId;
AppInfo appInfo = await AppManager.getAppInfo(appId);
copied to clipboard
Retrieving all apps info #
To retrieve information of all installed apps, use AppManager.getInstalledApps.
List<AppInfo> apps = await AppManager.getInstalledApps();
for (AppInfo app in apps) {
// Handle each app's info.
}
copied to clipboard
Getting app running context #
To get a specific app's running context, create an AppRunningContext instance with the target app ID.
String appId = await AppManager.currentAppId;
AppRunningContext appContext = AppRunningContext(appId: appId);
copied to clipboard
Monitoring app events #
You can listen for app state changes by subscribing to AppManager.onAppLaunched and AppManager.onAppTerminated.
var subscription = AppManager.onAppLaunched.listen((AppRunningContext context) {
String appId = context.appId;
});
...
subscription.cancel();
copied to clipboard
Required privileges #
The following privileges may be required to use this plugin. Add required privileges to tizen-manifest.xml of your application.
<privileges>
<privilege>http://tizen.org/privilege/appmanager.launch</privilege>
<privilege>http://tizen.org/privilege/appmanager.kill.bgapp</privilege>
<privilege>http://tizen.org/privilege/appmanager.kill</privilege>
</privileges>
copied to clipboard

The http://tizen.org/privilege/appmanager.launch privilege is required by AppRunningContext.resume().
The http://tizen.org/privilege/appmanager.kill.bgapp privilege is required by AppRunningContext.terminate(background: true).
The http://tizen.org/privilege/appmanager.kill privilege is required by AppRunningContext.terminate(background: false). Note that this is a platform level privilege and cannot be granted to third-party applications.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.