Esempio n. 1
0
 internal void CallFunctionWithPayload(CallFunctionRequestWithPayload request, string message)
 {
     //DEBUG
     DisplayMessage(JsonConvert.SerializeObject(request));
     ws.Send(JsonConvert.SerializeObject(request));
     DisplayMessage(message);
 }
Esempio n. 2
0
        internal void CallFunctionWithPayload(string id, string ep, string message, object payload)
        {
            CallFunctionRequestWithPayload cfr = new CallFunctionRequestWithPayload {
                Id = id, Type = "request", Uri = ep, Payload = payload
            };

            //DEBUG
            DisplayMessage(JsonConvert.SerializeObject(cfr));
            ws.Send(JsonConvert.SerializeObject(cfr));
            DisplayMessage(message);
        }
Esempio n. 3
0
        private void OpenYoutubeApp()
        {
            CallFunctionRequestWithPayload request = new CallFunctionRequestWithPayload
            {
                Id      = "youtube_open",
                Type    = "request",
                Uri     = "ssap://system.launcher/launch",
                Payload = new
                {
                    id = "youtube.leanback.v4",
                }
            };

            rc.CallFunctionWithPayload(request, "Youtube open request sent.");
        }
Esempio n. 4
0
        public void CloseApp(string id, string uri, string appId, string sessionId)
        {
            CallFunctionRequestWithPayload request = new CallFunctionRequestWithPayload
            {
                Id      = id,
                Type    = "request",
                Uri     = uri,
                Payload = new
                {
                    appId,
                    sessionId
                }
            };

            // Debug
            Console.WriteLine("App close request: " + JsonConvert.SerializeObject(request));
            CallFunctionWithPayload(request, "App close request sent.");
        }