Hosted App
This article provides an introduction to some behaviors of hosted app in KaiOS.
Cursor
If a hosted app needs cursor, developer can set cursor as true to enable OS provided cursor. Cursor behaviors are similar to Browser app: Press D-Pad to move the cursor. Press CSK to perform mouse click.
Status Bar
A hosted app can hide the status bar by setting fullscreen as true.
Address Bar
There is no address bar for hosted app. Developers can make it by themselves.
Browser app has address bar.
Loading Progress Bar
By default OS doesn’t show loading progress bar for hosted app. Developers can make loading progress bar for a hosted app by themselves, or set loading progress bar as true to show OS provided loading progress bar.
Software Key
No OS provided software key bar for hosted app. Developers can make it by themselves.
- Pressing LSK: No predefined functions. App can listen to its key event.
- Pressing CSK: Perform mouse click.
- Pressing RSK: No predefined functions. App can listen to its key event.
Browser app has software key bar.
- Pressing LSK: Start using search bar.
- Pressing CSK: Perform mouse click.
- Pressing RSK: Show Options menu.
Shortcut Key
Shortcut keys are not available in hosted app. Developers can make it by themselves.
Browser app has shortcut keys by default when a page is loaded.
Input
When entering text edit mode, focus on the input and show OS-provided software key bar for text inputting.
- Pressing CSK: Send Enter key event.
- Pressing RSK: Leave text edit mode (blur from the input) and hide the text inputting software key bar.
Full-Screen Video
When entering full-screen video mode, hide cursor and show OS-provided softkey bar.
- Pressing LSK/BACK: Leave full-screen mode.
- Pressing CSK: Play/Pause.
- Pressing UP/DOWN: Volume up/down.
- Pressing LEFT/RIGHT: Jump 10 sec backward/forward.
Error Handling
When trying to change pages without internet connection, show this error message with 3 buttons. Error title and message change according to different errors.
- Select “Settings”: Go to connection settings.
- Select “Refresh”: Refresh the page.
- Select “Quit”: Quit the app directly.
Volume
App has ability to call vol up/down api to change system volume. When calling that api, OS will show volume panel (auto-detecting volume channel and show the corresponding panel) and change the volume levels, and then disappear after 2 sec timeout.
However, app should handle when/how to change the volume. For example, pressing some key to vol up, app should listen the key by itself.