{"id":595,"date":"2023-04-25T13:54:54","date_gmt":"2023-04-25T05:54:54","guid":{"rendered":"https:\/\/doc.orionstar.com\/en\/?post_type=lsvr_kba&#038;p=595"},"modified":"2026-11-03T11:00:25","modified_gmt":"2026-11-03T03:00:25","slug":"bigscreenbot-development","status":"publish","type":"lsvr_kba","link":"https:\/\/doc.orionstar.com\/en\/knowledge-base\/bigscreenbot-development\/","title":{"rendered":"BigScreenBot Development"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>Introduction<\/strong><\/p>\n\n\n\n<p>BigScreenBot is the large-screen version of GreetingBot and supports displaying content on a large screen.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>1. Permissions<\/strong><\/p>\n\n\n\n<p>To display content on BigScreenBot, your app must request the SYSTEM_ALERT_WINDOW permission for global pop-up windows.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\" \/&gt;<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/orion-base-test-1256573505.cos.ap-beijing.myqcloud.com\/cn_docs_file\/2021-11-24_14%3A23%3A33_system_alert_window.png.png\" alt=\"\" \/><\/figure><\/div>\n\n\n<p class=\"has-medium-font-size\"><strong>2. Known Issues with the Large Screen<\/strong><\/p>\n\n\n\n<p>The large screen is adapted by rotating it from landscape to portrait, but the system cannot correctly read the screen information after the rotation. A coordinate conversion is therefore needed to keep the screen&#8217;s aspect ratio correct. For details, see the following part of the demo code:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">private int screenWidth = 0;\nprivate float scaleX = 0;\npublic BSImageDisplay(Context outerContext, Display display) {\n    super(outerContext, display);\n    Point pt = new Point();\n    display.getSize(pt);\n    screenWidth = pt.y * pt.y \/ pt.x;\n    scaleX = pt.x * 1.0f * pt.x \/ pt.y \/ pt.y;\n}\n@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    setContentView(R.layout.bs_image_layout);\n    \/\/Because of the landscape\/portrait orientation, the large-screen resolution needs one conversion, hence the conversion code below. Without it, the aspect ratio will be wrong.\n    \/\/Because there is a problem, we have to rotate the screen, so we have the code below\n    findViewById(R.id.bg_image_main).getLayoutParams().width = screenWidth;\n    findViewById(R.id.bg_image_main).setScaleX(scaleX);\n   ........\n}<\/pre>\n\n\n\n<p><a href=\"https:\/\/orion-base-test-1256573505.cos.ap-beijing.myqcloud.com\/cn_docs_file\/2022-01-13_17%3A53%3A33_DoubleScreen.zip\">Sample code<\/a><\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Introduction BigScreenBot is the large-screen version of GreetingBot and supports displaying content on a large screen. 1. Permissions To display content on BigScreenBot, your app must request the SYSTEM_ALERT_WINDOW permission for global pop-up windows. 2. Known Issues with the Large Screen The large screen is adapted by rotating it from landscape to portrait, but the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":[],"lsvr_kba_cat":[6],"lsvr_kba_tag":[],"_links":{"self":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/595"}],"collection":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba"}],"about":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/types\/lsvr_kba"}],"author":[{"embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/comments?post=595"}],"version-history":[{"count":4,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/595\/revisions"}],"predecessor-version":[{"id":932,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/595\/revisions\/932"}],"wp:attachment":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/media?parent=595"}],"wp:term":[{"taxonomy":"lsvr_kba_cat","embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba_cat?post=595"},{"taxonomy":"lsvr_kba_tag","embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba_tag?post=595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}