You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-8Lines changed: 24 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,31 @@ A sample Android Wrapper application to create a native Android App from an offl
4
4
5
5
Drafted for the [Android App](https://play.google.com/store/apps/details?id=at.xtools.leasingrechner&utm_source=github.com&utm_medium=link&utm_campaign=store_visit) of my [Leasing Calculator](https://www.leasingrechnen.at) Web App using [React](https://github.com/facebook/react), [Redux](https://github.com/reactjs/redux), [Materialize.css](https://github.com/Dogfalo/materialize) and a lot of Offline-First love over at [leasingrechnen.at](https://www.leasingrechnen.at).
6
6
7
-
### Better README and v1.0 Release coming soon!
7
+
## Why would I use a wrapper?
8
+
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.
9
+
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.
10
+
There might be as well less competition for a given niche on App Stores, in comparison to Google directly. With [leasingrechnen.at](https://www.leasingrechnen.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.
8
11
9
-
## How to use
10
-
- Replace the 3 app icons in use (ic_launcher.png, ic_launcher_round.png, ic_appbar.png) -> [Android Asset Studio](https://romannurik.github.io/AndroidAssetStudio)
11
-
- Put your Web App's URL in *Constants.java* -> **WEBAPP_URL**
12
-
- Replace app name in strings.xml
13
-
- Add your own primary colors to colors.xml
14
-
- Change package name to your own (**"applicationId"** in *app/build.gradle*)
15
-
- Build in Android Studio
12
+
## What it does
13
+
- Sets up a WebView just the way PWAs/SPAs like it (e.g. enables App cache and DOM storage, ...).
14
+
- Shows a loading spinner while fetching the Web App.
15
+
- 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.
16
+
- Opens all external URLs in the device's Browser instead.
17
+
- Checks for Internet connection and fetches Updates for your Web App accordingly.
18
+
- 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.
19
+
20
+
## How to build your own
21
+
- Clone/fork repository
22
+
- Put your Web App's URL in _WEBAPP_URL_ in `Constants.java`
23
+
- Replace *app_name* in `strings.xml` with the name of your App
24
+
- Add your own primary colors to `colors.xml` (*colorPrimary, colorPrimaryDark, colorPrimaryLight*)
25
+
- Put your own icons in place:
26
+
- Add your own _ic_launcher.png_ and _ic_launcher_round.png_ in the `mipmap` folders
27
+
- Add your own _ic_appbar.png_ in the `drawables` folders. This is displayed in Android's _Recent Apps_ View on your app bar, so it should look nicely when placed on top of your primary color.
28
+
- I recommend using [Android Asset Studio](https://romannurik.github.io/AndroidAssetStudio) to get the icons ready in a breeze
29
+
- Change the package name in `app/build.gradle`, *applicationId*
30
+
- Check `Constants.java` for more options
31
+
- Build App in Android Studio
16
32
17
33
## License
18
34
[GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html) - if you use it, we wanna see it!
0 commit comments