Skip to content

[tizen_app_control] Waiting issue with sendLaunchRequest() when no reply #905

@JSUYA

Description

@JSUYA

/// 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.

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions