Android web view and How to generate APK
This document will help us to generate the APK for Citizen and Employee applications.
1. Android web view
Android offers a variety of ways to present content to a user. To provide a user experience that’s consistent with the rest of the platform, it’s usually best to build a native app that incorporates framework-provided experiences, such as Android App Links or Search. Additionally, you can use Google Play-based experiences, such as App Actions and Slices, where Google Play services are available. Some apps, however, may need increased control over the UI. In this case, a WebView
is a good option for displaying trusted first-party content.
In Egov we will create an only a responsive web app, we will not create native apps(Android, IOS), we just use the android web view to render the out web application
2. How to generate APK for Citizen and Employee application?
Clone the https://github.com/egovernments/DIGIT-OSS repo.
Open the below location in the Android studio
https://github.com/egovernments/DIGIT-OSS/tree/master/frontend/mono-ui/web/rainmaker-webview
Generating APK for citizen application
Go to build. Gradle file there we have created multiple environments(UAT and PROD), please select the environment where you want to generate APK and put your web application URL.
update the web application URL as required Application URL.
buildConfigField 'String', 'url', '"https://uat.digit.org/citizen/user/register"'
also, specify the citizen gateway hostname if not using Mastercard,
buildConfigField 'String', 'gatewayHost', '"migs.mastercard.co.in"'
3.Save the file on, the left side of the android studio click Build variants, and select build variant.
4. Click on
Build menu, select Build APK(s) submenu.
It will take some time to generate and it will show generated location.
Generating APK for employee application
1. Go to build. Gradle file there we have created multiple environments(UAT and PROD), please select the environment where you want to generate APK and put your web application URL.
2. Save the file, left side of the android studio click Build variants, and select build variant.
3. Click on the build menu, and select Build APK(s) submenu.
It will take some time to generate and it will show generated location.
3. Generating APK for Production
Follow the 3rd and 4th steps mentioned above.
Then, Click on the Build menu, and select Generate Signed Bundle / APK.
Select 1st radio button
Android App Bundle,
2. Enter the all information presented in the form, and click on next.
3. Upload the APK generated by the 4th step and upload it to the play store.
https://digit-discuss.atlassian.net/wiki/spaces/DD/pages/2285273121