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?

  1. Clone the https://github.com/egovernments/frontend repo and switch to branch whichever state your working.

  2. Open below location in Android studio

https://github.com/egovernments/frontend/tree/pb_release_master/web/rainmaker-webview

3. 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.

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"'

2. Save the file, left side of the android studio click Build variants, select build variant.

3. Click on build menu, select Build APK(s) submenu.

4. It will take some time to generate and it will show generated location.

 

4. Generating APK for citizen 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, select build variant.

3. Click on Build menu, select Build APK(s) submenu.

4. It will take some time to generate and it will show generated location.

 

3. Generating APK for Production

  1. Follow 3rd and 4th step mentioned above.

  2. Then, Click on Build menu, select Generate Signed Bundle / APK.

3. Select 1st radio button Android App Bundle,

4. Enter the all information presented in form, and click on next.

5. Upload the APK generated by 4th step and upload it to the play store.