Languages

Menu
Sites
Language
launch native app in web app

Hiiiiiiiii,

Iam trying to launch tizen native media player in my web project. I tried following peice of code but its not working,

tizen.application.launch("http://tizen.org/appcontrol/operation/view", onsuccess);

any suggestions plzz

 

Responses

6 Replies
talari praveen kumar

Hi

please try the below code to launch native media player

var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view", "file:///opt/media/01 Abhi Kuch Dino Se.mp3", "audio/mp3", null);
tizen.application.launchAppControl(
appControl,
"tizen.musicplayer",
function() {console.log("launch application control succeed"); },
function(e) {console.log("launch application control failed. reason: " + e.message); },
null );
function onsuccess() {
    console.log("The application has launched successfully");
}

here 'file:///opt/media/01 Abhi Kuch Dino Se.mp3' path of your media fiel and audio/mp3 is format of your file.

saranya tayi

Hi praveen,

Thanq, its working fine.


 

saranya tayi

hii

I dont want to play any song from tizen music player, just I want to launch music player. So to acheive that what modifications I have to do to above code

 

talari praveen kumar

Hi Saranya

Please replace "file:///opt/media/01 Abhi Kuch Dino Se.mp3", "audio/mp3" with "null".

saranya tayi

Hi praveen

Iam using followed code to launch video player

function videolaunch()
{
    var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view", "file:///opt/media/Life.mp4", "video/mp4", null);
    tizen.application.launchAppControl(
    appControl,
    "tizen.videoplayer",
    function() {console.log("launch application control succeed"); },
    function(e) {console.log("launch application control failed. reason: " + e.message); },
    null );
    function onsuccess() {
    console.log("The application has launched successfully");
    }

}

Its working fine but my requirement is to open list of videos. Can you plz suggest how to proceed

 

 

 

 

talari praveen kumar

Hi Saranya

Please follow the below documentation to retrieve the videos/songs/files list

https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.web.device.apireference%2Ftizen%2Fcontent.html