Version: Smart Feature Phone 2.5

Packaged or hosted App

While Packaged Apps are the recommended way to deliver your KaiOS apps, there may be benefits to using the Hosted App approach. This page provides a guide to the key differences between these delivery methods and offers advice on choosing between the two.

The primary difference between Packaged Apps and Hosted Apps is fairly obvious: the former delivers all its content onto a user’s device, while the latter delivers the app‘s assets on demand from a web server. However, there are many more subtle differences that you should consider when choosing between the two.

Packaged and Hosted apps compared

Let’s start by looking at key features of Packaged Apps and Hosted Apps and see how they differ.

Functionality

The overriding reason for creating a Packaged App is the functionality it can offer to your users. Packaged Apps can use the Privileged APIs, which provide apps with the ability to integrate closely with hardware and software features on a KaiOS device. If, for example, your app wanted to allow the user to select and use details of contacts stored on the device, this can only be done in a Packaged App.

FeaturePackage AppsHosted Apps
API supportAll available KaiOS APIsNo access to Privileged and Internal APIs
Device integrationExcellentLimited
Can access web resourcesYesYes

Performance

In general you should expect users to observe better response from Packaged Apps, as all the app’s assets are stored locally on their device. When accessing remote data from the Internet, generally there’ll be no significant difference between the two options.

FeaturePackage AppsHosted Apps
Start-up timeFast, all assets on the deviceNetwork limited, all assets downloaded
Network impactRemote data onlyApp content(unless AppCached) and remote data
Content optimization, e.g. screen sizeThrough redundant assets or multiple packagesOn-the-fly
Impact of data plan limitsLowHigh

Availability

While KaiOS supports AppCache and local data storage, Packaged Apps provide the app’s assets locally by default, removing the need to explicitly design for application caching.

Hosting

The cost and effort of hosting a server to deliver Hosted Apps may be an issue for you, if it is then Packaged Apps have a clear advantage.

FeaturePackage AppsHosted Apps
Server requiredNoYes

Discovery

FeaturePackage AppsHosted Apps
DiscoveryThrough MarketplaceThrough Marketplace and own site
Direct access using a URLNoYes

Delivery

All apps need to be delivered to a user’s device, which will be affected by both the network bandwidth and the available storage memory on the device. Here the overall size of your app’s assets will be the primary decision driver, the larger your app the more likely you’ll want to deliver it as a Hosted App.

FeaturePackage AppsHosted Apps
Marketplace review timeLonger (when using Privileged APIs)Shorter
Self-publicationYesYes
App updatesRequires a new package to be loaded onto MarketplaceCore app changes delivered on-the-fly, new install details (e.g. name, icon) require a new Marketplace package
App Asset/Content redundancy on devicePossibleNo, only used assets/content downloaded
App asset limitsPractical package size limit is device memory and network dependent, generally < 50Mb, <5Mb for low memory devicesOnline: No practical limit AppCached: As for Packaged Apps
Number of apps per deviceLimited by device memoryOnline: Practically unlimited AppCached: As for Packaged Apps
Asset extendibilityLimited, except for data from XMLHttpRequest and browser links all assets must be on the deviceUnlimited, within Origin
Remote contentBy using iframes, but that content will not have access to privileged APIs nor will it have the default CSP applied to it.By default

Development

FeaturePackage AppsHosted Apps
Delivery standardProprietary (albeit a simple ZIP)Web standard
DebuggingEasier, no Origin limitationseasy, Just like normal web app debug
Reading JavaScript assetsRequires use of XMLHttpRequestDirect
Coding challengesOAuth functionality for Facebook, Dropbox, Twitter, etc.
Manifest must specify a launch_pathRequiredOptional
Apps per OriginDoesn’t applyDoesn't apply
CSPEnforcedOptional
mozApps API install functionApps.installPackageapps.install

Making your choice

The choice of Packaged App or Hosted App isn’t necessarily a simple one. There are however a few key factors that can be used to determine the option to use, as shown in this flowchart :

Package or hosted App