The mobile app
An installable web app, Android and iPhone projects built from the admin panel, and sign-in with a QR code.
The Mobile Apps plugin gives the site an app in three forms: a web app members install from the browser in one tap, and complete Android and iPhone projects of your own app for the stores.
The web app (ready at once)
As soon as the plugin is on, members can install the site from the browser: it gets its own icon on the home screen, opens full screen, shows your bottom tabs and has a page for when the phone is offline. Nothing needs to be built.
- Android phones and computers with Chrome or Edge show an install button. Offer the app with a small banner adds a banner on phones; a visitor who closes it is left alone for a week.
- iPhones install it through Safari → Share → Add to Home Screen. The Get the app page (
/app) explains it step by step.
Phones only install a web app from an https:// address.
The App builder
Admin → Plugin pages → Mobile Apps. The phone on the right shows the real site and follows what you type. Save the app makes it so for everyone.
- Name, Short name (under the icon, 12 letters at most) and One sentence about the app.
- Icon: a square PNG, 512 pixels or larger. Every size the phones and the stores ask for is made from it.
- Theme colour (the bar at the top of the phone), Background and Splash colour (behind the icon while the app opens).
- Start page:
/is the home feed, or for example/videos. - Orientation: follows the phone, upright only, or sideways only.
- Bottom tabs: up to five, each with a name, an icon and an address.
#menuopens the side menu. Hide the top bar in the app gives the pages more room.
Android and iPhone projects
The Build tab makes the store apps from what the App builder holds now.
Android
Download the Android project: a complete Android Studio project in Kotlin. The app is your site in a frame, with the file picker for uploads, the camera and the microphone, full-screen video, pull to refresh, an offline page, and links to your site that open in the app.
- Package ID: like
com.yoursite.app. It names the app in the stores; never change it after publishing. Version: raise it for every new package you publish. - No Android Studio? Put the files in a GitHub repository. Its workflow builds the APK on GitHub. Download
app-debug.apkfrom the run. - For Google Play add a signing key as the
README-BUILD.mdinside explains. - Upload the APK under APK for members, and members can download it from Get the app. Add your Google Play link once the app is in the store.
iPhone
Download the iPhone project: a Swift project for XcodeGen with the same features. On a Mac: brew install xcodegen, xcodegen generate, open the project in Xcode, pick your team, run. Without a Mac, the GitHub workflow in the project builds it.
The App Store needs an Apple Developer account. Until then iPhone members use Add to Home Screen. Add your App Store link when the app is published.
When you change something in the App builder, the web app updates by itself. Download the projects again for the stores.
Sign in on a computer with the phone
With Sign in on a computer by scanning a code on, the sign-in page on a computer shows a QR code. A member who is signed in on the phone opens Scan in the app (or /app/scan), scans it and approves; the computer is signed in. The code lasts a few minutes and works once.
Inside the app
Pages know when they run inside the app and leave out what the app already offers (the install banner, for example). Calls, uploads and the camera work as they do in the browser, so HTTPS is required for them too.
Smart TV
Since Mobile Apps 1.1.0 the site also runs on a television; 1.2.0 made it work just as well in a desktop browser and added several TV apps.
The TV view at /tv
Open yoursite.com/tv in any TV browser, a computer browser or one of the TV
apps below. It is made for 1920x1080 and 1280x720 screens: a big header with
your logo and the tabs Home, Live TV, Videos, Shorts, Feed, Search and
Profile (or Sign in), then rows of large cards.
- With a remote: the arrows move between the cards of a row and between rows; the row slides so the card in focus is always on screen. OK opens the card. Back (Escape, Backspace, Samsung's Return, LG's Back) goes back: a tab returns to Home, a row returns to the tabs, and on the tabs the TV app closes (or asks first, see the TV app's settings).
- With a mouse, a pointer remote or a finger: hovering lights a card without moving anything, a click opens it, the wheel scrolls the page, a sideways wheel, a swipe or the round arrows at the ends of a row slide the row. Press an arrow key and the remote takes over again.
- Every tab opens something: Live TV shows one row per category of the Live TV plugin, Videos and Shorts the public videos, Feed the latest public posts, Search finds videos, posts and channels and shows them as cards, Profile shows your videos and posts and "Open my profile" opens your page in the TV look. Live TV and Shorts appear only when something fills them.
- Pages that know the TV look (Live TV) open with
?tv=1; other site pages open as they are, and Back still returns to the TV view. - Signing in: the Sign in tab shows a QR code and six letters (or only
the letters, if the TV app says so). Scan the code with a phone that is
signed in, or open
yoursite.com/tv/linkon the phone and type the letters, then press Approve. Signing in with a password works too. Sign out is on the Profile tab. - Light or dark: the TV starts light (or dark, if the TV app says
so). The Dark/Light button at the top right switches at once and is
remembered - in the same
mmb_modecookie the site uses, and in the browser - so the site and the TV keep one choice.
The Smart TV app tab (several TV apps)
Admin > Mobile Apps > Smart TV app. Each card is one TV app with its
banner, package, version, tabs and its three downloads. Add a TV app,
Edit, Open the TV view and Delete are on the card. A plain /tv
shows the first app (Order in the list); a TV package opens
/tv?app=<id> so the TV shows that app's settings.
Each TV app has:
- Name on the TV, Package ID (like
com.yoursite.tv, never change it after publishing), Version, Start page (default/tv). - Light or dark at first - viewers can still switch.
- Banner for Android TV (320 x 180; without one it is made from the icon, the name and the colour) and its own Icon (else the phone app's icon).
- Colour of the TV (tabs, buttons, banner) and Focus ring colour (the ring around the card the remote is on).
- Tabs at the top - tick the tabs to show and number them for the order; Home is always first.
- Rows on Home - the rows the plugins give the TV; untick to hide one, number them for the order. Rows from new plugins come last.
- Start on Live TV - the first live channel plays when the app opens (once per visit).
- Screensaver after (minutes) - a dark screen with a wandering clock; any key wakes it. 0 = never.
- The Back key on Home - up to the tabs then leave; up to the tabs then ask ("Press Back again to leave"); or leave at once.
- Signing in on the TV - a QR code and the six letters, or only the six letters.
Save, then download a package (they use what is saved):
- Android TV project - an Android Studio project for Android TV, Google
TV and Fire TV, with the same GitHub workflow as the phone project: put it
in a GitHub repository and download
app-debug.apkfrom the Actions run. Install it withadb installor the Downloader app, or sign a release and publish it for TV on Google Play (README-BUILD.md inside). - Samsung (Tizen) app -
config.xmlandindex.html. Import it in Tizen Studio, make a Samsung certificate (Certificate Manager) and choose Build Signed Package to get the.wgt; install it on a TV in Developer mode, or upload it to the Samsung TV Seller Office (README-TIZEN.md inside). - LG (webOS) app -
appinfo.json,index.htmland the icons. Pack it withares-package webos-app, install it withares-installon a TV with the Developer Mode app, or upload it to the LG Seller Lounge (README-WEBOS.md inside).
The Build tab still downloads the first TV app's packages.
Android TV settings (one APK for phones and TVs)
Admin > Mobile Apps > App builder > Android TV settings. Turn on Also
run on Android TV and the phone's Android project becomes one APK for both:
it adds the LEANBACK_LAUNCHER entry and a banner (its own upload, else
the banner of the chosen TV app), and on a TV it opens the Start page on a
TV (default /tv) with the settings of the TV app you pick, turns
sideways (landscape), passes the remote's Back key to the page and rings the
card in focus in the D-pad focus colour. On a phone nothing changes.
Download the Android project again on the Build tab after saving. If you
prefer a separate TV listing, use the Smart TV app tab instead.
The "Get the app" page (/app) has a Smart TV section that tells members
how to install it on each kind of TV, with a QR code of /tv. The web app's
manifest carries a "TV" shortcut to /tv.
Adding a row from a plugin (tv_sections)
A plugin adds its own row of cards with the tv_sections filter:
add_filter('tv_sections', function (array $sections, array $ctx = []) {
// $ctx: 'tab' (home, videos, live, search ...), 'q' (the search words), 'user'
$sections[] = [
'key' => 'my-row', // a short name
'title' => __('My row'),
'icon' => 'tv', // an icon name of the site
'url' => '/my-page', // "See all" (optional)
'order' => 40, // rows are sorted by it (Videos 20, Shorts 30, Latest posts 60)
'tab' => 'live', // also show it on that tab: live, videos, shorts, feed, search, profile
'shape' => 'wide', // wide (16:9), tall (shorts) or text
'tv' => true, // its pages understand ?tv=1
'items' => [
['title' => 'Channel one', 'image' => '/uploads/one.jpg', 'url' => '/my-page/1', 'meta' => 'News', 'badge' => 'LIVE'],
],
];
return $sections;
});
Items without a url, and rows without a title, are left out. Addresses
and pictures may be relative to the site. A row whose key or address has
"live" in it goes on the Live TV tab by itself.