Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Android Wrapper to create native Android Apps from offline-capable Progressive Web Apps

License

NotificationsYou must be signed in to change notification settings

xtools-at/Android-PWA-Wrapper

Repository files navigation

An Android Wrapper application to create native Android Apps from an offline-capable Progressive Web App.

Drafted for theAndroid App of myLeasing Calculator Web App usingReact,Redux,Materialize.css and a lot of Offline-First love over atleasingrechnen.at.

Looking for iOS or Desktop?

Check out my other projects:

Why would I use a wrapper?

I know, using a Wrapper-App to display a Website can feel a bit odd. But there are a few good reasons why you'd package your Web App like this.

  • If you've got a very sophisticated UI already, it might make sense not to rebuild it from scratch for multiple platforms, especally if it's a Single Page Application already, that doesn't "feel" like a Website.
  • There might be as well less competition for a given niche on App Stores, in comparison to Google directly. Withleasingrechnen.at, I've got easily into the Top 10 Apps on Google Play for my country, whereas Google Search put me on page 9 as the Site is relatively new.

What it does

  • Sets up a WebView just the way PWAs/SPAs like it (e.g. enables App cache and DOM storage, ...).
  • Shows a loading spinner while fetching the Web App.
  • Provided your Web App is Offline-capable, it only needs an Internet connection on the first startup. If this fails, it shows a native refresh widget.
  • Opens all external URLs in the device's Browser instead.
  • Checks for Internet connection and fetches Updates for your Web App accordingly.
  • Is compatible down to JellyBean, although it's recommended to build for SDK Version >= 19 (KitKat). Building for SDK Version >= 21 (Lollipop) puts you on the safe side without having to worry too much about Browser support.
  • APK-size < 1.4 MB. The latest cat video from WhatsApp weighs heavier ;)

How to build your own

  • Get Android Studio 3.4+
  • Clone/fork repository
  • Put your Web App's URL inWEBAPP_URL inConstants.java
  • Replaceapp_name instrings.xml with the name of your App
  • Add your own primary colors tocolors.xml (colorPrimary, colorPrimaryDark, colorPrimaryLight)
  • Put your own icons in place:
    • Add your ownic_launcher.png andic_launcher_round.png in themipmap folders
    • Add your ownic_appbar.png in thedrawables folders. This is displayed in Android'sRecent Apps View on your app bar, so it should look nicely when placed on top of your primary color.
    • I recommend usingAndroid Asset Studio to get the icons ready in no time
  • Change the package name inapp/build.gradle,applicationId
  • ChangeAndroidManifest.xml ->aplication ->activity ->intent-filter to your own URLs/schemes/patterns/etc. or remove theintent-filter forandroid.intent.action.VIEW altogether
  • CheckConstants.java for more options
  • Build App in Android Studio

I don't accept Feature Requests, only Pull Requests :)

License

GNU General Public License v3.0 - if you use it, we wanna see it!Other licensing options are available on inquiry.


[8]ページ先頭

©2009-2026 Movatter.jp