PWA support in App Stores has increased recently! I’ve just put together some test Android and iOS apps to see what the best strategy for this might be. I’m not a professional app developer, but know a bit of Java and general coding and have tinkered with apps, and this is basically just a web browser with all the app-ness already done
WebAPK
This is the current “Add To Home Screen” - I have read that this is not acceptable on Play store, but I am not 100% sure if this is still the case. This is obviously most preferable as it’s been tested.
Android Trusted Web Activity App
Only in the last few weeks, Google Play Store accepts a “Trusted Web Activity” as an app which would opens SC in Chrome full screen, and prompt to install Chrome if it isn’t installed:
https://medium.com/@firt/google-play-store-now-open-for-progressive-web-apps-ec6f3c6ff3cc
I’ve tested all the steps in this article, built the app, and it currently runs but only if you install Chrome Dev/Canary (which will become standard quite soon I expect). It still prompts for Home Screen addition though after install, and does not use already downloaded offline files.
I have source code up here, if you would like to build this yourself. There is a debug .apk in there that I say is safe to run, but it is never advisable to install an app from someone with only a few posts and inactive github! :
https://github.com/michaelh-sc/suttacentral-android-twa-app.git
PWA Builder
A more promising and immediately effective strategy is probably using https://pwabuilder.com / Cordova . I’ve tested this and it works very well so far on my two Android phones. I just need to test it a bit more on AWS device farm to make sure it is consistent - if browser engine changes for old phones, etc.
Initial testing is good - it downloads suttas and pretty much feels like the current home screen app. It downloads sutta data into the app’s data portion itself rather than browser cache (240MB for English + pali root text). No splash screen yet, and I am seeing small “Network Error” icon behind the menu when I go completely offline, but generally feels very very usable!:
https://github.com/michaelh-sc/suttacentral-android
Note I had to hard code a user agent as Chrome because Cordova isn’t recognised currently by SC site code. I think targeting Cordova could let you do things just for phones/devices with the app.
iPhone
I’m currently in early stages of an iPhone app too using the PWA Builder strategy. This is still Cordova - I believe it would use Safari’s code base and should work in iOS11.3+
https://medium.com/@firt/progressive-web-apps-on-ios-are-here-d00430dee3a7
It appears that the iPhone app might become the first hit on a search made in the iPhone search field, which would be cool.
Perhaps I should start a new thread to talk about the feasibility of these with tech and if there are any concerns with supporting this as a platform? The Polymer stuff is a little complicated, I don’t understand how the caching/ServiceWorker stuff works too well. It might be possible to pre-bundle a lot of the site elements or kick off a small offline download too on install, who knows! Also if anyone thinks I should take these off my github for some reason that’s possible too.