Android Web View & How To Generate APK

Overview

This document will help us generate the APK for Citizen and Employee applications.

Steps

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 create only responsive web apps instead of native apps (Android, IOS). The Android web view is used to render the out web application.

2. Generate APK For Citizen & Employee Applications

  1. Open the below location in the Android studio.

Generate 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. 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 the applicable 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. Generate APK For Production

  1. Follow the 3rd and 4th steps mentioned above.

  2. Click on the Build menu and select Generate Signed Bundle / APK.

  1. Select 1st radio button - Android App Bundle.

  1. Enter the information presented in the form and click on Next.

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

How to debug android app using Chrome browser

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.