简体   繁体   English

在三星 tizen 电视上按下返回键时返回智能集线器

[英]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();
} 

To direct it to Smart Hub you may try hide() to close the application.要将其定向到 Smart Hub,您可以尝试 hide() 关闭应用程序。

tizen.application.getCurrentApplication().hide();

Check the Document for details.查看文档了解详细信息。

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

相关问题 Tizen Samsung Smart TV-请在“偏好设置”中将日志记录级别设置为DEBUG - Tizen samsung smart tv - please set the logging level to DEBUG in Preferences 三星Tizen电视的安全性 - Security in Samsung tizen tv 三星Tizen TV中的浏览器回调 - Browser callback in Samsung Tizen TV Tizen中的HTML5视频元素非常慢(三星Smart-TV开发) - HTML5 video element extremely slow in Tizen (Samsung Smart-Tv development) 我应该如何使用 Appium 对 Samsung Tizen Smart TV 上的演示应用程序进行 QA 自动化? - How should I do QA automation for the demo application on the Samsung Tizen Smart TV using Appium? 如何在三星智能电视的 tizen Web 应用程序中打开/关闭屏幕保护程序并设置自定义屏幕保护程序? - How to set screensaver on/off and set custom screensaver in tizen web application for Samsung Smart TV? 三星 Tizen 智能电视浏览器上的 HTML5 视频无法正常工作和扩展黑客 - HTML5 video on Samsung Tizen Smart TV browser not working and extension hack Angular 4 不适用于 Tizen 智能电视 - Angular 4 not working on Tizen Smart TV 如何在真实的Samsung Smart TV上访问Tizen应用程序中的应用程序日志? - How can I access to app log in a Tizen app on a real Samsung Smart TV? 在三星Tizen电视应用程序中实现多任务处理功能 - Implement Multitasking functionality in samsung tizen tv application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM