tizen_app_control

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

tizen app control

tizen_app_control #

Tizen application control APIs. Used to launch apps on a Tizen device.
Usage #
To use this package, add tizen_app_control as a dependency in your pubspec.yaml file.
dependencies:
tizen_app_control: ^0.2.3
copied to clipboard
Sending a launch request #
To send an explicit launch request, create an AppControl instance with an application ID as an argument.
import 'package:tizen_app_control/tizen_app_control.dart';

var request = AppControl(appId: 'com.example.app_id');
await request.sendLaunchRequest();
copied to clipboard
To send an implicit launch request, create an AppControl instance and specify necessary conditions, such as operation, URI, and MIME type. For example, if you want to share a text message via SMS on a watch device, set operation to http://tizen.org/appcontrol/operation/share_text as follows.
import 'package:tizen_app_control/tizen_app_control.dart';

await AppControl(
operation: 'http://tizen.org/appcontrol/operation/share_text',
uri: 'sms:',
launchMode: LaunchMode.group,
extraData: {
'http://tizen.org/appcontrol/data/text': 'Some text',
},
).sendLaunchRequest();
copied to clipboard
For detailed information on Tizen application controls, see Tizen Docs: Application Controls. For a list of common operation types and examples, see Tizen Docs: Common Application Controls. Operation and data constants, such as http://tizen.org/appcontrol/operation/view, are defined in the native API references.
Receiving a launch request #
You can subscribe to incoming application controls using AppControl.onAppControl.
import 'package:tizen_app_control/tizen_app_control.dart';

var subscription = AppControl.onAppControl.listen((request) async {
if (request.shouldReply) {
var reply = AppControl();
await request.reply(reply, AppControlReplyResult.succeeded);
}
});
...
await subscription.cancel();
copied to clipboard
Required privileges #
Privileges may be required to perform operations requested by your app. Add required privileges in tizen-manifest.xml of your application.
<privileges>
<privilege>http://tizen.org/privilege/appmanager.launch</privilege>
<!-- The below are optional. -->
<privilege>http://tizen.org/privilege/call</privilege>
<privilege>http://tizen.org/privilege/download</privilege>
</privileges>
copied to clipboard

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.