语言

Menu
Sites
Language
Galaxy gear S2 - Launch application on the synced device

Hey. I'm trying to launch an application on the Android synced device using the Tizen watch.

With the "tizen.application.launchAppControl" I'm able to launch the Samsung Market, but I think that it is a service on the Android side once the app ID is called "com.samsung.w-manager-service".

What I'm trying to do is to launch the Google Play shooting some kind of intent. There is any way to that?

查看选择的答案

响应

5 回复
daniel kim

Hi,

I guess that you've found this link to launch gear application of Samsung Apps from Gear S2 side. but I couldn't find the way how to launch android application of google play from Gear s2 side.

I'm not sure but maybe you can try it with "market://" or deep link of google play.

     https://developer.tizen.org/ko/forums/general-support/wearablegearhow-launch-samsung-gear-apps-my-application?langswitch=ko

Regards

Rodrigo Borba

First of all, thanks for the answer. I already tried use market://, but I'm kind of lost with the syntax. I think that is strange that there is no documentations about it. I mean, it is a obviously feature, right?

AVSukhov

Hello,

As a last resort, if you use companion app, you can using SAP send some action to your host app (android app) and launch neccesary app from android app.

Mark as answer
Rodrigo Borba

What I was trying to do was openning the Google Play Store with some APP ID. After alot of research and some "reverse engineering" in the Nike Tizen Application (which opens the Google Play Store) I was able to do that.

 

 

window.onload = function() {
    var appid = "com.samsung.w-manager-service";
    var type = "phone";
    var url = "market://details?id=br.org.cesar.punchcardreminder";

    var extra_data = [
              new tizen.ApplicationControlData("msgId", ["mgr_install_host_app_req"]),
              new tizen.ApplicationControlData("type", [type]),
              new tizen.ApplicationControlData("deeplink", [url])];

    var appControl = new tizen.ApplicationControl(
               "http://tizen.org/appcontrol/operation/default",
               null,
               null,
               null,
               extra_data);

    var appControlReplyCallback = {
            onsuccess: function(data) {
                console.log("launchUrl reply success");
                console.log("success: data = " + JSON.stringify(data));
            },
            onfailure: function() {
                console.log("launchUrl reply failed");
            }
        };

    try {
        tizen.application.launchAppControl(
                 appControl,
                 appid,
                 function() { console.log("intentBorba", "launchUrl success"); },
                 function(err) { console.log("intentBorba", "launchUrl failed: " + err.message); },
                 appControlReplyCallback);
    }catch(err) {
        console.error("[launcher] " + err);
    }
};

It's kind of frustrating figure out that there is not directly documentation of a such simple feature when you're starting to develop in a new language. I hope that this answer helps some people.

AVSukhov

Hello,

Great. Thanks for sharing info.