[英]Going back to smart hub when return key is pressed on samsung tizen tv
NOTE : this is different from normal Samsung Smart TV, this one has Tizen OS.注意:这与普通的三星智能电视不同,这台有 Tizen 操作系统。
My app got rejected with the defect "Return does not take you to previous page like SMART Hub but goes to broadcasting".我的应用程序因缺陷“返回不会像 SMART Hub 那样将您带到上一页,而是转到广播”而被拒绝。 It occurs on 2016 models, works fine on 2015 Tizen TV models.它发生在 2016 款机型上,在 2015 款 Tizen TV 机型上运行良好。
This is the piece of code that executes on return key press (have put it in apt switch case ) :这是在按下返回键时执行的一段代码(已将其放在 apt switch case 中):
tizen.application.getCurrentApplication().exit();
How do I prevent it from going to broadcasting and direct it to Smart Hub?如何防止它进行广播并将其定向到 Smart Hub?
Use window.history.back() , then return should you to previous page使用 window.history.back() ,然后返回上一页
if (window.history.length != 0)
{
window.history.back();
}
else if (window.history.length == 0)
{
tizen.application.getCurrentApplication().exit();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.