Question
I need to obtain the Tizen TV native player's ApplicationId to use it with launchAppControl. I've tried using tizen.application.getAppsInfo() to find the player application, but none of the found IDs seem to work with tizen.application.launch().
Here's the launchAppControl API reference:
void launchAppControl(ApplicationControl appControl,
optional ApplicationId? id,
optional SuccessCallback? successCallback,
optional ErrorCallback? errorCallback,
optional ApplicationControlDataArrayReplyCallback? replyCallback) raises(WebAPIException);
When I try launching the found applications (like org.tizen.video-player-tv), I get a success message but nothing actually happens. The browser application (org.tizen.browser) launches correctly, so the command itself works.
Answer
Problem Understanding
The user is trying to launch Tizen TV's native media player using its ApplicationId, but is encountering issues where:
- The found player applications don't actually launch despite success messages
- The native player might be a service rather than a standalone application
Solution Methods
-
Verify Application Privileges: Ensure your application has these privileges in config.xml:
<privilege>application.info</privilege> <privilege>application.launch</privilege> -
Proper Error Handling: Use proper error handling to diagnose launch issues:
function onLaunchSuccess() { console.log("Application launched successfully"); } function onLaunchError(error) { console.log("Launch failed:", error); } tizen.application.launch("org.tizen.video-player-tv", onLaunchSuccess, onLaunchError); -
Alternative Approach - Use Application Control: Instead of launching the player directly, try using application control with proper operation:
var appControl = new tizen.ApplicationControl( "http://tizen.org/appcontrol/operation/view", null, "video/*", null, [new tizen.ApplicationControlData("uri", ["http://example.com/video.mp4"])] ); tizen.application.launchAppControl(appControl, null);
Additional Tips
- The native player might be integrated with the TV application rather than being a standalone app
- Check Samsung's developer documentation for TV-specific media playback APIs
- Consider using the AVPlay API for media playback instead of trying to launch the native player