最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

android - how to turn on external display on flip phone - Stack Overflow

programmeradmin4浏览0评论

I'm in the case of a flip phone like Galaxy Z-Flip 5. I want my app to display something on the small screen when the user tap on a button, like does the Photo app.

I've this code run on button tap :

    if (externalDisplay != null && !isExternalScreenActive) {
        // Activer l'écran externe
        externalPresentation = new Presentation(this, externalDisplay);
        externalPresentation.setContentView(R.layout.external_screen_layout);
        externalPresentation.show();
        isExternalScreenActive = true;
    }

When I tap on the button, nothing happens, there is no exception, no significant info in logcat, but the small screen remains OFF. If I close the phone and turn on the screen, I can see the presentation content ==> The presentation works.

My question : how do I turn the small screen ON ?

Thanks

发布评论

评论列表(0)

  1. 暂无评论