Back button on home page not exiting the app in WebOS

When I try to hit the back button on the home screen of my webOS app, I could not see any popup displaying “Do you want to exit the app?”. How to exit the app using the back key on the remote?

If the disableBackHistoryAPI property in appinfo.json is true, you can and should handle the back button control yourself. You can use webOS.platformBack(). It will display the exit dialog.
For more information, see Implementing a navigation back to the Home screen in Back Button. Thank you.

Thanks for the reply. I implemented the webOS.platformBack() method but the exit dialog worked only on the webOS tv emulator v6.0.0. When I run the it on TV, only the app launcher is displayed instead of the exit popup. Kindly assist.

TV Information:
webOS TV Version: 4.4.0-12 (goldlocks-gorce)
Model : 43UK6360PTE

Sorry for the confusion. The exit dialog only displays on the webOS TV 6.0 and higher.
If you need it on the previous versions, please use window.close().
It will close your app without the dialog on all versions of the webOS TV. So you can use your own dialog instead. Thank you.

Thanks for the suggestion. I implemented window.close() but it is not closing the app on webOS 4.4.0. Instead, it shows only the app launcher without closing the app. window.close() works same as webOS.platformBack() on webOS 6.0 by displaying the “Do you want to exit?” message with Exit and Cancel options.

I want the app to be closed completely. Kindly suggest any alternate solution.

Can you please share with us a sample app for testing at developer@lge.com?