WebApp Api is Android extended Webview Client are flexible, safe and easier request your Api and supports for using Cross-Origin Resource Sharing (CORS).
minimum SDK version: Android 5.0 (API 21) (recommended), but you also can run on Android 4.4 (API 19) and higher.
Now Webapp Api can run with your favorite android version with full compatible with latest versions:
- Download Android Studio & Configure SDK and AGP This guide page for download Android Studio and Configure SDK and AGP
Android 15 ready
see more details about android 15 preview here.

This repository is available under the MIT License.
Android Integrations such as App Message, Webview has also provides demo with detailed usage.
- App Message demo
- Webview the basics demo
- App Messenger demo(NEW)
- Shuffle Crypt demo(NEW)
- AfterExecute demo(BETA)
Server Files for this WebApp app sample
Shop Site Demo for usage example purpouses
- user guide page This guide contains examples on how to use WebApp Api in your code



The new Internet Connection 2 is very similar like Firebase Connection State, but firebase sometimes bug.
however Internet Connection 2 works with logic operations, and confirm if there is already in offline and then when handle disconnection a timer is started to run next 60 seconds to confirm isConnected.

The Ultimate WebApp Example uses the new AppMessenger.java and the service Messenger.java based of last example Messenger Service. With Appmessenger you can send request to messenger(Server service) and response back to other active client connection (AppMessenger) that you have created. Go to MessengerConnectionManager.java and move then Create a new ConnectionPolicy for the Class that you want to allow connect, you can choose
or
.
Also, now all
information are crypted by ShuffleCrypt.java.
,
,


Messenger Service are written from zero and is a (IPC) same as WebApp service but the diferente is the WebApp Service run on inside activity only and Messenger Service run in application for all activities.
In this example we extended the application with Messenger Service to become usage with Livedata, when this listening changes they send request as messenger client and then execute it inside messenger server that are running the webapp and back it to handler click callback. ,

Example of WebApp Service ThreadLess and request without UI Thread Blocking ,

Create a app and deliver the mobile version of your website,
implement webappapi to make requests,
load from zip your website, create a new version for the website from update.zip by url to download and install it, instant patch the website files from a external link patch.zip
Website to your Android app made easy its just need a zip file! Zip Website files, Demo example here

This is example of Zip Website using CORS Example shows how setup allowed CORS domains for incoming request links in the websitewithcors.zip files. Example here, Apache MultiViews documentation

Note: in Android API 33 and higher you are required asking the user for grant permissions to post notifications.

for grant permissions manual then go to Android Settings > Apps > Webapp Api> Notifications like below image:

Check the internet status in realtime before requesting any url

By default BackoffPolicy.LINEAR run as 10,20,30 seconds and multiply it by x times will happen, ex: 10s * how many times the work has been retried (for BackoffPolicy.LINEAR), and for BackoffPolicy.Exponential will be even longe.
Now this example has updated to run dynamically 10,20,30 seconds.










