-
Notifications
You must be signed in to change notification settings - Fork 52
Description
plugins/packages/tizen_app_control/lib/src/app_control.dart
Lines 160 to 175 in 305276e
| /// Sends a launch request to an application. | |
| /// | |
| /// The `http://tizen.org/privilege/appmanager.launch` privilege is required | |
| /// to use this API. | |
| /// | |
| /// If [replyCallback] is null, this call returns immediately after sending | |
| /// a request to the platform. | |
| /// | |
| /// If [replyCallback] is non-null, this call will not return until a reply | |
| /// is received from the callee and [replyCallback] is invoked. If the callee | |
| /// doesn't reply to the request or is terminated before replying, this call | |
| /// will never return and [replyCallback] will never be invoked, resulting in | |
| /// a memory leak. | |
| Future<void> sendLaunchRequest({ | |
| AppControlReplyCallback? replyCallback, | |
| }) async { |
In tizen_app_control's sendLaunchRequest(), user can specify a replyCallback.
When a replyCallback is specified, the embedder's app_control calls the reply callback and returns Success() (response).
If the application receiving app_control_send_launch_request() does not receive a reply response, _methodChannel.invokeMethod<dynamic>(‘sendLaunchRequest’,... ) will wating for response.
plugins/packages/tizen_app_control/lib/src/app_control.dart
Lines 185 to 188 in 305276e
| final dynamic response = await _methodChannel.invokeMethod<dynamic>( | |
| 'sendLaunchRequest', | |
| args, | |
| ); |
Therefore, we may need to change API from app_control_send_launch_request() to app_control_send_launch_request_async() to call the result callback event. or we can implement separate timeout logic.