Page MenuHomePhabricator

[SPIKE] Allow app to auto update
Closed, ResolvedPublic

Description

Problem

According to our user research, many people may not be aware of the store and how it works. Once our marketing efforts have encouraged users to install the app, they may not know how to update the app from the store

Solutions

Allow the app to auto-update without relying on the user to choose to update every time we make changes

Store auto-update

The KaiStore has a setting to control whether apps should auto-update. We should test if it works as expected and find out what is the default value.

The JioStore doesn't have that setting. We should ask Jio if apps can auto-update in their store.

We have to make sure local storage persists across app updates.
Hosted app

Hosted apps look the same to users in the sense that they are available in the store and installed on the phone but there are a number of differences. See documentation.

The main issue with hosted apps is downloading the app on every launch. It can be worked around with caching. We should figure out

  1. the kind of code we need for proper caching and proper cache invalidation
  2. where can the app be hosted in the WMF infrastructure

Results

KaiStore auto-update

I published version 1.0.0 of the app to the KaiStore and installed it on my banana phone. I then published version 1.0.1. I could see it in the store with the update label that means that a new version is available. My settings are set to auto-update. After a little over 24h I got the new version installed but I could not see it right away because the old version was still running. I had to reboot to force close the old version and then I could see I was using the new version.

To work around this inconvenient, we could consider closing the app explicitly instead of sending it to the background. This would also spare the device resources a little. See this issue for how to do it.

After resetting my Nokia 8110 to factory default, I can confirm that the store is set to auto-update ON by default.

JioStore auto-update

The JioStore is always set to auto-update. Users cannot change it. It checks for updates every 24h.

Hosted app

A hosted app would be too slow to open for us. The way to speed it up is with the application cache but using it is highly discouraged.

Also, hosted app don't have access to privileged APIs.

Note: I did not investigate where could the app be hosted. It would have to be under *.wikipedia.org to avoid CORS issues so I guess somewhere in the portal would be a good place.

Event Timeline

AMuigai created this task.Apr 16 2020, 6:31 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 16 2020, 6:31 AM

is this possible?

AMuigai moved this task from Backlog to Future on the Inuka-Team board.Apr 17 2020, 2:45 PM
AMuigai moved this task from Future to ideas on the Inuka-Team board.
AMuigai renamed this task from Allow app to auto update to [SPIKE] Allow app to auto update.May 6 2020, 1:38 PM
AMuigai edited projects, added Inuka-Team (Kanban); removed Inuka-Team.
SBisson updated the task description. (Show Details)May 6 2020, 2:37 PM

one point to spike here:

Do local storages persist after the app update? either both ways.

SBisson updated the task description. (Show Details)May 7 2020, 8:00 PM
SBisson added a subscriber: SBisson.

one point to spike here:

Do local storages persist after the app update? either both ways.

Good point. I've updated the task description.

SBisson claimed this task.May 7 2020, 8:01 PM
SBisson moved this task from Ready for Dev to Dev on the Inuka-Team (Kanban) board.
SBisson updated the task description. (Show Details)May 8 2020, 6:09 PM
SBisson updated the task description. (Show Details)
SBisson updated the task description. (Show Details)May 11 2020, 3:20 PM
SBisson updated the task description. (Show Details)May 11 2020, 3:24 PM
SBisson updated the task description. (Show Details)May 11 2020, 5:35 PM
SBisson updated the task description. (Show Details)
SBisson updated the task description. (Show Details)May 11 2020, 5:39 PM
SBisson moved this task from Dev to Code Review on the Inuka-Team (Kanban) board.May 11 2020, 5:42 PM
SBisson added a subscriber: eamedina.

@AMuigai @eamedina @hueitan My conclusion is that we should rely on store auto-update. It is enabled on the JioStore and configurable on the KaiStore (enabled by default). We don't have to do anything here.

Please see my results in the task description and let me know if you have any questions.

It looks good to me and glad both of the store supports auto-update! 🎉

To work around this inconvenient, we could consider closing the app explicitly instead of sending it to the background. This would also spare the device resources a little. See this issue for how to do it.

We could possibly set a due date minimum to x day and close the app when the user press backspace/end call key in search page instead of closing the app every time.


Regarding Hosted App, since we deploy the app to only Jio and KaiOS Store, there isn't any 3rd party store, so we don't need the hosted app yet.

AMuigai triaged this task as Medium priority.May 14 2020, 1:37 PM

Glad we were able to figure this out, let us rely on the store auto-update.

AMuigai closed this task as Resolved.May 14 2020, 3:32 PM