Skip to content

Latest commit

 

History

History
 
 

tizen_package_manager

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

tizen_package_manager

pub package

Tizen package manager API. Used for getting installed package info.

Usage

To use this package, add tizen_package_manager as a dependency in your pubspec.yaml file.

dependencies:
  tizen_package_manager: ^0.1.0

Retrieving specific package info

To retrieve information of a specific package, use the getPackageInfo method which returns an instance of PackageInfo.

var packageId = 'org.tizen.settings';
var packageInfo = await PackageManager.getPackageInfo(packageId);

Retrieving all packages' info

To retrieve information of all packages installed on a Tizen device, use getPackagesInfo method.

var packageList = await PackageManager.getPackagesInfo();
for (var package in packageList) {
  // Handle each package's info.
}

Monitoring package events

You can listen for package events using onInstallProgressChanged, onUninstallProgressChanged, and onUpdateProgressChanged.

_subscription = PackageManager.onInstallProgressChanged.listen((event) {
  // A package is being installed.
});
...
_subscription.cancel();

Required privileges

Privileges are required to use the package manager functionality. Add required privileges in tizen-manifest.xml of your application.

<privileges>
  <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
  <!-- The below is optional for install/uninstall and platform privilge -->
  <privilege>http://tizen.org/privilege/packagemanager.admin</privilege>
</privileges>