diff --git a/frontend/mono-ui/web/rainmaker-webview/build.gradle b/frontend/mono-ui/web/rainmaker-webview/build.gradle
index 20b69757f2b..ebb685a734b 100755
--- a/frontend/mono-ui/web/rainmaker-webview/build.gradle
+++ b/frontend/mono-ui/web/rainmaker-webview/build.gradle
@@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.3.2'
+ classpath 'com.android.tools.build:gradle:7.0.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -67,16 +67,14 @@ android {
minSdkVersion 19
applicationId 'org.egovernment.mseva.citizen'
targetSdkVersion 26
- testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
versionCode 14
versionName '2.3.0'
- resValue "string", "app_name", "mSeva-Punjab"
+ resValue "string", "app_name", "mSeva-Citizen-DEV"
resValue "string", "launcher_icon", "@mipmap/ic_launcher_citizen"
signingConfig signingConfigs.Citizen
- // Production
- buildConfigField 'String', 'url', '"https://mseva.lgpunjab.gov.in/citizen/user/register"'
- buildConfigField 'String', 'gatewayHost', '"migs.mastercard.co.in"'
+ buildConfigField 'String', 'url', '"https://dev.digit.org/citizen/user/register"'
+ buildConfigField 'String', 'gatewayHost', '"test.ccavenue.com"'
}
EmployeeProd {
minSdkVersion 19
@@ -104,8 +102,8 @@ android {
resValue "string", "launcher_icon", "@mipmap/ic_launcher_citizen"
signingConfig signingConfigs.Citizen
- buildConfigField 'String', 'url', '"https://dev.digit.org/citizen/user/register"'
- buildConfigField 'String', 'gatewayHost', '"migs.mastercard.co.in"'
+ buildConfigField 'String', 'url', '"https://dev.digit.org/digit-ui/citizen"'
+ buildConfigField 'String', 'gatewayHost', '"test.ccavenue.com"'
}
EmployeeDEV {
minSdkVersion 19
@@ -118,7 +116,7 @@ android {
resValue "string", "launcher_icon", "@mipmap/ic_launcher_employee"
signingConfig signingConfigs.Employee
- buildConfigField 'String', 'url', '"https://dev.digit.org/employee/user/login"'
+ buildConfigField 'String', 'url', '"https://dev.digit.org/digit-ui/employee"'
buildConfigField 'String', 'gatewayHost', '"migs.mastercard.co.in"'
}
CitizenQA{
@@ -132,7 +130,7 @@ android {
resValue "string", "launcher_icon", "@mipmap/ic_launcher_citizen"
signingConfig signingConfigs.Citizen
- buildConfigField 'String', 'url', '"https://qa.digit.org/citizen/user/register"'
+ buildConfigField 'String', 'url', '"https://qa.digit.org/digit-ui/citizen"'
buildConfigField 'String', 'gatewayHost', '"migs.mastercard.co.in"'
}
EmployeeQA {
@@ -146,7 +144,7 @@ android {
resValue "string", "launcher_icon", "@mipmap/ic_launcher_employee"
signingConfig signingConfigs.Employee
- buildConfigField 'String', 'url', '"https://qa.digit.org/employee/user/login"'
+ buildConfigField 'String', 'url', '"https://qa.digit.org/digit-ui/employee"'
buildConfigField 'String', 'gatewayHost', '"migs.mastercard.co.in"'
}
CitizenUAT{
@@ -160,7 +158,7 @@ android {
resValue "string", "launcher_icon", "@mipmap/ic_launcher_citizen"
signingConfig signingConfigs.Citizen
- buildConfigField 'String', 'url', '"https://uat.digit.org/citizen/user/register"'
+ buildConfigField 'String', 'url', '"https://uat.digit.org/digit-ui/citizen"'
buildConfigField 'String', 'gatewayHost', '"migs.mastercard.co.in"'
}
EmployeeUAT {
@@ -174,7 +172,7 @@ android {
resValue "string", "launcher_icon", "@mipmap/ic_launcher_employee"
signingConfig signingConfigs.Employee
- buildConfigField 'String', 'url', '"https://uat.digit.org/employee/user/login"'
+ buildConfigField 'String', 'url', '"https://uat.digit.org/digit-ui/employee"'
buildConfigField 'String', 'gatewayHost', '"migs.mastercard.co.in"'
}
CitizenSTAGING{
@@ -212,3 +210,4 @@ dependencies {
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.android.gms:play-services-base:15.0.1'
}
+
diff --git a/frontend/mono-ui/web/rainmaker-webview/gradle/wrapper/gradle-wrapper.properties b/frontend/mono-ui/web/rainmaker-webview/gradle/wrapper/gradle-wrapper.properties
index e4b65b521f6..9cd79b5a2f1 100755
--- a/frontend/mono-ui/web/rainmaker-webview/gradle/wrapper/gradle-wrapper.properties
+++ b/frontend/mono-ui/web/rainmaker-webview/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Thu Sep 12 18:02:38 IST 2019
+#Mon Jan 23 10:17:12 IST 2023
distributionBase=GRADLE_USER_HOME
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
+zipStoreBase=GRADLE_USER_HOME
diff --git a/frontend/mono-ui/web/rainmaker-webview/src/main/AndroidManifest.xml b/frontend/mono-ui/web/rainmaker-webview/src/main/AndroidManifest.xml
index b9cc10fd265..5f3cdb79fe9 100755
--- a/frontend/mono-ui/web/rainmaker-webview/src/main/AndroidManifest.xml
+++ b/frontend/mono-ui/web/rainmaker-webview/src/main/AndroidManifest.xml
@@ -69,7 +69,7 @@
diff --git a/frontend/mono-ui/web/rainmaker-webview/src/main/java/org/egovernment/mseva/AppJavaScriptProxy.java b/frontend/mono-ui/web/rainmaker-webview/src/main/java/org/egovernment/mseva/AppJavaScriptProxy.java
index f467af41d76..d52fce3ea00 100755
--- a/frontend/mono-ui/web/rainmaker-webview/src/main/java/org/egovernment/mseva/AppJavaScriptProxy.java
+++ b/frontend/mono-ui/web/rainmaker-webview/src/main/java/org/egovernment/mseva/AppJavaScriptProxy.java
@@ -129,7 +129,6 @@ public void downloadBase64File(String base64Data, String filename) throws IOExce
os = new FileOutputStream(dwldsPath, false);
os.write(pdfAsBytes);
}catch (Exception e){
- Log.v("Error while creating temp report.");
}finally {
os.flush();
os.close();
diff --git a/frontend/mono-ui/web/rainmaker-webview/src/main/java/org/egovernment/mseva/MainActivity.java b/frontend/mono-ui/web/rainmaker-webview/src/main/java/org/egovernment/mseva/MainActivity.java
index aedb0fd3aa4..720ebeb15a7 100755
--- a/frontend/mono-ui/web/rainmaker-webview/src/main/java/org/egovernment/mseva/MainActivity.java
+++ b/frontend/mono-ui/web/rainmaker-webview/src/main/java/org/egovernment/mseva/MainActivity.java
@@ -31,6 +31,7 @@
import android.view.KeyEvent;
import android.view.View;
import android.view.WindowManager;
+import android.webkit.ConsoleMessage;
import android.webkit.CookieManager;
import android.webkit.GeolocationPermissions;
import android.webkit.URLUtil;
@@ -78,7 +79,7 @@ public class MainActivity extends AppCompatActivity {
final private int REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS = 124;
private static String URL =BuildConfig.url;
- private String FILE_TYPE = "image/*"; //to upload any file type using "*/*"; check file type references for more
+ private String FILE_TYPE = "*/*"; //to upload any file type using "*/*"; check file type references for more
public static String HOST = getHost(URL);
//Careful with these variable names if altering
@@ -168,9 +169,10 @@ protected void onCreate(Bundle savedInstanceState) {
//Move this to Javascript Proxy
webView = (WebView) findViewById(R.id.webview);
- webView.getSettings().setJavaScriptEnabled(false);
+ webView.getSettings().setJavaScriptEnabled(true);
webView.addJavascriptInterface(proxy, "mSewaApp");
+
String versionName = "";
int versionCode = 0;
try {
@@ -185,7 +187,7 @@ protected void onCreate(Bundle savedInstanceState) {
WebSettings webSettings = webView.getSettings();
webSettings.setUserAgentString(webSettings.getUserAgentString() + " mSewa V." + versionName + "." + versionCode);
- webSettings.setJavaScriptEnabled(false);
+ webSettings.setJavaScriptEnabled(true);
webSettings.setGeolocationEnabled(true);
webSettings.setAllowFileAccess(true);
webSettings.setAllowFileAccessFromFileURLs(true);
@@ -270,7 +272,11 @@ public void onDownloadStart(String url, String userAgent,
webView.setWebChromeClient(new WebChromeClient() {
// handling geolocation
-
+ @Override
+ public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
+ android.util.Log.d("WebView", consoleMessage.message());
+ return true;
+ }
@Override
public void onGeolocationPermissionsShowPrompt(final String origin, final GeolocationPermissions.Callback callback) {
@@ -423,7 +429,7 @@ public boolean url_actions(WebView view, String url){
boolean returnValue = true;
//Show toast error if not connected to the network
if (!DetectConnection.isInternetAvailable(MainActivity.this)) {
- Toast.makeText(getApplicationContext(), "Please check your Network Connection!", Toast.LENGTH_SHORT).show();
+// Toast.makeText(getApplicationContext(), "Please check your Network Connection!", Toast.LENGTH_SHORT).show();
//Use this in a hyperlink to redirect back to default URL :: href="refresh:android"
} else if (url.startsWith("refresh:")) {
@@ -553,6 +559,7 @@ public boolean check_permission(int permission){
return false;
}
+
private void showFileDialog(){
Intent contentSelectionIntent = new Intent(Intent.ACTION_GET_CONTENT);
contentSelectionIntent.addCategory(Intent.CATEGORY_OPENABLE);
@@ -594,8 +601,10 @@ private File create_image() throws IOException {
@SuppressLint("SimpleDateFormat")
String file_name = new SimpleDateFormat("yyyy_mm_ss").format(new Date());
String new_name = "file_"+file_name+"_";
- File sd_directory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
- return File.createTempFile(new_name, ".jpg", sd_directory);
+ final File root = new File(Environment.getExternalStorageDirectory() + File.separator + "MyDir" + File.separator);
+ root.mkdirs();
+ //File sd_directory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
+ return File.createTempFile(new_name, ".jpg", root);
}
diff --git a/frontend/mono-ui/web/rainmaker-webview/src/main/res/xml/provider_paths.xml b/frontend/mono-ui/web/rainmaker-webview/src/main/res/xml/provider_paths.xml
index 2b01c092787..2be00abaf41 100644
--- a/frontend/mono-ui/web/rainmaker-webview/src/main/res/xml/provider_paths.xml
+++ b/frontend/mono-ui/web/rainmaker-webview/src/main/res/xml/provider_paths.xml
@@ -1,5 +1,6 @@
+