简体   繁体   English

三星智能电视应用浏览历史记录

[英]Samsung smart tv app browsing history

i'm trying to emulate the browser back button when clicking samsung smartTV remote control return button, my application is a web based application using angularjs framework. 我试图在单击三星smartTV遥控器返回按钮时模拟浏览器的后退按钮,我的应用程序是使用angularjs框架的基于Web的应用程序。

when i executed this: 当我执行此:

case tvKey.KEY_RETURN:
        alert("RETURN");
        widgetAPI.blockNavigation(event);
        console.log(window.history.length);
        break;

it gives "1" in the console log, and i couldn't go back to the previous page, does this means that the samsung smart tv does not store URLs in history? 它在控制台日志中给出“ 1”,并且我无法返回上一页,这是否意味着三星智能电视不会在历史记录中存储URL? and is there any other way in going back to previous pages ? 还有其他方法可以返回上一页吗?

Samsung Browser does store the history and to Go back you actually have to use this code Samsung Browser确实存储了历史记录,要返回,您实际上必须使用此代码

 case tvKey.KEY_RETURN:
            alert("RETURN");
            widgetAPI.blockNavigation(event);
            window.history.back();
            break;

This will work fine until you reach the Ist page from where you started 这将正常工作,直到您从开始的地方到达Ist页面

If you want use "go back", you may fill and use own history array like this answer: 如果要使用“返回”,则可以填充并使用自己的历史记录数组,如下所示:

https://stackoverflow.com/a/18894897/2068612 https://stackoverflow.com/a/18894897/2068612

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM