diff --git a/.idea/ChatHistory_schema_v2.xml b/.idea/ChatHistory_schema_v2.xml
new file mode 100644
index 0000000..da19d3d
--- /dev/null
+++ b/.idea/ChatHistory_schema_v2.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/caches/deviceStreaming.xml b/.idea/caches/deviceStreaming.xml
index 9aaec77..871d8b9 100644
--- a/.idea/caches/deviceStreaming.xml
+++ b/.idea/caches/deviceStreaming.xml
@@ -51,6 +51,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -75,6 +87,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -354,18 +379,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -548,6 +561,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -817,6 +842,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml
index fc84d4c..1f0041e 100644
--- a/.idea/deploymentTargetSelector.xml
+++ b/.idea/deploymentTargetSelector.xml
@@ -4,6 +4,14 @@
+
+
+
+
+
+
+
+
diff --git a/GSKMTOrange/build.gradle b/GSKMTOrange/build.gradle
index 4bb03b7..bd9704b 100644
--- a/GSKMTOrange/build.gradle
+++ b/GSKMTOrange/build.gradle
@@ -13,27 +13,26 @@ android {
}
configurations {
- all*.exclude module: 'support-v4'
- // This removes all other versions of `support-v4` if gets duplicated from all the artifacts.
+ // all*.exclude module: 'okio'
+ //all*.exclude group: 'com.squareup.okhttp3', module: 'okhttp'
+ all*.exclude module: 'support-v4' // This removes all other versions of `support-v4` if gets duplicated from all the artifacts.
}
defaultConfig {
- applicationId "cpm.com.gskmtorange"
- minSdkVersion 24
- targetSdk(35)
multiDexEnabled true
useLibrary 'org.apache.http.legacy'
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- ndk { abiFilters.add("armeabi-v7a")
- abiFilters.add("arm64-v8a")
- }
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ applicationId "cpm.com.gskmtorange"
+ minSdkVersion 26
+ targetSdk(34)
+
// For Lebanon
/*versionCode 1
versionName "1.0"*/
//For Egypt
- versionCode 35
- versionName "4.6"
+ versionCode 37
+ versionName "4.8"
//For UAE
/*versionCode 29
versionName "4.1"*/
@@ -47,7 +46,7 @@ android {
/*versionCode 28
versionName "4.0"*/
- // aading price facing
+ // adding price facing
/* versionCode 27
versionName "3.8"*/
//sa
@@ -80,6 +79,7 @@ android {
//For Oman
/*versionCode 1
versionName "1.0"*/
+ ndk {abiFilters "armeabi-v7a", "arm64-v8a"}
}
signingConfigs {
@@ -128,6 +128,8 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation files('libs/ksoap2-android-assembly-3.0.0-jar-with-dependencies.jar')
+ // implementation files('libs/ksoap2-android-assembly-3.6.4.jar')
+ // implementation files('libs/ksoap2-android-3.3.0.jar')
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.12.0'
implementation project(path: ':library')
@@ -136,9 +138,11 @@ dependencies {
implementation 'androidx.activity:activity:1.10.1'
implementation 'androidx.appcompat:appcompat:1.7.1'
testImplementation 'junit:junit:4.13.2'
- implementation 'android.arch.navigation:navigation-fragment:1.0.0'
- androidTestImplementation 'com.android.support.test:runner:1.0.2'
- androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+ implementation "androidx.navigation:navigation-fragment-ktx:2.9.0"
+ androidTestImplementation "androidx.test:core:1.6.1"
+ androidTestImplementation "androidx.test:espresso:espresso-core:3.5.1"
+ androidTestImplementation "androidx.test.ext:junit:1.2.1"
+ androidTestImplementation "androidx.test:annotation:1.0.1"
implementation 'com.google.code.gson:gson:2.11.0'
implementation 'com.github.bumptech.glide:glide:4.16.0'
@@ -150,18 +154,19 @@ dependencies {
implementation 'com.google.android.gms:play-services-maps:19.2.0'
implementation 'com.google.firebase:firebase-analytics:22.4.0'
implementation 'com.google.firebase:firebase-appindexing:20.0.0'
- implementation 'com.google.firebase:firebase-crashlytics:19.4.3'
+ // implementation 'com.google.firebase:firebase-crashlytics:19.4.3'
implementation 'com.google.firebase:firebase-auth:23.2.1'
-
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
+ implementation 'com.squareup.okhttp3:okhttp:4.12.0'
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.22"))
implementation 'androidx.multidex:multidex:2.0.1'
// Main SDK dependency
// implementation("com.github.pratham-PDots:camera_lib:1.5.1.1")
implementation("com.github.pratham-PDots:camera_lib:1.5.3.2")
+ implementation "androidx.core:core-splashscreen:1.0.1"
}
diff --git a/GSKMTOrange/libs/ksoap2-android-3.3.0.jar b/GSKMTOrange/libs/ksoap2-android-3.3.0.jar
new file mode 100644
index 0000000..107ae2e
Binary files /dev/null and b/GSKMTOrange/libs/ksoap2-android-3.3.0.jar differ
diff --git a/GSKMTOrange/libs/ksoap2-android-assembly-3.6.4.jar b/GSKMTOrange/libs/ksoap2-android-assembly-3.6.4.jar
new file mode 100644
index 0000000..9fbb6a7
Binary files /dev/null and b/GSKMTOrange/libs/ksoap2-android-assembly-3.6.4.jar differ
diff --git a/GSKMTOrange/release/Haleon-Egypt-Posm-release.apk b/GSKMTOrange/release/Haleon-Egypt-rollback-release.apk
similarity index 87%
rename from GSKMTOrange/release/Haleon-Egypt-Posm-release.apk
rename to GSKMTOrange/release/Haleon-Egypt-rollback-release.apk
index 406589f..7901143 100644
Binary files a/GSKMTOrange/release/Haleon-Egypt-Posm-release.apk and b/GSKMTOrange/release/Haleon-Egypt-rollback-release.apk differ
diff --git a/GSKMTOrange/release/output-metadata.json b/GSKMTOrange/release/output-metadata.json
index 42a656b..e952efe 100644
--- a/GSKMTOrange/release/output-metadata.json
+++ b/GSKMTOrange/release/output-metadata.json
@@ -11,11 +11,11 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
- "versionCode": 35,
- "versionName": "4.6",
+ "versionCode": 37,
+ "versionName": "4.8",
"outputFile": "GSKMTOrange-release.apk"
}
],
"elementType": "File",
- "minSdkVersionForDexing": 24
+ "minSdkVersionForDexing": 26
}
\ No newline at end of file
diff --git a/GSKMTOrange/src/debug/res/values/google_maps_api.xml b/GSKMTOrange/src/debug/res/values/google_maps_api.xml
index c24c671..b990508 100644
--- a/GSKMTOrange/src/debug/res/values/google_maps_api.xml
+++ b/GSKMTOrange/src/debug/res/values/google_maps_api.xml
@@ -20,6 +20,7 @@
Once you have your key (it starts with "AIza"), replace the "google_maps_key"
string in this file.
-->
- AIzaSyDdgvyAY0_pb-k7PLPJoG6wR-KN0xnhkRE
+
+ AIzaSyCs2VZqLl4OgStAraUHr8012cUc7vf3Uo8
diff --git a/GSKMTOrange/src/main/AndroidManifest.xml b/GSKMTOrange/src/main/AndroidManifest.xml
index b165047..2eb55fc 100644
--- a/GSKMTOrange/src/main/AndroidManifest.xml
+++ b/GSKMTOrange/src/main/AndroidManifest.xml
@@ -48,9 +48,40 @@
android:largeHeap="true"
android:requestLegacyExternalStorage="true"
android:supportsRtl="false"
+ android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
+
+
tools:replace="android:supportsRtl">
+
+
+
+
) Arrays.stream(imgs.split(", "))
- .map(img -> new ImageUri(img, new File(img).getName())) // Extract file name as second parameter
- .collect(Collectors.toList()) : new ArrayList<>());*/
// Retrieve image URIs from database
String imgs = dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IRPD_IMAGES));
@@ -4798,6 +4794,83 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
return list;
}
+
+ // get CATEGORY PICTURE data
+ public ArrayList getCategoryPicturePogdata(String visit_date, String categoryId, String key_account_id, String store_type_id, String class_id, String store_id, String tableName) {
+ ArrayList list = new ArrayList<>();
+ Cursor dbcursor = null;
+ try {
+ if (key_account_id != null) {
+ dbcursor = db.rawQuery("SELECT DISTINCT ifnull(T.IRPD_IMAGES,'')as IRPD_IMAGES,ifnull(T.IRPD_IMAGES_MODIFY,'')as IRPD_IMAGES_MODIFY, ifnull(SB.PD_SUB_CATEGORY_CODE,'')AS PD_SUB_CATEGORY_CODE,SB.SUB_CATEGORY_ID, MIA.IMAGE_ALLOW,SB.SUB_CATEGORY FROM "
+ + tableName + " M INNER JOIN SKU_MASTER SK ON M.SKU_ID = SK.SKU_ID" +
+ " INNER JOIN BRAND_MASTER BR ON SK.BRAND_ID = BR.BRAND_ID" +
+ " INNER JOIN SUB_CATEGORY_MASTER SB ON BR.SUB_CATEGORY_ID = SB.SUB_CATEGORY_ID" +
+ " INNER JOIN CATEGORY_MASTER CA ON SB.CATEGORY_ID = CA.CATEGORY_ID" +
+ " INNER JOIN MAPPING_SUB_CATEGORY_IMAGE_ALLOW MIA ON SB.SUB_CATEGORY_ID=MIA.SUB_CATEGORY_ID " +
+ " LEFT JOIN (SELECT * FROM " + CommonString.TABLE_IRPD_POG + " WHERE " + CommonString.KEY_STORE_ID + "=" + store_id +
+ " AND " + CommonString.KEY_CATEGORY_ID + "=" + categoryId + " AND " + CommonString.KEY_VISIT_DATE + "='" + visit_date +
+ "')AS T ON T.CATEGORY_ID=CA.CATEGORY_ID AND T.SUB_CATEGORY_ID=SB.SUB_CATEGORY_ID " +
+ "WHERE M.KEYACCOUNT_ID = '" + key_account_id + " ' AND M.STORETYPE_ID = '" + store_type_id +
+ "' AND M.CLASS_ID = '" + class_id + "' AND CA.CATEGORY_ID = '" + categoryId + "'", null);
+
+ } else {
+ dbcursor = db.rawQuery("SELECT DISTINCT ifnull(T.IRPD_IMAGES,'')as IRPD_IMAGES,ifnull(T.IRPD_IMAGES_MODIFY,'')as IRPD_IMAGES_MODIFY,ifnull(SB.PD_SUB_CATEGORY_CODE,'')AS PD_SUB_CATEGORY_CODE,SB.SUB_CATEGORY_ID, MIA.IMAGE_ALLOW,SB.SUB_CATEGORY FROM MAPPING_STOCK_STOREWISE M INNER JOIN SKU_MASTER SK ON M.SKU_ID = SK.SKU_ID" +
+ " INNER JOIN BRAND_MASTER BR ON SK.BRAND_ID = BR.BRAND_ID" +
+ " INNER JOIN SUB_CATEGORY_MASTER SB ON BR.SUB_CATEGORY_ID = SB.SUB_CATEGORY_ID" +
+ " INNER JOIN CATEGORY_MASTER CA ON SB.CATEGORY_ID = CA.CATEGORY_ID" +
+ " INNER JOIN MAPPING_SUB_CATEGORY_IMAGE_ALLOW MIA ON SB.SUB_CATEGORY_ID=MIA.SUB_CATEGORY_ID " +
+ " LEFT JOIN (SELECT * FROM " + CommonString.TABLE_IRPD_POG + " WHERE " + CommonString.KEY_STORE_ID + "=" + store_id +
+ " AND " + CommonString.KEY_CATEGORY_ID + "=" + categoryId + " AND " + CommonString.KEY_VISIT_DATE + "='" + visit_date +
+ "') AS T ON T.CATEGORY_ID=CA.CATEGORY_ID AND T.SUB_CATEGORY_ID=SB.SUB_CATEGORY_ID " +
+ "WHERE M.STORE_ID = '" + store_id + "' AND CA.CATEGORY_ID = '" + categoryId + "'", null);
+ }
+ if (dbcursor != null) {
+ dbcursor.moveToFirst();
+ while (!dbcursor.isAfterLast()) {
+ CategoryPictureGetterSetter CPGS = new CategoryPictureGetterSetter();
+ CPGS.setSUB_CATEGORY(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
+ CPGS.setSUB_CATEGORY_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
+ CPGS.setImage_allow(dbcursor.getString(dbcursor.getColumnIndexOrThrow("IMAGE_ALLOW")));
+ CPGS.setSubCatCode(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PD_SUB_CATEGORY_CODE")));
+
+ // Retrieve image URIs from database
+ String imgs = dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IRPD_IMAGES));
+ String imgs_modify = dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IRPD_MODIFY_IMAGES));
+
+ // Split and map URIs and Modify URIs separately
+ List imageUris = imgs != null && !imgs.isEmpty()
+ ? Arrays.stream(imgs.split(", ")).collect(Collectors.toList())
+ : new ArrayList<>();
+ List modifyUris = imgs_modify != null && !imgs_modify.isEmpty()
+ ? Arrays.stream(imgs_modify.split(", ")).collect(Collectors.toList())
+ : new ArrayList<>();
+
+ // Create ImageUri objects with original URI and Modify URI
+ ArrayList imageUriList = new ArrayList<>();
+ for (int i = 0; i < imageUris.size(); i++) {
+ String uri = imageUris.get(i);
+ String modifyUri = (i < modifyUris.size()) ? modifyUris.get(i) : uri; // Fallback to original if no modify URI
+ imageUriList.add(new ImageUri(uri, modifyUri));
+ }
+
+ CPGS.setImageUris(imageUriList);
+
+ CPGS.setSubCategoryCamera1("");
+ CPGS.setSubCategoryCamera2("");
+ list.add(CPGS);
+ dbcursor.moveToNext();
+ }
+ dbcursor.close();
+ return list;
+ }
+ } catch (Exception e) {
+ Log.d("Exception ", "get Planogram Shelf Header After Save !" + e.toString());
+ // return list;
+ }
+ return list;
+ }
+
+
public ArrayList getPlanogramAddShelfHeaderAfterSaveData(
String store_id, String category_id) {
@@ -7837,24 +7910,22 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
ContentValues values = new ContentValues();
try {
-
for (int l = 0; l < headerDataList.size(); l++) {
List childList = hashMapListChildData.get(headerDataList.get(l));
for (int i = 0; i < childList.size(); i++) {
POGGetterSetter data = childList.get(i);
-
values.put("STORE_CD", store_cd);
values.put("QUESTION_ID", data.getQUESTION_ID());
values.put("QUESTION", data.getQUESTION());
values.put("ANSWER_ID", data.getANSWER_ID());
+ values.put("ANSWER", data.getANSWER());
values.put("SUB_CATEGORY_ID", headerDataList.get(l).getSub_category_id());
+ values.put("SUB_CATEGORY", headerDataList.get(l).getSub_category());
values.put("QTYPE", data.getQTYPE());
values.put("CATEGORY_ID", category_cd);
-
db.insert(CommonString.TABLE_POG_DATA_SAVE, null, values);
}
}
-
} catch (Exception ex) {
Log.d("Database ", "Exception while Insert Audit Data " + ex.toString());
}
@@ -9393,7 +9464,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
Log.d("Exception ", "when fetching Records!!!!!!!!!!!!!!!!!!!!!" + e.toString());
return false;
}
-
Log.d("MSL_Availability_StockFacing ", "midday---------------------->Stop<-----------");
return false;
}
@@ -10672,6 +10742,37 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
return l;
}
+ public long InsertPdPogImageData(
+ String visit_date, String storeId, String categoryId, List _list,String savemode) {
+ ContentValues values = new ContentValues();
+ long l = 0;
+ try {
+ db.delete(CommonString.TABLE_IRPD_POG,
+ CommonString.KEY_STORE_ID + "=" + storeId + " AND " + CommonString.KEY_VISIT_DATE + "='" + visit_date + "' AND " +
+ CommonString.KEY_CATEGORY_ID + "=" + categoryId, null);
+
+ db.beginTransaction();
+ for (int i = 0; i < _list.size(); i++) {
+ values.put(CommonString.KEY_SAVE_MODE, savemode);
+ values.put(CommonString.KEY_STORE_ID, storeId);
+ values.put(CommonString.KEY_VISIT_DATE, visit_date);
+ values.put(CommonString.KEY_CATEGORY_ID, categoryId);
+ values.put(CommonString.KEY_SUB_CATEGORY_ID, _list.get(i).getSUB_CATEGORY_ID());
+ values.put(CommonString.KEY_SUB_CATEGORY_CODE, _list.get(i).getSubCatCode());
+ List info = _list.get(i).getImageUris().stream().map(ImageUri::getModify_uri).collect(Collectors.toList());
+ values.put(CommonString.KEY_IRPD_IMAGES, _list.get(i).getImageUris().stream().map(ImageUri::getUri).collect(Collectors.toList()).stream().collect(Collectors.joining(", ")));
+ values.put(CommonString.KEY_IRPD_MODIFY_IMAGES, _list.get(i).getImageUris().stream().map(ImageUri::getModify_uri).collect(Collectors.toList()).stream().collect(Collectors.joining(", ")));
+ l = db.insert(CommonString.TABLE_IRPD_POG, null, values);
+ Log.e("data_d", info.toString() + ","+_list.get(i).getImageUris().size());
+ }
+ db.setTransactionSuccessful();
+ db.endTransaction();
+ } catch (Exception ex) {
+ Log.d("data_d ", " in Insert TABLE_IRPD " + ex);
+ }
+ return l;
+ }
+
public long InsertPdImageVisibilityData(
String visit_date, String storeId, String categoryId, List _list,String savemode) {
ContentValues values = new ContentValues();
@@ -10779,6 +10880,44 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
return filled;
}
+ public boolean isSOSPogCategory(String store_id, String date, String mode, String categoryId) {
+ boolean filled = false;
+ Cursor dbcursor = null;
+ try {
+ String query = "";
+ if (mode != null) {
+ query = "SELECT * FROM " + CommonString.TABLE_IRPD_POG + " WHERE "
+ + CommonString.KEY_STORE_ID + " =" + store_id + " AND "
+ + CommonString.KEY_CATEGORY_ID + " =" + categoryId + " AND "
+ + CommonString.KEY_VISIT_DATE + " ='" + date + "'";
+ } else {
+
+ }
+ dbcursor = db.rawQuery(query, null);
+
+ if (dbcursor != null) {
+ dbcursor.moveToFirst();
+ while (!dbcursor.isAfterLast()) {
+ String common_status = dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_SAVE_MODE));
+ if (mode != null) {
+ if (common_status != null && !common_status.equals("") && common_status.equalsIgnoreCase(CommonString.KEY_COMPELETE)) {
+ filled = true;
+ } else {
+ filled = false;
+ break;
+ }
+ }
+ dbcursor.moveToNext();
+ }
+ dbcursor.close();
+ }
+
+ } catch (Exception e) {
+ return filled;
+ }
+ return filled;
+ }
+
public boolean isPdVisibility(String store_id, String date, String mode, String categoryId) {
boolean filled = false;
Cursor dbcursor = null;
@@ -10817,6 +10956,44 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
return filled;
}
+ public boolean isPdPogImages(String store_id, String date, String mode, String categoryId) {
+ boolean filled = false;
+ Cursor dbcursor = null;
+ try {
+ String query = "";
+ if (mode != null) {
+ query = "SELECT * FROM " + CommonString.TABLE_IRPD_POG + " WHERE "
+ + CommonString.KEY_STORE_ID + " =" + store_id + " AND "
+ + CommonString.KEY_CATEGORY_ID + " =" + categoryId + " AND "
+ + CommonString.KEY_VISIT_DATE + " ='" + date + "'";
+ } else {
+
+ }
+ dbcursor = db.rawQuery(query, null);
+
+ if (dbcursor != null) {
+ dbcursor.moveToFirst();
+ while (!dbcursor.isAfterLast()) {
+ String common_status = dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_SAVE_MODE));
+ if (mode != null) {
+ if (common_status != null && !common_status.equals("") && common_status.equalsIgnoreCase(CommonString.KEY_COMPELETE)) {
+ filled = true;
+ } else {
+ filled = false;
+ break;
+ }
+ }
+ dbcursor.moveToNext();
+ }
+ dbcursor.close();
+ }
+
+ } catch (Exception e) {
+ return filled;
+ }
+ return filled;
+ }
+
public ArrayList getIrPDforUpload(String store_id, String visit_date) {
ArrayList list = new ArrayList<>();
Cursor dbcursor = null;
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/LoginActivity.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/LoginActivity.java
index cd85194..845c311 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/LoginActivity.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/LoginActivity.java
@@ -95,7 +95,6 @@ import cpm.com.gskmtorange.xmlHandlers.XMLHandlers;
import static android.Manifest.permission.READ_CONTACTS;
import static com.google.android.gms.location.LocationRequest.Builder.IMPLICIT_MIN_UPDATE_INTERVAL;
-
public class LoginActivity extends AppCompatActivity implements GoogleApiClient.ConnectionCallbacks,
GoogleApiClient.OnConnectionFailedListener, LocationListener {
private static final int MY_PERMISSIONS_REQUEST_CAMERA = 10;
@@ -161,7 +160,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
e.printStackTrace();
}
- tv_version.setText("Version/Versiyon - " + app_ver);
+ tv_version.setText("Version/Versiyon - " + app_ver + "-T5");
preferences = PreferenceManager.getDefaultSharedPreferences(context);
editor = preferences.edit();
// Set up the login form.
@@ -518,39 +517,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
}
}
- /* @Override
- public Loader onCreateLoader(int i, Bundle bundle) {
- return new CursorLoader(this,
- // Retrieve data rows for the device user's 'profile' contact.
- Uri.withAppendedPath(ContactsContract.Profile.CONTENT_URI,
- ContactsContract.Contacts.Data.CONTENT_DIRECTORY), ProfileQuery.PROJECTION,
-
- // Select only userid addresses.
- ContactsContract.Contacts.Data.MIMETYPE +
- " = ?", new String[]{ContactsContract.CommonDataKinds.userid
- .CONTENT_ITEM_TYPE},
-
- // Show primary userid addresses first. Note that there won't be
- // a primary userid address if the user hasn't specified one.
- ContactsContract.Contacts.Data.IS_PRIMARY + " DESC");
- }
-
- @Override
- public void onLoadFinished(Loader cursorLoader, Cursor cursor) {
- List userids = new ArrayList<>();
- cursor.moveToFirst();
- while (!cursor.isAfterLast()) {
- userids.add(cursor.getString(ProfileQuery.ADDRESS));
- cursor.moveToNext();
- }
-
- adduseridsToAutoComplete(userids);
- }
-
- @Override
- public void onLoaderReset(Loader cursorLoader) {
-
- }*/
private void adduseridsToAutoComplete(List useridAddressCollection) {
//Create adapter to tell the AutoCompleteTextView what to show in its dropdown list.
@@ -562,21 +528,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
}
- /* private interface ProfileQuery {
- String[] PROJECTION = {
- ContactsContract.CommonDataKinds.userid.ADDRESS,
- ContactsContract.CommonDataKinds.userid.IS_PRIMARY,
- };
-
- int ADDRESS = 0;
- int IS_PRIMARY = 1;
- }*/
-
- /**
- * Represents an asynchronous login/registration task used to authenticate
- * the user.
- */
-
private class AuthenticateTask extends AsyncTask {
private ProgressDialog dialog = null;
@@ -600,7 +551,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
+ "[/PASSWORD]" + "[IN_TIME]" + CommonFunctions.getCurrentTimeWithLanguage(context)
+ "[/IN_TIME]" + "[LATITUDE]" + lat
+ "[/LATITUDE]" + "[LONGITUDE]" + lon
- + "[/LONGITUDE]" + "[APP_VERSION]" + app_ver
+ + "[/LONGITUDE]" + "[APP_VERSION]" + app_ver + "-T5"
+ "[/APP_VERSION]" + "[ATT_MODE]OnLine[/ATT_MODE]"
+ "[NETWORK_STATUS]" + "LoginStatus"
+ "[/NETWORK_STATUS]" + "[/USER_DATA][/DATA]";
@@ -654,7 +605,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
});
} else {
-
// For String source
xpp.setInput(new StringReader(result.toString()));
xpp.next();
@@ -794,9 +744,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
- /* Intent i = new Intent(activity, StorelistActivity.class);
- activity.startActivity(i);
- activity.finish();*/
}
});
@@ -977,29 +924,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
fusedLocationProviderClient.requestLocationUpdates(locationRequest, locationCallback, Looper.getMainLooper());
}
- /*@Override
- public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
-
- super.onRequestPermissionsResult(requestCode, permissions, grantResults);
- checkAppPermission(Manifest.permission.CAMERA, MY_PERMISSIONS_REQUEST_CAMERA);
-
- if (checkPlayServices()) {
- // Building the GoogleApi client
- buildGoogleApiClient();
- createLocationRequest();
- }
-
- // Create an instance of GoogleAPIClient.
- if (mGoogleApiClient == null) {
- mGoogleApiClient = new GoogleApiClient.Builder(this)
- .addConnectionCallbacks(this)
- .addOnConnectionFailedListener(this)
- .addApi(LocationServices.API)
- .build();
- }
-
- }
-*/
private boolean checkPlayServices() {
int resultCode = GooglePlayServicesUtil
.isGooglePlayServicesAvailable(this);
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/MainActivity.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/MainActivity.java
index 59c1458..f7fc6a8 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/MainActivity.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/MainActivity.java
@@ -66,6 +66,7 @@ public class MainActivity extends AppCompatActivity
WebView webView;
ImageView imageView;
String date;
+ String app_ver;
private SharedPreferences preferences = null;
GSKOrangeDB db;
String user_name, country_id;
@@ -130,6 +131,13 @@ public class MainActivity extends AppCompatActivity
db.open();
//usk
navigationView = (NavigationView) findViewById(R.id.nav_view);
+ try {
+ app_ver = String.valueOf(getPackageManager().getPackageInfo(getPackageName(), 0).versionName);
+ // login_version.setText("Parinaam Version " + app_ver);
+ } catch (PackageManager.NameNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
// get menu from navigationView
Menu menu = navigationView.getMenu();
// find MenuItem you want to change
@@ -163,6 +171,9 @@ public class MainActivity extends AppCompatActivity
nav_route_plan13.setTitle(getResources().getString(R.string.menu_setting));
MenuItem nav_route_plan14 = menu.findItem(R.id.nav_services);
nav_route_plan14.setTitle(getResources().getString(R.string.menu_services));
+
+ MenuItem nav_route_plan15 = menu.findItem(R.id.nav_version);
+ nav_route_plan15.setTitle("Version/Versiyon - " + app_ver + "-T5");
//Enable disable According to Configuration
ArrayList configurationData = db.getConfigurationMasterData(country_id);
if (!configurationData.isEmpty()) {
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/SplashScreenActivity.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/SplashScreenActivity.java
index 68639dc..5aa00e3 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/SplashScreenActivity.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/SplashScreenActivity.java
@@ -1,30 +1,16 @@
package cpm.com.gskmtorange;
-import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.PixelFormat;
-import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
+import android.os.Looper;
import android.preference.PreferenceManager;
-import android.util.Log;
import android.view.View;
-import android.view.Window;
-import android.view.WindowManager;
-import android.view.animation.Animation;
-import android.view.animation.AnimationUtils;
-import android.widget.ImageView;
import android.widget.LinearLayout;
-
import androidx.appcompat.app.AppCompatActivity;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-
import cpm.com.gskmtorange.constant.CommonString;
import cpm.com.gskmtorange.password.MPinActivity;
@@ -35,11 +21,11 @@ public class SplashScreenActivity extends AppCompatActivity {
private Context context;
private SharedPreferences preferences = null;
- public void onAttachedToWindow() {
+ /* public void onAttachedToWindow() {
super.onAttachedToWindow();
Window window = getWindow();
window.setFormat(PixelFormat.RGBA_8888);
- }
+ }*/
/**
* Called when the activity is first created.
@@ -47,103 +33,50 @@ public class SplashScreenActivity extends AppCompatActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
- setContentView(R.layout.activity_splash_main_layout);
-
- linearLayout = findViewById(R.id.lin_lay);
-
- preferences = PreferenceManager.getDefaultSharedPreferences(this);
context = this;
- //StartAnimations();
-
- sendToLogin();
-
- /* File f = new File(CommonString.getImagesFolder(context)_OLD);
- if(f!=null){
- File file[] = f.listFiles();
- if(file!=null){
-
- for (int i=0;i0){
- UploadImageWithRetrofit.uploadedFiles = 0;
- UploadImageWithRetrofit.totalFiles = file.length;
- UploadImageWithRetrofit uploadImg = new UploadImageWithRetrofit( SplashScreenActivity.this);
- uploadImg.UploadImageRecursive(SplashScreenActivity.this);
- }
- else {
- sendToLogin();
- }*//*
- }else {
- sendToLogin();
- }
-
- }
- else {
- sendToLogin();
- }
-*/
-
- }
- /* private void StartAnimations() {
- Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
- anim.reset();
- LinearLayout l=(LinearLayout) findViewById(R.id.lin_lay);
- l.clearAnimation();
- l.startAnimation(anim);
-
- anim = AnimationUtils.loadAnimation(this, R.anim.translate);
- anim.reset();
- ImageView iv = (ImageView) findViewById(R.id.logo);
- iv.clearAnimation();
- iv.startAnimation(anim);
-
- }*/
-
- public void sendToLogin() {
- new Handler().postDelayed(new Runnable() {
-
- /*
- * Showing splash screen with a timer. This will be useful when you
- * want to show case your app logo / company
- */
-
- @Override
- public void run() {
- //after Mpin
- String mpin = preferences.getString(CommonString.MPIN, null);
- if (mpin != null) {
- Intent in = new Intent(context, MPinActivity.class);
- in.putExtra(CommonString.IS_PASSWORD_CHECK, true);
- startActivity(in);
- finish();
- } else {
- Intent i = new Intent(context, LoginActivity.class);
- startActivity(i);
- finish();
- }
-
- }
- }, SPLASH_TIME_OUT);
- }
-
- public static String getCalculatedDate(String date, String dateFormat, int days) {
- Calendar cal = Calendar.getInstance();
- @SuppressLint("SimpleDateFormat") SimpleDateFormat s = new SimpleDateFormat(dateFormat);
- cal.add(Calendar.DAY_OF_YEAR, days);
try {
- return s.format(new Date(s.parse(date).getTime()));
- } catch (ParseException e) {
- // TODO Auto-generated catch block
- Log.e("TAG", "Error in Parsing Date : " + e.getMessage());
+ // Optional: hide the status bar safely
+ getWindow().getDecorView().setSystemUiVisibility(
+ View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ );
+ }catch (Exception ignored){}
+ setContentView(R.layout.activity_splash_main_layout);
+ linearLayout = findViewById(R.id.lin_lay);
+ preferences = PreferenceManager.getDefaultSharedPreferences(this);
+ startSplashTimer();
+ }
+
+
+ private void sendToLogin() {
+ try {
+ String mpin = preferences.getString(CommonString.MPIN, null);
+ Intent intent;
+ if (mpin != null) {
+ intent = new Intent(this, MPinActivity.class);
+ intent.putExtra(CommonString.IS_PASSWORD_CHECK, true);
+ } else {
+ intent = new Intent(this, LoginActivity.class);
+ }
+ startActivity(intent);
+ finish();
+ } catch (Exception ignored) {} finally {
+ String mpin = preferences.getString(CommonString.MPIN, null);
+ Intent intent;
+ if (mpin != null) {
+ intent = new Intent(this, MPinActivity.class);
+ intent.putExtra(CommonString.IS_PASSWORD_CHECK, true);
+ } else {
+ intent = new Intent(this, LoginActivity.class);
+ }
+
+ startActivity(intent);
+ finish();
}
- return null;
+
+ }
+
+ private void startSplashTimer() {
+ new Handler(Looper.getMainLooper()).postDelayed(this::sendToLogin, 3000);
}
}
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/adapter/RealtimeAdapter.kt b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/adapter/RealtimeAdapter.kt
new file mode 100644
index 0000000..d4a2ced
--- /dev/null
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/adapter/RealtimeAdapter.kt
@@ -0,0 +1,60 @@
+package cpm.com.gskmtorange.adapter
+
+import android.annotation.SuppressLint
+import android.content.Context
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.recyclerview.widget.RecyclerView
+import cpm.com.gskmtorange.GetterSetter.CategoryPictureGetterSetter
+import cpm.com.gskmtorange.R
+import cpm.com.gskmtorange.adapter.data.ImageUri
+import cpm.com.gskmtorange.databinding.ItemRealtimePdBinding
+
+class RealtimeAdapter(
+ val category: String?,
+ var context: Context,
+ private var subcates: ArrayList?,
+ private val btnlistener: BtnClickListener,
+) : RecyclerView.Adapter() {
+ class CustomViewHolder(view: View) : RecyclerView.ViewHolder(view)
+
+ override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = CustomViewHolder(
+ ItemRealtimePdBinding.inflate(LayoutInflater.from(context), parent, false).root
+ )
+
+ @SuppressLint(
+ "NotifyDataSetChanged", "ClickableViewAccessibility",
+ "UseCompatLoadingForDrawables", "SetTextI18n"
+ )
+ override fun onBindViewHolder(holder: CustomViewHolder, position: Int) {
+ ItemRealtimePdBinding.bind(holder.itemView).apply {
+ val subcat = subcates!![position]
+ tvSubCategory.text = "$category-${subcat.suB_CATEGORY}"
+ analyticBT.text = context.getString(R.string.view_report_pd)
+ analyticBT.setOnClickListener {
+ btnlistener.onStartSessionClick(position, subcat)
+ }
+ }
+ }
+
+ override fun getItemCount(): Int {
+ return subcates!!.size
+ }
+
+ interface BtnClickListener {
+ fun onStartSessionClick(_pos: Int, data: CategoryPictureGetterSetter)
+ }
+
+ @SuppressLint("NotifyDataSetChanged")
+ fun addsubCatItems(langList: ArrayList?) {
+ subcates = langList
+ notifyDataSetChanged()
+ }
+
+ fun updateItem(position: Int, uris: List) {
+ subcates!![position].imageUris = (subcates!![position].imageUris
+ ?: ArrayList()).apply { addAll(uris as ArrayList) }
+ notifyItemChanged(position)
+ }
+}
\ No newline at end of file
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/adapter/ScoreAdapter.kt b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/adapter/ScoreAdapter.kt
new file mode 100644
index 0000000..b180b58
--- /dev/null
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/adapter/ScoreAdapter.kt
@@ -0,0 +1,114 @@
+package cpm.com.gskmtorange.adapter
+
+import android.content.Intent
+import android.net.Uri
+import android.util.Log
+import android.view.LayoutInflater
+import android.view.ViewGroup
+import android.widget.TextView
+import androidx.recyclerview.widget.RecyclerView
+import com.bumptech.glide.Glide
+import cpm.com.gskmtorange.dailyentry.WebViewActivity
+import cpm.com.gskmtorange.databinding.ItemCategoryScoreBinding
+import cpm.com.gskmtorange.databinding.ItemOverallScoreBinding
+import cpm.com.gskmtorange.databinding.ItemPdImageBinding
+import cpm.com.gskmtorange.utils.ScoreItem
+
+class ScoreAdapter(private val items: List) :
+ RecyclerView.Adapter() {
+
+ private val TYPE_OVERALL = 0
+ private val TYPE_CATEGORY = 1
+ private val TYPE_IMAGE = 2
+
+ override fun getItemViewType(position: Int): Int {
+ return when (items[position]) {
+ is ScoreItem.OverallScore -> TYPE_OVERALL
+ is ScoreItem.CategoryScore -> TYPE_CATEGORY
+ is ScoreItem.ImageItem -> TYPE_IMAGE
+ }
+ }
+
+ override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
+ val inflater = LayoutInflater.from(parent.context)
+ return when (viewType) {
+ TYPE_OVERALL -> {
+ val binding = ItemOverallScoreBinding.inflate(inflater, parent, false)
+ OverallViewHolder(binding)
+ }
+ TYPE_CATEGORY -> {
+ val binding = ItemCategoryScoreBinding.inflate(inflater, parent, false)
+ CategoryViewHolder(binding)
+ }
+ TYPE_IMAGE -> {
+ val binding = ItemPdImageBinding.inflate(inflater, parent, false)
+ ImageViewHolder(binding)
+ }
+ else -> throw IllegalArgumentException("Invalid view type")
+ }
+ }
+
+ override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
+ when (val item = items[position]) {
+ is ScoreItem.OverallScore -> (holder as OverallViewHolder).bind(item)
+ is ScoreItem.CategoryScore -> (holder as CategoryViewHolder).bind(item)
+ is ScoreItem.ImageItem -> (holder as ImageViewHolder).bind(item)
+ }
+ }
+
+ override fun getItemCount(): Int = items.size
+
+ class OverallViewHolder(private val binding: ItemOverallScoreBinding) :
+ RecyclerView.ViewHolder(binding.root) {
+
+ fun bind(item: ScoreItem.OverallScore) {
+ binding.tvOsa.text = "OSA: ${item.osa}"
+ binding.tvMsl.text = "MSL: ${item.msl}"
+ binding.tvPosm.text = "POSM: ${item.posm}"
+ binding.tvSosSku.text = "SOS (SKU): ${item.sosSku}"
+ binding.tvSosBrand.text = "SOS (Brand): ${item.sosBrand}"
+ }
+ }
+
+ class CategoryViewHolder(private val binding: ItemCategoryScoreBinding) :
+ RecyclerView.ViewHolder(binding.root) {
+
+ fun bind(item: ScoreItem.CategoryScore) {
+ binding.tvCategory.text = item.categoryName
+ binding.tvMsl.text = "MSL: ${item.msl}"
+ binding.tvPosm.text = "POSM: ${item.posm}"
+ binding.tvSosSku.text = "SOS (SKU): ${item.sosSku}"
+ binding.tvSosBrand.text = "SOS (Brand): ${item.sosBrand}"
+
+ binding.layoutBrands.removeAllViews()
+ for (brand in item.brandDetails) {
+ val tv = TextView(binding.root.context)
+ tv.text = "${brand.first}: ${brand.second}"
+ binding.layoutBrands.addView(tv)
+ }
+ }
+ }
+
+ class ImageViewHolder(private val binding: ItemPdImageBinding) :
+ RecyclerView.ViewHolder(binding.root) {
+
+ fun bind(item: ScoreItem.ImageItem) {
+ Log.d("itemuri",item.url)
+ /* binding.btnViewImage.setOnClickListener {
+ val context = binding.root.context
+ val intent = Intent(context, WebViewActivity::class.java)
+ intent.putExtra("url", item.url)
+ context.startActivity(intent)
+ }*/
+ val actualUrl = if (item.url.contains("?url=")) {
+ item.url.substringAfter("?url=") // extract the real image link
+ } else item.url
+
+ Glide.with(binding.ivRawImage.context)
+ .load(actualUrl)
+ //.placeholder(R.drawable.ic_placeholder) // optional
+ // .error(R.drawable.ic_broken_image) // fallback if fail
+ .into(binding.ivRawImage)
+ }
+ }
+}
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/constant/CommonFunctions.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/constant/CommonFunctions.java
index 1c84ffa..41d8325 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/constant/CommonFunctions.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/constant/CommonFunctions.java
@@ -210,4 +210,5 @@ public class CommonFunctions {
}
}
}
+
}
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/constant/CommonString.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/constant/CommonString.java
index 258367f..60f3a62 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/constant/CommonString.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/constant/CommonString.java
@@ -151,16 +151,14 @@ public class CommonString {
public static final int UNIT_VERTICAL = 50;
public static final int UNIT_HORIZONTAL = 200;
- // public static String URL = "http://gskme.parinaam.in/Gskwebservice.asmx";
- public static String URL = "http://gskmeIR.parinaam.in/Gskwebservice.asmx";
- // public static String URL = "https://gskme1.parinaam.in/Gskwebservice.asmx";
+ // public static String URL = "http://gskme.parinaam.in/Gskwebservice.asmx";
+ // public static String URL = "http://gskmeIR.parinaam.in/Gskwebservice.asmx";
+ // public static String URL = "https://gskme2.parinaam.in/Gskwebservice.asmx";
//Added new Test url for Turkey
// public static String URL = "http://gskmetest.parinaam.in/Gskwebservice.asmx";
- // public static String URL = "https://haleonme.parinaam.in/Gskwebservice.asmx";
- //public static String URL = " https://gskme1.parinaam.in/Gskwebservice.asmx";
- //public static String URL = "https://gskme-test.parinaam.in/Gskwebservice.asmx";
-
+ public static String URL = "https://haleonme.parinaam.in/Gskwebservice.asmx";
+ // public static String URL = "https://gskme2.parinaam.in/Gskwebservice.asmx";
public static final String NAMESPACE = "http://tempuri.org/";
public static final String METHOD_LOGIN = "UserLoginDetail";
public static final String SOAP_ACTION_LOGIN = "http://tempuri.org/"
@@ -1138,6 +1136,12 @@ public class CommonString {
+ "QTYPE"
+ " VARCHAR,"
+ + "SUB_CATEGORY"
+ + " VARCHAR,"
+
+ + "ANSWER"
+ + " VARCHAR,"
+
+ "ANSWER_ID"
+ " INTEGER,"
@@ -1574,6 +1578,30 @@ public class CommonString {
+ KEY_IRPD_IMAGES
+ " VARCHAR)";
+
+ public static final String TABLE_IRPD_POG = "DR_IRPD_POG";
+ public static final String CREATE_TABLE_IRPD_POG = "CREATE TABLE IF NOT EXISTS "
+ + TABLE_IRPD_POG
+ + " ("
+ + "KEY_ID"
+ + " INTEGER PRIMARY KEY AUTOINCREMENT ,"
+ + KEY_STORE_ID
+ + " INTEGER,"
+ + KEY_VISIT_DATE
+ + " VARCHAR,"
+ + KEY_SAVE_MODE
+ + " VARCHAR,"
+ + KEY_CATEGORY_ID
+ + " INTEGER,"
+ + KEY_SUB_CATEGORY_ID
+ + " INTEGER,"
+ + KEY_SUB_CATEGORY_CODE
+ + " VARCHAR,"
+ + KEY_IRPD_MODIFY_IMAGES
+ + " VARCHAR,"
+ + KEY_IRPD_IMAGES
+ + " VARCHAR)";
+
public static final String KEY_IRPD_VISIBILITY_IMAGES = "IRPD_VISIBILITY_IMAGES";
public static final String KEY_IRPD_VISIBILITY_MODIFY_IMAGES = "IRPD_VISIBILITY_IMAGES_MODIFY";
public static final String TABLE_IRPD_VISIBILITY = "DR_IRPD_VISIBILITY";
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/AdditionalVisibility.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/AdditionalVisibility.java
index 70c330f..9e93b0a 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/AdditionalVisibility.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/AdditionalVisibility.java
@@ -235,7 +235,6 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
img_planogram.setEnabled(false);
}
}
-
@Override
public void onNothingSelected(AdapterView> parent) {
@@ -694,7 +693,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
defdata.clear();
btnsku.setBackgroundResource(R.color.colorPrimary);
if (camera_allow.equals("1")) {
- btnimage.setBackgroundResource(country_id.equals("6") ? R.mipmap.camera_orange : R.drawable.camera_orange_star_green);
+ btnimage.setBackgroundResource(country_id.equals("6") ? R.mipmap.camera_orange_star_green : R.mipmap.camera_orange);
btnimage1.setBackgroundResource(R.mipmap.camera_orange);
btnimage2.setBackgroundResource(R.mipmap.camera_orange);
} else {
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/CategoryPicture.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/CategoryPicture.java
index 55b4eff..69292d7 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/CategoryPicture.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/CategoryPicture.java
@@ -167,68 +167,32 @@ public class CategoryPicture extends AppCompatActivity {
db.InsertCategoryPictureData(CP, listdat, categoryId);
finish();
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
-
- /* AlertDialog.Builder builder = new AlertDialog.Builder(CategoryPicture.this);
- builder.setMessage(getResources().getString(R.string.check_save_message))
- .setCancelable(false)
- .setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- db.open();
-
- db.InsertCategoryPictureData(CP, listdat, categoryId);
- finish();
- overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
- }
- })
- .setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- dialog.cancel();
- }
- });
- AlertDialog alert = builder.create();
- alert.show();*/
-
-
} else {
Snackbar.make(view, R.string.title_activity_take_image, Snackbar.LENGTH_LONG).setAction("Action", null).show();
-
-
}
-
-
});
im1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
-
-
_pathforcheck1 = store_id + "CategoryPicture1" + categoryId + date.replace("/", "") + CommonFunctions.getCurrentTimeWithLanguage(context).replace(":", "") + ".jpg";
-
_path = CommonString.getImagesFolder(context) + _pathforcheck1;
intime = CommonFunctions.getCurrentTimeWithLanguage(context);
startCameraActivity();
-
}
});
im2.setOnClickListener(view -> {
-
_pathforcheck2 = store_id + "CategoryPicture2" + categoryId + date.replace("/", "") + CommonFunctions.getCurrentTimeWithLanguage(context).replace(":", "") + ".jpg";
-
_path = CommonString.getImagesFolder(context) + _pathforcheck2;
intime = CommonFunctions.getCurrentTimeWithLanguage(context);
startCameraActivity();
});
im3.setOnClickListener(view -> {
-
_pathforcheck3 = store_id + "CategoryPicture3" + categoryId + date.replace("/", "") + CommonFunctions.getCurrentTimeWithLanguage(context).replace(":", "") + ".jpg";
-
_path = CommonString.getImagesFolder(context) + _pathforcheck3;
intime = CommonFunctions.getCurrentTimeWithLanguage(context);
startCameraActivity();
-
-
});
im4.setOnClickListener(view -> {
@@ -237,8 +201,6 @@ public class CategoryPicture extends AppCompatActivity {
_path = CommonString.getImagesFolder(context) + _pathforcheck4;
intime = CommonFunctions.getCurrentTimeWithLanguage(context);
startCameraActivity();
-
-
});
}
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/CheckoutActivity.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/CheckoutActivity.java
index c405b67..f6adbc7 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/CheckoutActivity.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/CheckoutActivity.java
@@ -63,6 +63,7 @@ public class CheckoutActivity extends AppCompatActivity {
lat = getIntent().getStringExtra(CommonString.KEY_LATITUDE);
lon = getIntent().getStringExtra(CommonString.KEY_LONGITUDE);
coverageBean = db.getCoverageSpecificData(visit_date, store_id);
+
new BackgroundTask(CheckoutActivity.this).execute();
}
@@ -167,7 +168,6 @@ public class CheckoutActivity extends AppCompatActivity {
table = CommonString.KEY_ADHOC_JOURNEY_PLAN;
break;
}
-
db.updateCheckoutStatus(store_id, CommonString.KEY_Y, table);
} else {
if (result.toString().equalsIgnoreCase(CommonString.KEY_FALSE)) {
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PDVisibilityActivity.kt b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PDVisibilityActivity.kt
index 57fb3d2..95dff6a 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PDVisibilityActivity.kt
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PDVisibilityActivity.kt
@@ -1,22 +1,19 @@
package cpm.com.gskmtorange.dailyentry
-import android.Manifest
import android.content.BroadcastReceiver
import android.content.Context
-import android.content.DialogInterface
import android.content.Intent
import android.content.IntentFilter
import android.content.SharedPreferences
-import android.content.pm.PackageManager
-import android.os.Build
+import android.net.ConnectivityManager
+import android.net.NetworkCapabilities
import android.os.Bundle
import android.preference.PreferenceManager
import android.util.Log
import android.view.MenuItem
+import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
-import androidx.core.app.ActivityCompat
-import androidx.core.content.ContextCompat
import androidx.core.net.toUri
import androidx.lifecycle.lifecycleScope
import androidx.localbroadcastmanager.content.LocalBroadcastManager
@@ -35,7 +32,6 @@ import cpm.com.gskmtorange.constant.CommonFunctions
import cpm.com.gskmtorange.constant.CommonFunctions.savefile
import cpm.com.gskmtorange.constant.CommonString
import cpm.com.gskmtorange.constant.CommonUtils
-import cpm.com.gskmtorange.databinding.ActivityPdimageBinding
import cpm.com.gskmtorange.databinding.ActivityPdvisibilityBinding
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
@@ -47,6 +43,7 @@ class PDVisibilityActivity : AppCompatActivity() {
var categoryName: String? = null
var categoryId: String? = null
var store_id: String? = null;
+ var lang: String? = null;
var date: String? = null;
var store_type_id: String? = null
var class_id: String? = null
@@ -62,6 +59,8 @@ class PDVisibilityActivity : AppCompatActivity() {
private var adapter: SubCatPdAdapter? = null
val PERMISSION_ALL: Int = 99
private var _pos = -1;
+ var devicename : String? = ""
+ var store_name : String? = ""
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -73,7 +72,9 @@ class PDVisibilityActivity : AppCompatActivity() {
preferences = PreferenceManager.getDefaultSharedPreferences(context)
db?.open()
preferences?.let {
+ lang = it.getString(CommonString.KEY_LANGUAGE, "")
store_id = it.getString(CommonString.KEY_STORE_ID, "")
+ store_name = it.getString(CommonString.KEY_STORE_NAME, "")
username = it.getString(CommonString.KEY_USERNAME, "")
store_type_id = it.getString(CommonString.KEY_STORETYPE_ID, "")
class_id = it.getString(CommonString.KEY_CLASS_ID, "")
@@ -81,7 +82,9 @@ class PDVisibilityActivity : AppCompatActivity() {
country_id = it.getString(CommonString.KEY_COUNTRY_ID, "")
store_flag_str = it.getString(CommonString.KEY_STORE_FLAG, "")
date = it.getString(CommonString.KEY_DATE, "")
+ //Log.d("languagedata", lang.toString());
}
+ devicename = android.os.Build.MANUFACTURER
CommonFunctions.updateLangResources(
context, preferences?.getString(CommonString.KEY_LANGUAGE, "")
@@ -158,7 +161,7 @@ class PDVisibilityActivity : AppCompatActivity() {
}
callAdapter()
- checkAndRequestPermissions()
+ // checkAndRequestPermissions()
}
override fun onResume() {
@@ -196,7 +199,6 @@ class PDVisibilityActivity : AppCompatActivity() {
if (id == R.id.action_settings) {
return true
}
-
return super.onOptionsItemSelected(item)
}
@@ -255,12 +257,15 @@ class PDVisibilityActivity : AppCompatActivity() {
}
}
- private fun launchCamera(subCat_code: String) {
+ private fun launchCamera(subCat_code: String, subCategory: String, subCategoryId: String) {
val uploadFrom = "TestApp"
+ var shelftype = "posm_$subCategory" +"_"+subCategoryId
+ shelftype = shelftype.lowercase().replace("[^a-z0-9_]".toRegex(), "")
val uploadParams = JSONObject(
"""
{
"shop_id": 62475,
+ "store_name": "abc",
"project_id": "4f57635b-6b07-45bf-bfba-c61c2826b6db",
"td_version_id": 178,
"shelf_image_id": null,
@@ -275,32 +280,56 @@ class PDVisibilityActivity : AppCompatActivity() {
"level": 1,
"uploadOnlyOnWifi": 0,
"app_session_id": "8e2faa6b-d6fe-413a-a693-76a0cbe0ce71",
- "metadata": { "Device_Name": "Samsung" }
+ "metadata": { "Device_Name": $devicename,"User_name": $username }
}
"""
)
+ uploadParams.put("shelf_type", shelftype)
+ uploadParams.put("store_name", store_name)
uploadParams.put("shop_id", store_id)
uploadParams.put("user_id", username)
uploadParams.put("category_id", subCat_code)
uploadParams.put("project_id", preferences?.getString(CommonString.KEY_PD_PROJECT_Id, ""))
+ Log.d("uploadparams",uploadParams.toString());
- CameraSDK.startCamera(
- context = this,
- orientation = "",
- widthPercentage = 20,
- uploadParams = uploadParams,
- resolution = 3000,
- referenceUrl = "",
- allowBlurCheck = true,
- allowCrop = true,
- uploadFrom = uploadFrom,
- isRetake = false,
- showOverlapToggleButton = false,
- showGridLines = true,
- zoomLevel = 1.0,
- language_code = "en",
- isLambda = false
- )
+ if(!lang.equals("ENGLISH",ignoreCase = true)){
+ CameraSDK.startCamera(
+ context = this,
+ orientation = "",
+ widthPercentage = 20,
+ uploadParams = uploadParams,
+ resolution = 3000,
+ referenceUrl = "",
+ allowBlurCheck = true,
+ allowCrop = true,
+ uploadFrom = uploadFrom,
+ isRetake = false,
+ showOverlapToggleButton = false,
+ showGridLines = true,
+ zoomLevel = 1.0,
+ language_code = "ar",
+ isLambda = false
+ )
+ }
+ else{
+ CameraSDK.startCamera(
+ context = this,
+ orientation = "",
+ widthPercentage = 20,
+ uploadParams = uploadParams,
+ resolution = 3000,
+ referenceUrl = "",
+ allowBlurCheck = true,
+ allowCrop = true,
+ uploadFrom = uploadFrom,
+ isRetake = false,
+ showOverlapToggleButton = false,
+ showGridLines = true,
+ zoomLevel = 1.0,
+ language_code = "en",
+ isLambda = false
+ )
+ }
}
private fun callAdapter() {
@@ -315,9 +344,13 @@ class PDVisibilityActivity : AppCompatActivity() {
btnlistener = object : SubCatPdAdapter.BtnClickListener {
override fun onStartSessionClick(_pos: Int, data: CategoryPictureGetterSetter) {
this@PDVisibilityActivity._pos = _pos
- launchCamera(data.subCatCode)
- Log.d("subCatCode", data.subCatCode)
-
+ /* if (isNetworkAvailable(this@PDVisibilityActivity)) {
+ launchCamera(data.subCatCode,data.suB_CATEGORY,data.suB_CATEGORY_ID)
+ Log.d("subCatCode", data.subCatCode)
+ } else {
+ Toast.makeText(context, "No internet connection", Toast.LENGTH_SHORT).show()
+ }*/
+ launchCamera(data.subCatCode,data.suB_CATEGORY,data.suB_CATEGORY_ID)
}
})
binding.rlContent.apply {
@@ -333,98 +366,18 @@ class PDVisibilityActivity : AppCompatActivity() {
db?.InsertPdImageVisibilityData(date, store_id, categoryId, listdat, CommonString.KEY_DRAFT)
}
}
+ fun isNetworkAvailable(context: Context): Boolean {
+ val connectivityManager =
+ context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
- private fun checkAndRequestPermissions() {
- var read_phone_state = 0
- var write_storage = 0
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
- write_storage =
- ContextCompat.checkSelfPermission(this, Manifest.permission.READ_MEDIA_IMAGES)
- } else {
- read_phone_state =
- ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE)
- write_storage =
- ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)
+ val network = connectivityManager.activeNetwork ?: return false
+ val activeNetwork = connectivityManager.getNetworkCapabilities(network) ?: return false
+
+ return when {
+ activeNetwork.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) -> true
+ activeNetwork.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) -> true
+ activeNetwork.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET) -> true
+ else -> false
}
-
- val listPermissionsNeeded: MutableList = java.util.ArrayList()
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
- if (write_storage != PackageManager.PERMISSION_GRANTED) {
- listPermissionsNeeded.add(Manifest.permission.READ_MEDIA_IMAGES)
- }
- } else {
- if (write_storage != PackageManager.PERMISSION_GRANTED) {
- listPermissionsNeeded.add(Manifest.permission.WRITE_EXTERNAL_STORAGE)
- }
- }
-
- if (listPermissionsNeeded.isNotEmpty()) {
- ActivityCompat.requestPermissions(
- this,
- listPermissionsNeeded.toTypedArray(),
- PERMISSION_ALL
- )
- }
- }
-
- override fun onRequestPermissionsResult(
- requestCode: Int,
- permissions: Array,
- grantResults: IntArray
- ) {
- super.onRequestPermissionsResult(requestCode, permissions, grantResults)
- if (requestCode == PERMISSION_ALL) {
- val perms: MutableMap = HashMap()
- // Initialize the map with both permissions
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
- perms[Manifest.permission.READ_MEDIA_IMAGES] = PackageManager.PERMISSION_GRANTED
- } else {
- perms[Manifest.permission.WRITE_EXTERNAL_STORAGE] =
- PackageManager.PERMISSION_GRANTED
- }
- // Fill with actual results from user
- if (grantResults.isNotEmpty()) {
- for (i in permissions.indices) perms[permissions[i]] = grantResults[i]
- // Check for both permissions//
- if (perms[Manifest.permission.READ_MEDIA_IMAGES] == PackageManager.PERMISSION_GRANTED &&
- perms[Manifest.permission.WRITE_EXTERNAL_STORAGE] == PackageManager.PERMISSION_GRANTED
- ) {
- Log.d("", "sms & location services permission granted")
- } else {
- Log.d("", "Some permissions are not granted ask again ")
- if (ActivityCompat.shouldShowRequestPermissionRationale(
- this,
- Manifest.permission.READ_MEDIA_IMAGES
- ) ||
- ActivityCompat.shouldShowRequestPermissionRationale(
- this,
- Manifest.permission.WRITE_EXTERNAL_STORAGE
- )
- ) {
- showDialogOK(
- "Photos or media Service Permission required for this app"
- ) { _: DialogInterface?, which: Int ->
- when (which) {
- DialogInterface.BUTTON_POSITIVE -> checkAndRequestPermissions()
- DialogInterface.BUTTON_NEGATIVE -> {
- // proceed with logic by disabling the related features or quit the app.
- val startMain =
- Intent(Intent.ACTION_MAIN)
- startMain.addCategory(Intent.CATEGORY_HOME)
- startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
- startActivity(startMain)
- }
- }
- }
- }
- }
- }
- }
- }
-
- private fun showDialogOK(message: String, okListener: DialogInterface.OnClickListener) {
- AlertDialog.Builder(this).setMessage(message).setPositiveButton("OK", okListener)
- .setNegativeButton("Cancel", okListener).create().show()
}
}
\ No newline at end of file
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PD_Pog_Activity.kt b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PD_Pog_Activity.kt
new file mode 100644
index 0000000..4eee0bc
--- /dev/null
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PD_Pog_Activity.kt
@@ -0,0 +1,465 @@
+package cpm.com.gskmtorange.dailyentry
+
+import android.Manifest
+import android.content.BroadcastReceiver
+import android.content.Context
+import android.content.DialogInterface
+import android.content.Intent
+import android.content.IntentFilter
+import android.content.SharedPreferences
+import android.content.pm.PackageManager
+import android.os.Build
+import android.os.Bundle
+import android.preference.PreferenceManager
+import android.util.Log
+import android.view.MenuItem
+import androidx.appcompat.app.AlertDialog
+import androidx.appcompat.app.AppCompatActivity
+import androidx.core.app.ActivityCompat
+import androidx.core.content.ContextCompat
+import androidx.core.net.toUri
+import androidx.lifecycle.lifecycleScope
+import androidx.localbroadcastmanager.content.LocalBroadcastManager
+import androidx.recyclerview.widget.LinearLayoutManager
+import com.google.android.material.snackbar.Snackbar
+import com.sj.camera_lib_android.Database.ReactPendingData
+import com.sj.camera_lib_android.Database.ReactSingleImage
+import com.sj.camera_lib_android.models.ImageUploadModel
+import com.sj.camera_lib_android.utils.CameraSDK
+import cpm.com.gskmtorange.Database.GSKOrangeDB
+import cpm.com.gskmtorange.GetterSetter.CategoryPictureGetterSetter
+import cpm.com.gskmtorange.R
+import cpm.com.gskmtorange.adapter.SubCatPdAdapter
+import cpm.com.gskmtorange.adapter.data.ImageUri
+import cpm.com.gskmtorange.constant.CommonFunctions
+import cpm.com.gskmtorange.constant.CommonFunctions.savefile
+import cpm.com.gskmtorange.constant.CommonString
+import cpm.com.gskmtorange.constant.CommonUtils
+import cpm.com.gskmtorange.databinding.ActivityPdPogBinding
+import cpm.com.gskmtorange.databinding.ActivityPdimageBinding
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.launch
+import org.json.JSONObject
+import java.io.File
+
+class PD_Pog_Activity : AppCompatActivity() {
+ private var context: Context? = null
+ var categoryName: String? = null
+ var categoryId: String? = null
+ var store_id: String? = null;
+ var date: String? = null;
+ var store_type_id: String? = null
+ var class_id: String? = null
+ var key_account_id: String? = null
+ var country_id: String? = null
+ var store_flag_str: String? = null
+ private var preferences: SharedPreferences? = null
+ var db: GSKOrangeDB? = null
+ var listdat: ArrayList? = ArrayList()
+ var username: String? = ""
+ private var kpi_name: String? = ""
+ private lateinit var binding: ActivityPdPogBinding
+ private var adapter: SubCatPdAdapter? = null
+ val PERMISSION_ALL: Int = 99
+ private var _pos = -1;
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = ActivityPdPogBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+ setSupportActionBar(binding.toolbar)
+ context = this
+
+ db = GSKOrangeDB(context)
+ preferences = PreferenceManager.getDefaultSharedPreferences(context)
+ db?.open()
+ preferences?.let {
+ store_id = it.getString(CommonString.KEY_STORE_ID, "")
+ username = it.getString(CommonString.KEY_USERNAME, "")
+ store_type_id = it.getString(CommonString.KEY_STORETYPE_ID, "")
+ class_id = it.getString(CommonString.KEY_CLASS_ID, "")
+ key_account_id = it.getString(CommonString.KEY_KEYACCOUNT_ID, "")
+ country_id = it.getString(CommonString.KEY_COUNTRY_ID, "")
+ store_flag_str = it.getString(CommonString.KEY_STORE_FLAG, "")
+ date = it.getString(CommonString.KEY_DATE, "")
+ }
+
+ CommonFunctions.updateLangResources(
+ context, preferences?.getString(CommonString.KEY_LANGUAGE, "")
+ )
+ intent?.let {
+ categoryName = it.getStringExtra("categoryName")
+ categoryId = it.getStringExtra("categoryId")
+ kpi_name = it.getStringExtra("kpi_name")
+ }
+ supportActionBar?.apply {
+ setHomeButtonEnabled(true)
+ setDisplayHomeAsUpEnabled(true)
+ title = kpi_name
+ }
+ preferences?.getString(CommonString.KEY_PD_PROJECT_Id, "")?.let { projectId ->
+ val userId = preferences?.getString(CommonString.KEY_PD_USER_Id, "")
+ .takeIf { !it.isNullOrBlank() } ?: username
+ Log.d("pd_user_id",userId.toString());
+
+ CommonUtils.initializePDSDK(
+ this@PD_Pog_Activity,
+ projectId = projectId,
+ _userId = userId
+ )
+ }
+
+ registerIntentFilter(
+ listOf(
+ "DataSaved", "did-receive-queue-data", "did-receive-image-upload-status"
+ )
+ )
+
+ binding.apply {
+ fab.setOnClickListener {
+ if (validate()) {
+ val builder = AlertDialog.Builder(this@PD_Pog_Activity)
+ builder.setMessage(getString(R.string.check_save_message)).setCancelable(false)
+ .setPositiveButton(getString(R.string.yes)) { dialog, _ ->
+ // Handle Yes button click
+ db?.open()
+ db?.InsertPdPogImageData(
+ date,
+ store_id,
+ categoryId,
+ listdat,
+ CommonString.KEY_COMPELETE
+ )?.let {
+ if (it > 0) {
+ Snackbar.make(
+ binding.fab,
+ resources.getString(R.string.save_message),
+ Snackbar.LENGTH_LONG
+ ).setAction("Action", null).show()
+ lifecycleScope.launch {
+ delay(3000) // 3 seconds delay
+ finish()
+ }
+ } else {
+ Snackbar.make(
+ binding.fab,
+ resources.getString(R.string.save_message),
+ Snackbar.LENGTH_LONG
+ ).setAction("Action", null).show()
+ }
+ }
+ dialog.dismiss()
+ }.setNegativeButton(getString(R.string.no)) { dialog, _ ->
+ dialog.cancel()
+ }
+ val alert = builder.create()
+ alert.show()
+ }
+ }
+ }
+
+ callAdapter()
+ checkAndRequestPermissions()
+ }
+
+ override fun onResume() {
+ super.onResume()
+ db?.open()
+ }
+
+ private fun validate(): Boolean {
+ var checkFlag = true // Use local variable to avoid issues
+ if (!listdat.isNullOrEmpty()) {
+ for (data in listdat!!) { // Use standard loop for better control
+ if (data.imageUris.isNullOrEmpty()) {
+ checkFlag = false // Set false if validation fails
+ Snackbar.make(
+ binding.fab,
+ "Please capture IR images of ${data.suB_CATEGORY}",
+ Snackbar.LENGTH_SHORT
+ ).show()
+ break // Stop further checks once an issue is found
+ }
+ }
+ }
+ return checkFlag // Correctly return validation result
+ }
+
+
+ override fun onOptionsItemSelected(item: MenuItem): Boolean {
+ // as you specify a parent activity in AndroidManifest.xml.
+ val id = item.itemId
+ if (id == android.R.id.home) {
+ //showDataLossAlert();
+ overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out)
+ finish()
+ }
+ if (id == R.id.action_settings) {
+ return true
+ }
+
+ return super.onOptionsItemSelected(item)
+ }
+
+ override fun onDestroy() {
+ super.onDestroy()
+ LocalBroadcastManager.getInstance(this@PD_Pog_Activity)
+ .unregisterReceiver(myBroadcastReceiver) // onDestroy
+ }
+
+ private fun registerIntentFilter(filters: List = listOf()) {
+ filters.forEach { filter ->
+ LocalBroadcastManager.getInstance(this@PD_Pog_Activity)
+ .registerReceiver(myBroadcastReceiver, IntentFilter(filter))
+ }
+ }
+
+ private val savedImages = mutableListOf()
+ private var myBroadcastReceiver: BroadcastReceiver = object : BroadcastReceiver() {
+ override fun onReceive(context: Context?, intent: Intent?) {
+ when (intent?.action) {
+ "did-receive-queue-data" -> {
+ val receivedList =
+ intent.getParcelableArrayListExtra("imageList")
+ Log.d("DEBUG-LOG did-receive-queue-data", "$receivedList")
+ if (receivedList.isNullOrEmpty()) {
+ CameraSDK.uploadFailedImage(this@PD_Pog_Activity)
+ }
+ }
+
+ "did-receive-image-upload-status" -> {
+ val receivedImage = intent.getParcelableExtra("image")
+ Log.d("DEBUG-LOG did-receive-image-upload-status", "$receivedImage")
+ }
+
+ "DataSaved" -> {
+ val receivedList =
+ intent.getParcelableArrayListExtra("imageListSaved")
+ Log.d("DEBUG-LOG DataSaved", "$receivedList")
+ receivedList?.let {
+ savedImages.clear()
+ it.forEach { item ->
+ val dir = CommonString.getImagesFolder(context)
+ val setName =
+ store_id + "_" + username?.replace(".", "") + "_IRPDIMG-" + File(
+ item.uri
+ ).getName()
+ savedImages.add(ImageUri(uri = item.uri, modify_uri = setName))
+ savefile(item.uri.toUri(), "$dir $setName")
+ }
+ adapter?.updateItem(position = _pos, savedImages)
+ Log.e("savedImages", savedImages.toString())
+ _pos = -1
+ }
+ }
+ }
+ }
+ }
+
+ private fun launchCamera(subCat_code: String) {
+ val uploadFrom = "TestApp"
+ val uploadParams = JSONObject(
+ """
+ {
+ "shop_id": 62475,
+ "project_id": "4f57635b-6b07-45bf-bfba-c61c2826b6db",
+ "td_version_id": 178,
+ "shelf_image_id": null,
+ "asset_image_id": null,
+ "shelf_type": "Primary Shelf",
+ "category_id": 123,
+ "user_id": 133,
+ "isConnected": true,
+ "sn_image_type": "skus",
+ "image_type": "multiple",
+ "seq_no": 1,
+ "level": 1,
+ "uploadOnlyOnWifi": 0,
+ "app_session_id": "8e2faa6b-d6fe-413a-a693-76a0cbe0ce71",
+ "metadata": { "Device_Name": "Samsung" }
+ }
+ """
+ )
+ uploadParams.put("shop_id", store_id)
+ uploadParams.put("user_id", username)
+ uploadParams.put("category_id", subCat_code)
+ uploadParams.put("project_id", preferences?.getString(CommonString.KEY_PD_PROJECT_Id, ""))
+ Log.d("uploadparamdata",uploadParams.toString());
+
+ CameraSDK.startCamera(
+ context = this,
+ orientation = "",
+ widthPercentage = 20,
+ uploadParams = uploadParams,
+ resolution = 3000,
+ referenceUrl = "",
+ allowBlurCheck = true,
+ allowCrop = true,
+ uploadFrom = uploadFrom,
+ isRetake = false,
+ showOverlapToggleButton = false,
+ showGridLines = true,
+ zoomLevel = 1.0,
+ language_code = "en",
+ isLambda = false
+ )
+ }
+
+ private fun callAdapter() {
+ if (country_id == "8") {
+ db?.open()
+ listdat = db?.getCategoryPicturePogdata(
+ date,
+ categoryId,
+ null,
+ null,
+ null,
+ store_id,
+ CommonString.TABLE_MAPPING_STOCK_STOREWISE
+ )
+ } else if (store_flag_str.equals(CommonString.FROM_DEVIATION, ignoreCase = true)) {
+ db?.open()
+ listdat = db?.getCategoryPicturePogdata(
+ date,
+ categoryId,
+ key_account_id,
+ store_type_id,
+ class_id,
+ store_id,
+ CommonString.TABLE_MAPPING_STOCK_ADHOC
+ )
+ } else {
+ db?.open()
+ listdat = db?.getCategoryPicturePogdata(
+ date,
+ categoryId,
+ key_account_id,
+ store_type_id,
+ class_id,
+ store_id,
+ CommonString.TABLE_MAPPING_STOCK
+ )
+ }
+
+ Log.d("listdatsize", listdat?.size.toString())
+ adapter = SubCatPdAdapter(
+ category = categoryName,
+ context = this,
+ subcates = ArrayList(),
+ btnlistener = object : SubCatPdAdapter.BtnClickListener {
+ override fun onStartSessionClick(_pos: Int, data: CategoryPictureGetterSetter) {
+ this@PD_Pog_Activity._pos = _pos
+ launchCamera(data.subCatCode)
+ Log.d("subCatCode", data.subCatCode)
+ }
+ })
+ binding.rlContent.apply {
+ recyclerViewSubCat.adapter = adapter
+ recyclerViewSubCat.layoutManager = LinearLayoutManager(this@PD_Pog_Activity)
+ adapter?.addsubCatItems(listdat)
+ }
+ }
+
+ override fun onPause() {
+ super.onPause()
+ db?.open()
+ if (!db!!.isSOSPogCategory(store_id, date, CommonString.KEY_COMPELETE, categoryId)) {
+ db?.InsertPdPogImageData(date, store_id, categoryId, listdat, CommonString.KEY_DRAFT)
+ }
+ }
+
+ private fun checkAndRequestPermissions() {
+ var read_phone_state = 0
+ var write_storage = 0
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+ write_storage =
+ ContextCompat.checkSelfPermission(this, Manifest.permission.READ_MEDIA_IMAGES)
+ } else {
+ read_phone_state =
+ ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE)
+ write_storage =
+ ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)
+ }
+
+ val listPermissionsNeeded: MutableList = java.util.ArrayList()
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+ if (write_storage != PackageManager.PERMISSION_GRANTED) {
+ listPermissionsNeeded.add(Manifest.permission.READ_MEDIA_IMAGES)
+ }
+ } else {
+ if (write_storage != PackageManager.PERMISSION_GRANTED) {
+ listPermissionsNeeded.add(Manifest.permission.WRITE_EXTERNAL_STORAGE)
+ }
+ }
+
+ if (listPermissionsNeeded.isNotEmpty()) {
+ ActivityCompat.requestPermissions(
+ this,
+ listPermissionsNeeded.toTypedArray(),
+ PERMISSION_ALL
+ )
+ }
+ }
+
+
+ override fun onRequestPermissionsResult(
+ requestCode: Int,
+ permissions: Array,
+ grantResults: IntArray
+ ) {
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults)
+ if (requestCode == PERMISSION_ALL) {
+ val perms: MutableMap = HashMap()
+ // Initialize the map with both permissions
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+ perms[Manifest.permission.READ_MEDIA_IMAGES] = PackageManager.PERMISSION_GRANTED
+ } else {
+ perms[Manifest.permission.WRITE_EXTERNAL_STORAGE] =
+ PackageManager.PERMISSION_GRANTED
+ }
+ // Fill with actual results from user
+ if (grantResults.isNotEmpty()) {
+ for (i in permissions.indices) perms[permissions[i]] = grantResults[i]
+ // Check for both permissions//
+ if (perms[Manifest.permission.READ_MEDIA_IMAGES] == PackageManager.PERMISSION_GRANTED &&
+ perms[Manifest.permission.WRITE_EXTERNAL_STORAGE] == PackageManager.PERMISSION_GRANTED
+ ) {
+ Log.d("", "sms & location services permission granted")
+ } else {
+ Log.d("", "Some permissions are not granted ask again ")
+ if (ActivityCompat.shouldShowRequestPermissionRationale(
+ this,
+ Manifest.permission.READ_MEDIA_IMAGES
+ ) ||
+ ActivityCompat.shouldShowRequestPermissionRationale(
+ this,
+ Manifest.permission.WRITE_EXTERNAL_STORAGE
+ )
+ ) {
+ showDialogOK(
+ "Photos or media Service Permission required for this app"
+ ) { _: DialogInterface?, which: Int ->
+ when (which) {
+ DialogInterface.BUTTON_POSITIVE -> checkAndRequestPermissions()
+ DialogInterface.BUTTON_NEGATIVE -> {
+ // proceed with logic by disabling the related features or quit the app.
+ val startMain =
+ Intent(Intent.ACTION_MAIN)
+ startMain.addCategory(Intent.CATEGORY_HOME)
+ startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+ startActivity(startMain)
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private fun showDialogOK(message: String, okListener: DialogInterface.OnClickListener) {
+ AlertDialog.Builder(this).setMessage(message).setPositiveButton("OK", okListener)
+ .setNegativeButton("Cancel", okListener).create().show()
+ }
+}
\ No newline at end of file
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PD_Realtime_Report.kt b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PD_Realtime_Report.kt
new file mode 100644
index 0000000..76b739f
--- /dev/null
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PD_Realtime_Report.kt
@@ -0,0 +1,331 @@
+package cpm.com.gskmtorange.dailyentry
+
+import android.Manifest
+import android.content.BroadcastReceiver
+import android.content.Context
+import android.content.Intent
+import android.content.IntentFilter
+import android.content.SharedPreferences
+import android.content.pm.PackageManager
+import android.os.Build
+import android.os.Bundle
+import android.preference.PreferenceManager
+import android.util.Log
+import android.view.MenuItem
+import androidx.activity.enableEdgeToEdge
+import androidx.appcompat.app.AlertDialog
+import androidx.appcompat.app.AppCompatActivity
+import androidx.core.app.ActivityCompat
+import androidx.core.content.ContextCompat
+import androidx.core.net.toUri
+import androidx.core.view.ViewCompat
+import androidx.core.view.WindowInsetsCompat
+import androidx.lifecycle.lifecycleScope
+import androidx.localbroadcastmanager.content.LocalBroadcastManager
+import androidx.recyclerview.widget.LinearLayoutManager
+import com.google.android.material.snackbar.Snackbar
+import com.sj.camera_lib_android.Database.ReactPendingData
+import com.sj.camera_lib_android.Database.ReactSingleImage
+import com.sj.camera_lib_android.models.ImageUploadModel
+import com.sj.camera_lib_android.utils.CameraSDK
+import cpm.com.gskmtorange.Database.GSKOrangeDB
+import cpm.com.gskmtorange.GetterSetter.CategoryPictureGetterSetter
+import cpm.com.gskmtorange.R
+import cpm.com.gskmtorange.adapter.RealtimeAdapter
+import cpm.com.gskmtorange.adapter.SubCatPdAdapter
+import cpm.com.gskmtorange.adapter.data.ImageUri
+import cpm.com.gskmtorange.constant.CommonFunctions
+import cpm.com.gskmtorange.constant.CommonFunctions.savefile
+import cpm.com.gskmtorange.constant.CommonString
+import cpm.com.gskmtorange.constant.CommonUtils
+import cpm.com.gskmtorange.databinding.ActivityPdRealtimeReportBinding
+import cpm.com.gskmtorange.databinding.ActivityPdimageBinding
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.launch
+import org.json.JSONObject
+import java.io.File
+
+class PD_Realtime_Report : AppCompatActivity() {
+ private var context: Context? = null
+ var categoryName: String? = null
+ var categoryId: String? = null
+ var store_id: String? = null;
+ var date: String? = null;
+ var lang: String? = null;
+ var store_type_id: String? = null
+ var class_id: String? = null
+ var key_account_id: String? = null
+ var country_id: String? = null
+ var store_flag_str: String? = null
+ private var preferences: SharedPreferences? = null
+ var db: GSKOrangeDB? = null
+ var listdat: ArrayList? = ArrayList()
+ var username: String? = ""
+ private var kpi_name: String? = ""
+ private lateinit var binding: ActivityPdRealtimeReportBinding
+ private var adapter: RealtimeAdapter? = null
+ val PERMISSION_ALL: Int = 99
+ private var _pos = -1;
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = ActivityPdRealtimeReportBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+ setSupportActionBar(binding.toolbar)
+ context = this
+ db = GSKOrangeDB(context)
+ preferences = PreferenceManager.getDefaultSharedPreferences(context)
+ db?.open()
+ preferences?.let {
+ lang = it.getString(CommonString.KEY_LANGUAGE, "")
+ store_id = it.getString(CommonString.KEY_STORE_ID, "")
+ username = it.getString(CommonString.KEY_USERNAME, "")
+ store_type_id = it.getString(CommonString.KEY_STORETYPE_ID, "")
+ class_id = it.getString(CommonString.KEY_CLASS_ID, "")
+ key_account_id = it.getString(CommonString.KEY_KEYACCOUNT_ID, "")
+ country_id = it.getString(CommonString.KEY_COUNTRY_ID, "")
+ store_flag_str = it.getString(CommonString.KEY_STORE_FLAG, "")
+ date = it.getString(CommonString.KEY_DATE, "")
+ }
+
+ CommonFunctions.updateLangResources(
+ context, preferences?.getString(CommonString.KEY_LANGUAGE, "")
+ )
+ intent?.let {
+ categoryName = it.getStringExtra("categoryName")
+ categoryId = it.getStringExtra("categoryId")
+ kpi_name = it.getStringExtra("kpi_name")
+ }
+ supportActionBar?.apply {
+ setHomeButtonEnabled(true)
+ setDisplayHomeAsUpEnabled(true)
+ title = kpi_name
+ }
+ preferences?.getString(CommonString.KEY_PD_PROJECT_Id, "")?.let { projectId ->
+ val userId = preferences?.getString(CommonString.KEY_PD_USER_Id, "")
+ .takeIf { !it.isNullOrBlank() } ?: username
+ Log.d("pd_user_id",userId.toString());
+
+ CommonUtils.initializePDSDK(
+ this@PD_Realtime_Report,
+ projectId = projectId,
+ _userId = userId
+ )
+ }
+
+ registerIntentFilter(
+ listOf(
+ "DataSaved", "did-receive-queue-data", "did-receive-image-upload-status"
+ )
+ )
+ callAdapter()
+ }
+
+ override fun onResume() {
+ super.onResume()
+ db?.open()
+ }
+
+
+ override fun onOptionsItemSelected(item: MenuItem): Boolean {
+ // as you specify a parent activity in AndroidManifest.xml.
+ val id = item.itemId
+ if (id == android.R.id.home) {
+ //showDataLossAlert();
+ overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out)
+ finish()
+ }
+ if (id == R.id.action_settings) {
+ return true
+ }
+
+ return super.onOptionsItemSelected(item)
+ }
+
+ override fun onDestroy() {
+ super.onDestroy()
+ LocalBroadcastManager.getInstance(this@PD_Realtime_Report)
+ .unregisterReceiver(myBroadcastReceiver) // onDestroy
+ }
+
+ private fun registerIntentFilter(filters: List = listOf()) {
+ filters.forEach { filter ->
+ LocalBroadcastManager.getInstance(this@PD_Realtime_Report)
+ .registerReceiver(myBroadcastReceiver, IntentFilter(filter))
+ }
+ }
+
+ private val savedImages = mutableListOf()
+ private var myBroadcastReceiver: BroadcastReceiver = object : BroadcastReceiver() {
+ override fun onReceive(context: Context?, intent: Intent?) {
+ when (intent?.action) {
+ "did-receive-queue-data" -> {
+ val receivedList =
+ intent.getParcelableArrayListExtra("imageList")
+ Log.d("DEBUG-LOG did-receive-queue-data", "$receivedList")
+ if (receivedList.isNullOrEmpty()) {
+ CameraSDK.uploadFailedImage(this@PD_Realtime_Report)
+ }
+ }
+
+ "did-receive-image-upload-status" -> {
+ val receivedImage = intent.getParcelableExtra("image")
+ Log.d("DEBUG-LOG did-receive-image-upload-status", "$receivedImage")
+ }
+
+ "DataSaved" -> {
+ val receivedList =
+ intent.getParcelableArrayListExtra("imageListSaved")
+ Log.d("DEBUG-LOG DataSaved", "$receivedList")
+ receivedList?.let {
+ savedImages.clear()
+ it.forEach { item ->
+ val dir = CommonString.getImagesFolder(context)
+ val setName =
+ store_id + "_" + username?.replace(".", "") + "_IRPDIMG-" + File(
+ item.uri
+ ).getName()
+ savedImages.add(ImageUri(uri = item.uri, modify_uri = setName))
+ savefile(item.uri.toUri(), "$dir $setName")
+ }
+ adapter?.updateItem(position = _pos, savedImages)
+ Log.e("savedImages", savedImages.toString())
+ _pos = -1
+ }
+ }
+ }
+ }
+ }
+
+ private fun launchCamera(subCat_code: String) {
+ val uploadFrom = "TestApp"
+ val uploadParams = JSONObject(
+ """
+ {
+ "shop_id": 62475,
+ "project_id": "4f57635b-6b07-45bf-bfba-c61c2826b6db",
+ "td_version_id": 178,
+ "shelf_image_id": null,
+ "asset_image_id": null,
+ "shelf_type": "Primary Shelf",
+ "category_id": 123,
+ "user_id": 133,
+ "isConnected": true,
+ "sn_image_type": "skus",
+ "image_type": "multiple",
+ "seq_no": 1,
+ "level": 1,
+ "uploadOnlyOnWifi": 0,
+ "app_session_id": "8e2faa6b-d6fe-413a-a693-76a0cbe0ce71",
+ "metadata": { "Device_Name": "Samsung" }
+ }
+ """
+ )
+ uploadParams.put("shop_id", store_id)
+ uploadParams.put("user_id", username)
+ uploadParams.put("category_id", subCat_code)
+ uploadParams.put("project_id", preferences?.getString(CommonString.KEY_PD_PROJECT_Id, ""))
+ Log.d("uploadparamdata",uploadParams.toString());
+
+
+ if(!lang.equals("ENGLISH",ignoreCase = true)){
+ CameraSDK.startCamera(
+ context = this,
+ orientation = "",
+ widthPercentage = 20,
+ uploadParams = uploadParams,
+ resolution = 3000,
+ referenceUrl = "",
+ allowBlurCheck = true,
+ allowCrop = true,
+ uploadFrom = uploadFrom,
+ isRetake = false,
+ showOverlapToggleButton = false,
+ showGridLines = true,
+ zoomLevel = 1.0,
+ language_code = "ar",
+ isLambda = false
+ )
+ }
+ else{
+ CameraSDK.startCamera(
+ context = this,
+ orientation = "",
+ widthPercentage = 20,
+ uploadParams = uploadParams,
+ resolution = 3000,
+ referenceUrl = "",
+ allowBlurCheck = true,
+ allowCrop = true,
+ uploadFrom = uploadFrom,
+ isRetake = false,
+ showOverlapToggleButton = false,
+ showGridLines = true,
+ zoomLevel = 1.0,
+ language_code = "en",
+ isLambda = false
+ )
+ }
+ }
+
+ private fun callAdapter() {
+ if (country_id == "8") {
+ db?.open()
+ listdat = db?.getCategoryPicturedata(
+ date,
+ categoryId,
+ null,
+ null,
+ null,
+ store_id,
+ CommonString.TABLE_MAPPING_STOCK_STOREWISE
+ )
+ } else if (store_flag_str.equals(CommonString.FROM_DEVIATION, ignoreCase = true)) {
+ db?.open()
+ listdat = db?.getCategoryPicturedata(
+ date,
+ categoryId,
+ key_account_id,
+ store_type_id,
+ class_id,
+ store_id,
+ CommonString.TABLE_MAPPING_STOCK_ADHOC
+ )
+ } else {
+ db?.open()
+ listdat = db?.getCategoryPicturedata(
+ date,
+ categoryId,
+ key_account_id,
+ store_type_id,
+ class_id,
+ store_id,
+ CommonString.TABLE_MAPPING_STOCK
+ )
+ }
+ adapter = RealtimeAdapter(
+ category = categoryName,
+ context = this,
+ subcates = ArrayList(),
+ btnlistener = object : RealtimeAdapter.BtnClickListener {
+ override fun onStartSessionClick(_pos: Int, data: CategoryPictureGetterSetter) {
+ this@PD_Realtime_Report._pos = _pos
+ val intent = Intent(this@PD_Realtime_Report, PD_Realtime_Report_Detail::class.java)
+ intent.putExtra("categoryName", categoryName)
+ intent.putExtra("categoryId", categoryId)
+ intent.putExtra("pd_subcat_code", data.subCatCode)
+ intent.putExtra("subcat_name", data.suB_CATEGORY)
+ intent.putExtra("kpi_name", "IR Realtime Report")
+ startActivity(intent)
+ overridePendingTransition(R.anim.activity_in, R.anim.activity_out)
+ // launchCamera(data.subCatCode)
+ // Log.d("subCatCode", data.subCatCode)
+ }
+ })
+ binding.rlContent.apply {
+ recyclerViewSubCat.adapter = adapter
+ recyclerViewSubCat.layoutManager = LinearLayoutManager(this@PD_Realtime_Report)
+ adapter?.addsubCatItems(listdat)
+ }
+ }
+}
\ No newline at end of file
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PD_Realtime_Report_Detail.kt b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PD_Realtime_Report_Detail.kt
new file mode 100644
index 0000000..7736277
--- /dev/null
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PD_Realtime_Report_Detail.kt
@@ -0,0 +1,281 @@
+package cpm.com.gskmtorange.dailyentry
+
+import android.content.Context
+import android.content.SharedPreferences
+import android.net.ConnectivityManager
+import android.net.NetworkCapabilities
+import android.os.Bundle
+import android.preference.PreferenceManager
+import android.util.Log
+import androidx.appcompat.app.AppCompatActivity
+import androidx.recyclerview.widget.LinearLayoutManager
+import com.squareup.okhttp.Callback
+import com.squareup.okhttp.HttpUrl
+import com.squareup.okhttp.OkHttpClient
+import com.squareup.okhttp.Request
+import com.squareup.okhttp.Response
+import cpm.com.gskmtorange.Database.GSKOrangeDB
+import cpm.com.gskmtorange.GetterSetter.CategoryPictureGetterSetter
+import cpm.com.gskmtorange.adapter.ScoreAdapter
+import cpm.com.gskmtorange.constant.CommonFunctions
+import cpm.com.gskmtorange.constant.CommonString
+import cpm.com.gskmtorange.databinding.ActivityPdRealtimeReportDetailBinding
+import cpm.com.gskmtorange.utils.ScoreItem
+import org.json.JSONObject
+import android.os.Handler
+import android.os.Looper
+import android.view.MenuItem
+import android.view.View
+import android.widget.Toast
+import java.text.SimpleDateFormat
+import java.util.Locale
+
+class PD_Realtime_Report_Detail : AppCompatActivity() {
+ private var context: Context? = null
+ var categoryName: String? = null
+ var categoryId: String? = null
+ var store_id: String? = null;
+ var date: String? = null;
+ var lang: String? = null;
+ var store_type_id: String? = null
+ var class_id: String? = null
+ var key_account_id: String? = null
+ var country_id: String? = null
+ var pd_categoryId: String? = null
+ var subcat_name: String? = null
+ var store_flag_str: String? = null
+ private var preferences: SharedPreferences? = null
+ var db: GSKOrangeDB? = null
+ var listdat: ArrayList? = ArrayList()
+ var username: String? = ""
+ private var kpi_name: String? = ""
+ private lateinit var binding: ActivityPdRealtimeReportDetailBinding
+ val PERMISSION_ALL: Int = 99
+ private var _pos = -1;
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = ActivityPdRealtimeReportDetailBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+ setSupportActionBar(binding.toolbar)
+ context = this
+ preferences = PreferenceManager.getDefaultSharedPreferences(context)
+ preferences?.let {
+ lang = it.getString(CommonString.KEY_LANGUAGE, "")
+ store_id = it.getString(CommonString.KEY_STORE_ID, "")
+ username = it.getString(CommonString.KEY_USERNAME, "")
+ store_type_id = it.getString(CommonString.KEY_STORETYPE_ID, "")
+ class_id = it.getString(CommonString.KEY_CLASS_ID, "")
+ key_account_id = it.getString(CommonString.KEY_KEYACCOUNT_ID, "")
+ country_id = it.getString(CommonString.KEY_COUNTRY_ID, "")
+ store_flag_str = it.getString(CommonString.KEY_STORE_FLAG, "")
+ date = it.getString(CommonString.KEY_DATE, "")
+ }
+ CommonFunctions.updateLangResources(
+ context, preferences?.getString(CommonString.KEY_LANGUAGE, "")
+ )
+ intent?.let {
+ categoryName = it.getStringExtra("categoryName")
+ categoryId = it.getStringExtra("categoryId")
+ kpi_name = it.getStringExtra("kpi_name")
+ pd_categoryId = it.getStringExtra("pd_subcat_code")
+ subcat_name = it.getStringExtra("subcat_name")
+ Log.d("pdcode",pd_categoryId.toString())
+ }
+ supportActionBar?.apply {
+ setHomeButtonEnabled(true)
+ setDisplayHomeAsUpEnabled(true)
+ title = kpi_name
+ }
+ preferences?.getString(CommonString.KEY_PD_PROJECT_Id, "")?.let { projectId ->
+ val userId = preferences?.getString(CommonString.KEY_PD_USER_Id, "")
+ .takeIf { !it.isNullOrBlank() } ?: username
+ Log.d("pd_user_id", userId.toString());
+
+ }
+ if (isNetworkAvailable(this@PD_Realtime_Report_Detail)) {
+ fetchlivedata()
+ } else {
+ Toast.makeText(this, "No internet connection", Toast.LENGTH_SHORT).show()
+ }
+ }
+
+
+ private fun fetchlivedata() {
+ Log.d("apidata",date +","+store_id+","+pd_categoryId+","+preferences?.getString(CommonString.KEY_PD_PROJECT_Id, ""))
+
+ Handler(Looper.getMainLooper()).post {
+ binding.progressBar.visibility = View.VISIBLE
+ binding.recyclerView.visibility = View.GONE
+ }
+
+ val client = OkHttpClient()
+ val formattedDate = formatDate(date)
+ val urlBuilder = HttpUrl.Builder()
+ .scheme("https")
+ .host("apis.shelfwatch.io")
+ .addPathSegment("get_haleon_insights")
+ .addQueryParameter("visit_date", formattedDate)
+ .addQueryParameter("store_id", store_id)
+ .addQueryParameter("category_id", pd_categoryId)
+ .addQueryParameter("project_id", preferences?.getString(CommonString.KEY_PD_PROJECT_Id, ""))
+
+ val request = Request.Builder()
+ .url(urlBuilder.build())
+ .build()
+ Log.d("apiparams",request.toString() + ","+urlBuilder)
+
+ client.newCall(request).enqueue(object : Callback {
+ override fun onFailure(request: Request?, e: java.io.IOException?) {
+ Log.e("RealtimeReport", "API call failed", e)
+ Handler(Looper.getMainLooper()).post {
+ binding.progressBar.visibility = View.GONE
+ binding.recyclerView.visibility = View.VISIBLE
+ }
+ }
+
+ override fun onResponse(response: Response?) {
+ Handler(Looper.getMainLooper()).post {
+ binding.progressBar.visibility = View.GONE
+ binding.recyclerView.visibility = View.VISIBLE
+ }
+ val responseData = response?.body()?.string()
+ Log.d("responsedata", responseData.toString())
+
+ responseData?.let { jsonStr ->
+ try {
+ val json = JSONObject(jsonStr)
+ val output = json.getJSONObject("output")
+ val report = output.getJSONObject("report")
+ val overallArray = report.getJSONArray("overall")
+ val imagelist = output.getJSONArray("images")
+
+ var osa = "0%"
+ var msl = "0%"
+ var posm = "0%"
+ var sosSku = "0%"
+ var sosBrand = "0%"
+
+ for (i in 0 until overallArray.length()) {
+ val obj = overallArray.getJSONObject(i)
+ when (obj.getString("kpi_name")) {
+ "OSA" -> osa = obj.getString("value")
+ "MSL OSA" -> msl = obj.getString("value")
+ "POSM" -> posm = obj.getString("value")
+ "SOS - SKU Level" -> sosSku = obj.getString("value")
+ "SOS - Brand Level" -> sosBrand = obj.getString("value")
+ }
+ }
+
+ // Build OverallScore
+ val scoreItems = mutableListOf()
+ scoreItems.add(
+ ScoreItem.OverallScore(
+ osa = osa,
+ msl = msl,
+ posm = posm,
+ sosSku = sosSku,
+ sosBrand = sosBrand
+ )
+ )
+
+ // ===== Brand Details for "Toothpaste" =====
+ val detailedArray = report.getJSONArray("detailed")
+ var brandDetails: List> = emptyList()
+
+ for (i in 0 until detailedArray.length()) {
+ val detail = detailedArray.getJSONObject(i)
+ if (detail.getString("kpi_name") == "SOS - Brand Level") {
+ val dataArray = detail.getJSONArray("data")
+ val brands = mutableListOf>()
+ for (j in 0 until dataArray.length()) {
+ val brandObj = dataArray.getJSONObject(j)
+ val brandName = brandObj.optString("brand_name", "Unknown")
+ val value = brandObj.getString("value")
+ if (brandName.isNotEmpty() && brandName != "null") {
+ brands.add(brandName to value)
+ }
+ }
+ brandDetails = brands
+ }
+ }
+
+ scoreItems.add(
+ ScoreItem.CategoryScore(
+ categoryName = subcat_name.toString(),
+ msl = msl,
+ posm = posm,
+ sosSku = sosSku,
+ sosBrand = sosBrand,
+ brandDetails = brandDetails
+ )
+ )
+
+ // ===== IMAGE ITEMS =====
+ if (imagelist.length()>0) {
+ for (i in 0 until imagelist.length()) {
+ val imgObj = imagelist.getJSONObject(i)
+ val rawImages = imgObj.getJSONArray("raw_images")
+ for (j in 0 until rawImages.length()) {
+ val imgObjnew = rawImages.getJSONObject(j)
+ val url = imgObjnew.getString("url")
+ Log.d("imgurl",url);
+ scoreItems.add(ScoreItem.ImageItem(url))
+ }
+ }
+ }
+
+ // Update UI on main thread
+ Handler(Looper.getMainLooper()).post {
+ binding.recyclerView.layoutManager = LinearLayoutManager(context)
+ binding.recyclerView.adapter = ScoreAdapter(scoreItems)
+ }
+
+ } catch (e: Exception) {
+ Log.e("RealtimeReport", "Parse error", e)
+ }
+ }
+ }
+ })
+ }
+
+ private fun formatDate(inputDate: String?): String {
+ return try {
+ // Parse input date (from "MM/dd/yyyy")
+ val inputFormat = SimpleDateFormat("MM/dd/yyyy", Locale.US)
+ val date = inputFormat.parse(inputDate ?: "")
+
+ // Format to "yyyy-MM-dd" for API, using Locale.US to avoid locale-specific digits
+ val outputFormat = SimpleDateFormat("yyyy-MM-dd", Locale.US)
+ if (date != null) outputFormat.format(date) else ""
+ } catch (e: Exception) {
+ ""
+ }
+ }
+
+ override fun onOptionsItemSelected(item: MenuItem): Boolean {
+ return when (item.itemId) {
+ android.R.id.home -> {
+ // Finish the current activity and go back
+ finish()
+ true
+ }
+ else -> super.onOptionsItemSelected(item)
+ }
+ }
+ fun isNetworkAvailable(context: Context): Boolean {
+ val connectivityManager =
+ context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
+
+ val network = connectivityManager.activeNetwork ?: return false
+ val activeNetwork = connectivityManager.getNetworkCapabilities(network) ?: return false
+
+ return when {
+ activeNetwork.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) -> true
+ activeNetwork.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) -> true
+ activeNetwork.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET) -> true
+ else -> false
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PDimageActivity.kt b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PDimageActivity.kt
index d2773ac..121dfef 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PDimageActivity.kt
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/PDimageActivity.kt
@@ -1,22 +1,19 @@
package cpm.com.gskmtorange.dailyentry
-import android.Manifest
import android.content.BroadcastReceiver
import android.content.Context
-import android.content.DialogInterface
import android.content.Intent
import android.content.IntentFilter
import android.content.SharedPreferences
-import android.content.pm.PackageManager
-import android.os.Build
+import android.net.ConnectivityManager
+import android.net.NetworkCapabilities
import android.os.Bundle
import android.preference.PreferenceManager
import android.util.Log
import android.view.MenuItem
+import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
-import androidx.core.app.ActivityCompat
-import androidx.core.content.ContextCompat
import androidx.core.net.toUri
import androidx.lifecycle.lifecycleScope
import androidx.localbroadcastmanager.content.LocalBroadcastManager
@@ -47,6 +44,7 @@ class PDimageActivity : AppCompatActivity() {
var categoryId: String? = null
var store_id: String? = null;
var date: String? = null;
+ var lang: String? = null;
var store_type_id: String? = null
var class_id: String? = null
var key_account_id: String? = null
@@ -61,6 +59,8 @@ class PDimageActivity : AppCompatActivity() {
private var adapter: SubCatPdAdapter? = null
val PERMISSION_ALL: Int = 99
private var _pos = -1;
+ var devicename : String? = ""
+ var store_name : String? = ""
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -72,7 +72,9 @@ class PDimageActivity : AppCompatActivity() {
preferences = PreferenceManager.getDefaultSharedPreferences(context)
db?.open()
preferences?.let {
+ lang = it.getString(CommonString.KEY_LANGUAGE, "")
store_id = it.getString(CommonString.KEY_STORE_ID, "")
+ store_name = it.getString(CommonString.KEY_STORE_NAME, "")
username = it.getString(CommonString.KEY_USERNAME, "")
store_type_id = it.getString(CommonString.KEY_STORETYPE_ID, "")
class_id = it.getString(CommonString.KEY_CLASS_ID, "")
@@ -81,6 +83,8 @@ class PDimageActivity : AppCompatActivity() {
store_flag_str = it.getString(CommonString.KEY_STORE_FLAG, "")
date = it.getString(CommonString.KEY_DATE, "")
}
+ devicename = android.os.Build.MANUFACTURER
+ Log.d("device_name",devicename.toString())
CommonFunctions.updateLangResources(
context, preferences?.getString(CommonString.KEY_LANGUAGE, "")
@@ -98,6 +102,7 @@ class PDimageActivity : AppCompatActivity() {
preferences?.getString(CommonString.KEY_PD_PROJECT_Id, "")?.let { projectId ->
val userId = preferences?.getString(CommonString.KEY_PD_USER_Id, "")
.takeIf { !it.isNullOrBlank() } ?: username
+ Log.d("pd_user_id",userId.toString());
CommonUtils.initializePDSDK(
this@PDimageActivity,
@@ -135,6 +140,12 @@ class PDimageActivity : AppCompatActivity() {
).setAction("Action", null).show()
lifecycleScope.launch {
delay(3000) // 3 seconds delay
+ val intent = Intent(this@PDimageActivity, PD_Realtime_Report::class.java)
+ intent.putExtra("categoryName", categoryName)
+ intent.putExtra("categoryId", categoryId)
+ intent.putExtra("kpi_name", "IR Realtime Analytics")
+ startActivity(intent)
+ overridePendingTransition(R.anim.activity_in, R.anim.activity_out)
finish()
}
} else {
@@ -154,9 +165,8 @@ class PDimageActivity : AppCompatActivity() {
}
}
}
-
callAdapter()
- checkAndRequestPermissions()
+ // checkAndRequestPermissions()
}
override fun onResume() {
@@ -182,7 +192,6 @@ class PDimageActivity : AppCompatActivity() {
return checkFlag // Correctly return validation result
}
-
override fun onOptionsItemSelected(item: MenuItem): Boolean {
// as you specify a parent activity in AndroidManifest.xml.
val id = item.itemId
@@ -194,7 +203,6 @@ class PDimageActivity : AppCompatActivity() {
if (id == R.id.action_settings) {
return true
}
-
return super.onOptionsItemSelected(item)
}
@@ -259,6 +267,7 @@ class PDimageActivity : AppCompatActivity() {
"""
{
"shop_id": 62475,
+ "store_name": "abc",
"project_id": "4f57635b-6b07-45bf-bfba-c61c2826b6db",
"td_version_id": 178,
"shelf_image_id": null,
@@ -273,32 +282,56 @@ class PDimageActivity : AppCompatActivity() {
"level": 1,
"uploadOnlyOnWifi": 0,
"app_session_id": "8e2faa6b-d6fe-413a-a693-76a0cbe0ce71",
- "metadata": { "Device_Name": "Samsung" }
+ "metadata": { "Device_Name": $devicename,"User_name": $username }
}
"""
)
+ // "metadata": { "Device_Name": $devicename,"Username": $username }
+ uploadParams.put("store_name", store_name)
uploadParams.put("shop_id", store_id)
uploadParams.put("user_id", username)
uploadParams.put("category_id", subCat_code)
uploadParams.put("project_id", preferences?.getString(CommonString.KEY_PD_PROJECT_Id, ""))
+ Log.d("uploadparamdata",uploadParams.toString());
- CameraSDK.startCamera(
- context = this,
- orientation = "",
- widthPercentage = 20,
- uploadParams = uploadParams,
- resolution = 3000,
- referenceUrl = "",
- allowBlurCheck = true,
- allowCrop = true,
- uploadFrom = uploadFrom,
- isRetake = false,
- showOverlapToggleButton = false,
- showGridLines = true,
- zoomLevel = 1.0,
- language_code = "en",
- isLambda = false
- )
+ if(!lang.equals("ENGLISH",ignoreCase = true)){
+ CameraSDK.startCamera(
+ context = this,
+ orientation = "",
+ widthPercentage = 20,
+ uploadParams = uploadParams,
+ resolution = 3000,
+ referenceUrl = "",
+ allowBlurCheck = true,
+ allowCrop = true,
+ uploadFrom = uploadFrom,
+ isRetake = false,
+ showOverlapToggleButton = false,
+ showGridLines = true,
+ zoomLevel = 1.0,
+ language_code = "ar",
+ isLambda = false
+ )
+ }
+ else{
+ CameraSDK.startCamera(
+ context = this,
+ orientation = "",
+ widthPercentage = 20,
+ uploadParams = uploadParams,
+ resolution = 3000,
+ referenceUrl = "",
+ allowBlurCheck = true,
+ allowCrop = true,
+ uploadFrom = uploadFrom,
+ isRetake = false,
+ showOverlapToggleButton = false,
+ showGridLines = true,
+ zoomLevel = 1.0,
+ language_code = "en",
+ isLambda = false
+ )
+ }
}
private fun callAdapter() {
@@ -337,7 +370,7 @@ class PDimageActivity : AppCompatActivity() {
)
}
- Log.d("listdatsize", listdat?.size.toString())
+ // Log.d("listdatsize", listdat?.size.toString())
adapter = SubCatPdAdapter(
category = categoryName,
context = this,
@@ -345,8 +378,23 @@ class PDimageActivity : AppCompatActivity() {
btnlistener = object : SubCatPdAdapter.BtnClickListener {
override fun onStartSessionClick(_pos: Int, data: CategoryPictureGetterSetter) {
this@PDimageActivity._pos = _pos
+ /* val intent = Intent(this@PDimageActivity, PD_Realtime_Report::class.java)
+ intent.putExtra("categoryName", categoryName)
+ intent.putExtra("categoryId", categoryId)
+ intent.putExtra("kpi_name", "IR Realtime Analytics")
+ startActivity(intent)
+ overridePendingTransition(R.anim.activity_in, R.anim.activity_out)*/
+
+ // launchCamera(data.subCatCode)
+ /* if (isNetworkAvailable(this@PDimageActivity)) {
+ launchCamera(data.subCatCode)
+ }
+ else {
+ Toast.makeText(context, "No internet connection", Toast.LENGTH_SHORT).show()
+ }*/
launchCamera(data.subCatCode)
- Log.d("subCatCode", data.subCatCode)
+
+ // Log.d("subCatCode", data.subCatCode)
}
})
binding.rlContent.apply {
@@ -364,98 +412,18 @@ class PDimageActivity : AppCompatActivity() {
}
}
- private fun checkAndRequestPermissions() {
- var read_phone_state = 0
- var write_storage = 0
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
- write_storage =
- ContextCompat.checkSelfPermission(this, Manifest.permission.READ_MEDIA_IMAGES)
- } else {
- read_phone_state =
- ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE)
- write_storage =
- ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)
+ fun isNetworkAvailable(context: Context): Boolean {
+ val connectivityManager =
+ context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
+
+ val network = connectivityManager.activeNetwork ?: return false
+ val activeNetwork = connectivityManager.getNetworkCapabilities(network) ?: return false
+
+ return when {
+ activeNetwork.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) -> true
+ activeNetwork.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) -> true
+ activeNetwork.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET) -> true
+ else -> false
}
-
- val listPermissionsNeeded: MutableList = java.util.ArrayList()
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
- if (write_storage != PackageManager.PERMISSION_GRANTED) {
- listPermissionsNeeded.add(Manifest.permission.READ_MEDIA_IMAGES)
- }
- } else {
- if (write_storage != PackageManager.PERMISSION_GRANTED) {
- listPermissionsNeeded.add(Manifest.permission.WRITE_EXTERNAL_STORAGE)
- }
- }
-
- if (listPermissionsNeeded.isNotEmpty()) {
- ActivityCompat.requestPermissions(
- this,
- listPermissionsNeeded.toTypedArray(),
- PERMISSION_ALL
- )
- }
- }
-
-
- override fun onRequestPermissionsResult(
- requestCode: Int,
- permissions: Array,
- grantResults: IntArray
- ) {
- super.onRequestPermissionsResult(requestCode, permissions, grantResults)
- if (requestCode == PERMISSION_ALL) {
- val perms: MutableMap = HashMap()
- // Initialize the map with both permissions
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
- perms[Manifest.permission.READ_MEDIA_IMAGES] = PackageManager.PERMISSION_GRANTED
- } else {
- perms[Manifest.permission.WRITE_EXTERNAL_STORAGE] =
- PackageManager.PERMISSION_GRANTED
- }
- // Fill with actual results from user
- if (grantResults.isNotEmpty()) {
- for (i in permissions.indices) perms[permissions[i]] = grantResults[i]
- // Check for both permissions//
- if (perms[Manifest.permission.READ_MEDIA_IMAGES] == PackageManager.PERMISSION_GRANTED &&
- perms[Manifest.permission.WRITE_EXTERNAL_STORAGE] == PackageManager.PERMISSION_GRANTED
- ) {
- Log.d("", "sms & location services permission granted")
- } else {
- Log.d("", "Some permissions are not granted ask again ")
- if (ActivityCompat.shouldShowRequestPermissionRationale(
- this,
- Manifest.permission.READ_MEDIA_IMAGES
- ) ||
- ActivityCompat.shouldShowRequestPermissionRationale(
- this,
- Manifest.permission.WRITE_EXTERNAL_STORAGE
- )
- ) {
- showDialogOK(
- "Photos or media Service Permission required for this app"
- ) { _: DialogInterface?, which: Int ->
- when (which) {
- DialogInterface.BUTTON_POSITIVE -> checkAndRequestPermissions()
- DialogInterface.BUTTON_NEGATIVE -> {
- // proceed with logic by disabling the related features or quit the app.
- val startMain =
- Intent(Intent.ACTION_MAIN)
- startMain.addCategory(Intent.CATEGORY_HOME)
- startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
- startActivity(startMain)
- }
- }
- }
- }
- }
- }
- }
- }
-
- private fun showDialogOK(message: String, okListener: DialogInterface.OnClickListener) {
- AlertDialog.Builder(this).setMessage(message).setPositiveButton("OK", okListener)
- .setNegativeButton("Cancel", okListener).create().show()
}
}
\ No newline at end of file
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/POGQuestionsActivity.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/POGQuestionsActivity.java
index df2b17d..986559f 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/POGQuestionsActivity.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/POGQuestionsActivity.java
@@ -118,32 +118,10 @@ public class POGQuestionsActivity extends AppCompatActivity {
@Override
public void onClick(View view) {
if (validateData()) {
-
db.savePOGQuestionAnswerData(hashMapListChildData, headerDataList, store_id, categoryId);
finish();
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
-
- /* AlertDialog.Builder builder = new AlertDialog.Builder(POGQuestionsActivity.this);
- builder.setMessage(R.string.title_activity_Want_save)
- .setCancelable(false)
- .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
-
- db.savePOGQuestionAnswerData(hashMapListChildData, headerDataList,store_id, categoryId);
- finish();
- overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
- }
- })
- .setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- dialog.cancel();
- }
- });
- AlertDialog alert = builder.create();
- alert.show();*/
-
} else {
-
if(adapter!=null){
adapter.notifyDataSetChanged();
expandableListView.invalidateViews();
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/StoreListActivity.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/StoreListActivity.java
index 8f5b43c..c560a80 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/StoreListActivity.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/StoreListActivity.java
@@ -500,7 +500,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
for (Location location : locationResult.getLocations()) {
lat = location.getLatitude();
lon = location.getLongitude();
- // Log.e("latitude_inside",location.getLatitude() + "," +location.getLongitude());
+ Log.e("latitude_inside",location.getLatitude() + "," +location.getLongitude());
}
}
}
@@ -597,6 +597,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
} else if (id == R.id.iconMap) {
+ Log.d("Mapdata", "latitude is :" +" " +lat + "," + lon);
Intent in = new Intent(context, StoreListRouteActivity.class);
in.putExtra(CommonString.KEY_STORE_LIST, storelist);
startActivity(in);
@@ -899,6 +900,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
viewHolder.imgview_navigation.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
+ Log.e("mapdata",lat + ","+lon);
Intent in = new Intent(context, StoreRouteActivity.class);
in.putExtra(CommonString.KEY_STORE_LIST, current);
startActivity(in);
@@ -1466,7 +1468,6 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
} else {
// return "MAPPING_STOCK";
}
-
}
publishProgress(data);
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/StoreimageActivity.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/StoreimageActivity.java
index 71dbfe1..181e70c 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/StoreimageActivity.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/StoreimageActivity.java
@@ -303,33 +303,6 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
@Override
public void onConnected(Bundle bundle) {
- /*if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
- // TODO: Consider calling
- // ActivityCompat#requestPermissions
- // here to request the missing permissions, and then overriding
- // public void onRequestPermissionsResult(int requestCode, String[] permissions,
- // int[] grantResults)
- // to handle the case where the user grants the permission. See the documentation
- // for ActivityCompat#requestPermissions for more details.
- return;
- }
- mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);
-
- if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED
- || ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
- if (mLastLocation != null) {
- lat = mLastLocation.getLatitude();
- lon = mLastLocation.getLongitude();
-
- }
- }
-
-
- // if (mRequestingLocationUpdates) {
- startLocationUpdates();*/
- // }
-
- // startLocationUpdates();
}
@Override
@@ -359,10 +332,11 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
@Override
protected void onStop() {
- super.onStop();// ATTENTION: This was auto-generated to implement the App Indexing API.
-// See https://g.co/AppIndexing/AndroidStudio for more information.
+ super.onStop();
+ // ATTENTION: This was auto-generated to implement the App Indexing API.
+ // See https://g.co/AppIndexing/AndroidStudio for more information.
// AppIndex.AppIndexApi.end(client, getIndexApiAction());
- /* if (mGoogleApiClient.isConnected()) {
+ /* if (mGoogleApiClient.isConnected()) {
mGoogleApiClient.disconnect();
}*/
// ATTENTION: This was auto-generated to implement the App Indexing API.
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/WebViewActivity.kt b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/WebViewActivity.kt
new file mode 100644
index 0000000..c8e3afe
--- /dev/null
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/dailyentry/WebViewActivity.kt
@@ -0,0 +1,130 @@
+package cpm.com.gskmtorange.dailyentry
+
+import android.annotation.SuppressLint
+import android.app.Dialog
+import android.os.Bundle
+import android.os.Message
+import android.util.Log
+import android.view.ViewGroup
+import android.webkit.*
+import androidx.appcompat.app.AppCompatActivity
+import cpm.com.gskmtorange.databinding.ActivityWebviewBinding
+class WebViewActivity : AppCompatActivity() {
+ private lateinit var binding: ActivityWebviewBinding
+
+ @SuppressLint("SetJavaScriptEnabled")
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = ActivityWebviewBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+ val url = intent.getStringExtra("url") ?: ""
+ // Configure WebView settings
+ with(binding.webView.settings) {
+ javaScriptEnabled = true
+ domStorageEnabled = true
+ javaScriptCanOpenWindowsAutomatically = true
+ setSupportMultipleWindows(true)
+ loadWithOverviewMode = true
+ useWideViewPort = true
+ mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
+ // ✅ Force desktop mode by dynamically modifying user-agent
+ val defaultUA = WebSettings.getDefaultUserAgent(this@WebViewActivity)
+ val desktopUA = defaultUA.replace("Mobile", "").replace("Android", "").trim()
+ userAgentString = desktopUA
+ Log.d("UserAgent", "Final User-Agent: $desktopUA")
+ }
+
+ // Keep navigation inside WebView
+ binding.webView.webViewClient = object : WebViewClient() {
+ override fun shouldOverrideUrlLoading(
+ view: WebView?,
+ request: WebResourceRequest?
+ ): Boolean {
+ return false
+ }
+
+ override fun onPageFinished(view: WebView?, url: String?) {
+ super.onPageFinished(view, url)
+ // Inject JS to simulate mouseover/mouseenter on tap
+ view?.evaluateJavascript(
+ """
+ (function() {
+ function findAncestorWithAttr(el, attr) {
+ while (el && el !== document.body) {
+ if (el.hasAttribute && el.hasAttribute(attr)) {
+ return el;
+ }
+ el = el.parentElement;
+ }
+ return null;
+ }
+
+ document.addEventListener('touchend', function(e) {
+ var point = e.changedTouches[0];
+ var el = document.elementFromPoint(point.clientX, point.clientY);
+ var target = findAncestorWithAttr(el, 'data-annotation-id') || el;
+
+ console.log('Touch at element:', target.getAttribute('data-annotation-id') || target.className);
+
+ function dispatchMouseEvent(type) {
+ var event = new MouseEvent(type, {
+ view: window,
+ bubbles: true,
+ cancelable: true,
+ clientX: point.clientX,
+ clientY: point.clientY
+ });
+ target.dispatchEvent(event);
+ }
+
+ dispatchMouseEvent('mouseover');
+ dispatchMouseEvent('mouseenter');
+ dispatchMouseEvent('mousemove');
+ target.click();
+ });
+ })();
+ """.trimIndent(), null
+ )
+ }
+
+ }
+
+ // Handle JS dialogs, popups, and log console messages
+ binding.webView.webChromeClient = object : WebChromeClient() {
+ @SuppressLint("SetJavaScriptEnabled")
+ override fun onCreateWindow(
+ view: WebView?,
+ isDialog: Boolean,
+ isUserGesture: Boolean,
+ resultMsg: Message?
+ ): Boolean {
+ val popupWebView = WebView(this@WebViewActivity)
+ popupWebView.settings.javaScriptEnabled = true
+ popupWebView.settings.domStorageEnabled = true
+
+ val dialog = Dialog(this@WebViewActivity)
+ dialog.setContentView(popupWebView)
+ dialog.window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
+ dialog.show()
+
+ popupWebView.webViewClient = object : WebViewClient() {
+ override fun onPageFinished(view: WebView?, url: String?) {
+ super.onPageFinished(view, url)
+ }
+ }
+
+ val transport = resultMsg?.obj as WebView.WebViewTransport
+ transport.webView = popupWebView
+ resultMsg.sendToTarget()
+
+ return true
+ }
+ }
+
+
+ // Load URL
+ binding.webView.loadUrl(url)
+ }
+
+
+}
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/download/DownloadActivity.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/download/DownloadActivity.java
index be21205..88db761 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/download/DownloadActivity.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/download/DownloadActivity.java
@@ -5,7 +5,6 @@ import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
-import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.AsyncTask;
import android.os.Bundle;
@@ -14,9 +13,9 @@ import android.util.Log;
import android.view.Window;
import android.widget.ProgressBar;
import android.widget.TextView;
+import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
-
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
@@ -24,7 +23,6 @@ import org.ksoap2.transport.HttpTransportSE;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
-
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -36,11 +34,11 @@ import java.net.MalformedURLException;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.text.DecimalFormat;
-
import cpm.com.gskmtorange.Database.GSKOrangeDB;
import cpm.com.gskmtorange.R;
import cpm.com.gskmtorange.constant.CommonFunctions;
import cpm.com.gskmtorange.constant.CommonString;
+import cpm.com.gskmtorange.utils.TLSSocketFactory;
import cpm.com.gskmtorange.xmlGetterSetter.ADDITIONAL_DISPLAY_MASTERGetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.AdditionalQuestiongetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
@@ -83,6 +81,11 @@ import cpm.com.gskmtorange.xmlGetterSetter.SupervisorListGetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
import cpm.com.gskmtorange.xmlGetterSetter.Visit_Type_Master_GetterSetter;
import cpm.com.gskmtorange.xmlHandlers.XMLHandlers;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.SSLSocketFactory;
public class DownloadActivity extends AppCompatActivity {
private Context context;
@@ -136,7 +139,6 @@ public class DownloadActivity extends AppCompatActivity {
Order_Received_Status_GetterSetter order_received_status_getterSetter;
Visit_Type_Master_GetterSetter visit_type_master_getterSetter;
-
private Dialog dialog;
private ProgressBar pb;
private TextView percentage, message;
@@ -149,22 +151,51 @@ public class DownloadActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_download);
-
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
-
db = new GSKOrangeDB(this);
context = this;
+ // ✅ Enable old TLS versions for SOAP
+ //enableOldTLS();
+ // checkTLSVersion();
+
preferences = PreferenceManager.getDefaultSharedPreferences(this);
-
CommonFunctions.updateLangResources(context, preferences.getString(CommonString.KEY_LANGUAGE, ""));
-
userId = preferences.getString(CommonString.KEY_USERNAME, null);
culture_id = preferences.getString(CommonString.KEY_CULTURE_ID, "");
country_id = preferences.getString(CommonString.KEY_COUNTRY_ID, null);
+
new UploadTask(DownloadActivity.this).execute();
}
+ private void checkTLSVersion() {
+ new Thread(() -> {
+ try {
+ String host = "gskme2.parinaam.in";
+ int port = 443;
+
+ // Create SSL context with default settings
+ SSLContext sslContext = SSLContext.getInstance("TLS");
+ sslContext.init(null, null, null);
+
+ SSLSocketFactory factory = sslContext.getSocketFactory();
+
+ try (SSLSocket sslSocket = (SSLSocket) factory.createSocket(host, port)) {
+ sslSocket.startHandshake(); // do handshake
+
+ SSLSession session = sslSocket.getSession();
+ Log.d("TLS_CHECK", "Protocol: " + session.getProtocol());
+ runOnUiThread(() ->
+ Toast.makeText(this, "protocol: " + session.getProtocol(), Toast.LENGTH_SHORT).show()
+ );
+ Log.d("TLS_CHECK", "CipherSuite: " + session.getCipherSuite());
+ }
+
+ } catch (Exception e) {
+ Log.e("TLS_CHECK", "Error checking TLS", e);
+ }
+ }).start();
+ }
class Data {
int value;
@@ -194,6 +225,7 @@ public class DownloadActivity extends AppCompatActivity {
dialog.setCancelable(false);
dialog.show();
}
+
@Override
protected String doInBackground(Void... voids) {
try {
@@ -221,23 +253,21 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ // HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- Log.d("requestdata",request.toString());
-
- Object result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ /* if (androidHttpTransport.responseDump != null) {
+ Log.e("SOAP_RESPONSE", androidHttpTransport.responseDump);
+ } else {
+ Log.e("SOAP_RESPONSE", "No response received");
+ }*/
+ Object result = envelope.getResponse();
if (result.toString() != null) {
-
xpp.setInput(new StringReader(result.toString()));
- // xpp.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false);
- // xpp.setInput(stream,"UTF-8");
xpp.next();
eventType = xpp.getEventType();
-
jcpgettersetter = XMLHandlers.JCPXMLHandler(xpp, eventType);
-
String jcpTable = jcpgettersetter.getTable_journey_plan();
if (jcpTable != null)
TableBean.setJourneyPlan(jcpTable);
@@ -248,7 +278,6 @@ public class DownloadActivity extends AppCompatActivity {
//return "JOURNEY_PLAN";
no_jcp_flag = true;
}
-
data.value = 10;
data.name = "JCP " + getResources().getString(R.string.download_data);
}
@@ -267,13 +296,9 @@ public class DownloadActivity extends AppCompatActivity {
androidHttpTransport = new HttpTransportSE(CommonString.URL);
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
- // xpp.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false);
- // xpp.setInput(stream,"UTF-8");
xpp.next();
eventType = xpp.getEventType();
@@ -291,9 +316,6 @@ public class DownloadActivity extends AppCompatActivity {
data.name = "ADHOC JOURNEYPLAN " + getResources().getString(R.string.download_data);
} else {
no_adhoc_flag = true;
- /*if (no_jcp_flag) {
- return "JOURNEY_PLAN";
- }*/
}
}
publishProgress(data);
@@ -307,12 +329,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
-
androidHttpTransport = new HttpTransportSE(CommonString.URL);
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
xpp.next();
@@ -322,51 +343,11 @@ public class DownloadActivity extends AppCompatActivity {
if (additionalJcpGetterSetter.getSTORE_ID().size() > 0) {
resultHttp = CommonString.KEY_SUCCESS;
} else {
-
no_addtional_jcp_flag = true;
-
}
-
String additional_jcpTable = additionalJcpGetterSetter.getTable_journey_plan();
TableBean.setAdditionalJourneyPlan(additional_jcpTable);
}
-
- //SUPERVISOR_LIST
- request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
- request.addProperty("UserName", userId);
- request.addProperty("Type", "SUPERVISOR_LIST");
- request.addProperty("cultureid", culture_id);
-
- envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
- envelope.dotNet = true;
- envelope.setOutputSoapObject(request);
-
- androidHttpTransport = new HttpTransportSE(CommonString.URL);
- androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
-
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
-
- if (result.toString() != null) {
- xpp.setInput(new StringReader(result.toString()));
- xpp.next();
- eventType = xpp.getEventType();
- supervisorListGetterSetter = XMLHandlers.supervisorListXMLHandler(xpp, eventType);
-
- String table_sup_list = supervisorListGetterSetter.getTable_SUPERVISOR_LIST();
- if (table_sup_list != null) {
- resultHttp = CommonString.KEY_SUCCESS;
- TableBean.setTable_SUPERVISOR_LIST(table_sup_list);
- }
-
- if (supervisorListGetterSetter.getEMP_ID().size() > 0) {
- data.value = 97;
- data.name = "SUPERVISOR LIST DATA" + getResources().getString(R.string.download_data);
- }
- }
- publishProgress(data);
-
-
//ADHOC_JOURNEYPLAN_ADDITIONAL
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
request.addProperty("UserName", userId);
@@ -378,10 +359,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -397,7 +379,6 @@ public class DownloadActivity extends AppCompatActivity {
return "JOURNEY_PLAN";
}
}
-
String additional_jcpTable = additionalAdhocJcpGetterSetter.getTable_journey_plan();
TableBean.setAdhocJourneyplanAdditional(additional_jcpTable);
}
@@ -413,10 +394,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -450,10 +432,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -487,10 +470,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -524,10 +508,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -560,10 +545,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -596,10 +582,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -633,8 +620,8 @@ public class DownloadActivity extends AppCompatActivity {
androidHttpTransport = new HttpTransportSE(CommonString.URL);
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -660,7 +647,7 @@ public class DownloadActivity extends AppCompatActivity {
//Added on 04/12/2018
// MAPPING_STOCK_STOREWISE
- if (country_id.equals("7")||country_id.equals("8") || country_id.equals("17")) {
+ if (country_id.equals("7") || country_id.equals("8") || country_id.equals("17")) {
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
request.addProperty("UserName", userId);
request.addProperty("Type", "MAPPING_STOCK_STOREWISE");
@@ -671,10 +658,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -711,10 +699,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -749,11 +738,12 @@ public class DownloadActivity extends AppCompatActivity {
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
- androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ androidHttpTransport = new HttpTransportSE(CommonString.URL);;
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -780,16 +770,17 @@ public class DownloadActivity extends AppCompatActivity {
request.addProperty("Type", "MAPPING_DISPLAY_CHECKLIST");
request.addProperty("cultureid", culture_id);
- Log.d("requestdata",request.toString());
+ Log.d("requestdata", request.toString());
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -824,10 +815,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -859,10 +851,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -897,10 +890,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -934,10 +928,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -973,8 +968,8 @@ public class DownloadActivity extends AppCompatActivity {
androidHttpTransport = new HttpTransportSE(CommonString.URL);
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -998,6 +993,44 @@ public class DownloadActivity extends AppCompatActivity {
}
publishProgress(data);
+ request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
+ request.addProperty("UserName", userId);
+ request.addProperty("Type", "CATEGORYWISE_SOS_TARGET");
+ request.addProperty("cultureid", culture_id);
+
+ envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
+ envelope.dotNet = true;
+ envelope.setOutputSoapObject(request);
+
+ androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
+ androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
+
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
+
+ if (result.toString() != null) {
+ xpp.setInput(new StringReader(result.toString()));
+ xpp.next();
+ eventType = xpp.getEventType();
+ store_category_wiseGetterSetter = XMLHandlers.CATEGORYWISE_SOS_TARGETXMLHandler(xpp, eventType);
+
+ String table_store_performace = store_category_wiseGetterSetter.getTable_CATEGORYWISE_SOS_TARGET();
+ if (table_store_performace != null) {
+ resultHttp = CommonString.KEY_SUCCESS;
+ TableBean.setCategoryWiseSos(table_store_performace);
+ }
+
+ if (store_category_wiseGetterSetter.getSTORE_ID().size() > 0) {
+ data.value = 85;
+ data.name = "CATEGORYWISE_SOS_TARGET Data Download";
+ } else {
+ //return "CATEGORYWISE_SOS_TARGET";
+ }
+
+ }
+ publishProgress(data);
+
//ADDITIONAL_DISPLAY_MASTER
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
@@ -1010,10 +1043,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1047,10 +1081,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1083,10 +1118,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1120,10 +1156,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1146,43 +1183,6 @@ public class DownloadActivity extends AppCompatActivity {
publishProgress(data);
//CATEGORYWISE_SOS_TARGET
- request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
- request.addProperty("UserName", userId);
- request.addProperty("Type", "CATEGORYWISE_SOS_TARGET");
- request.addProperty("cultureid", culture_id);
-
- envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
- envelope.dotNet = true;
- envelope.setOutputSoapObject(request);
-
- androidHttpTransport = new HttpTransportSE(CommonString.URL);
- androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
-
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
-
- if (result.toString() != null) {
- xpp.setInput(new StringReader(result.toString()));
- xpp.next();
- eventType = xpp.getEventType();
- store_category_wiseGetterSetter = XMLHandlers.CATEGORYWISE_SOS_TARGETXMLHandler(xpp, eventType);
-
- String table_store_performace = store_category_wiseGetterSetter.getTable_CATEGORYWISE_SOS_TARGET();
- if (table_store_performace != null) {
- resultHttp = CommonString.KEY_SUCCESS;
- TableBean.setCategoryWiseSos(table_store_performace);
- }
-
- if (store_category_wiseGetterSetter.getSTORE_ID().size() > 0) {
- data.value = 85;
- data.name = "CATEGORYWISE_SOS_TARGET Data Download";
- } else {
- //return "CATEGORYWISE_SOS_TARGET";
- }
-
- }
- publishProgress(data);
-
//SHELF_MASTER
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
@@ -1195,10 +1195,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1231,10 +1232,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1267,10 +1269,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1291,6 +1294,42 @@ public class DownloadActivity extends AppCompatActivity {
}
publishProgress(data);
+
+ //SUPERVISOR_LIST
+ request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
+ request.addProperty("UserName", userId);
+ request.addProperty("Type", "SUPERVISOR_LIST");
+ request.addProperty("cultureid", culture_id);
+
+ envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
+ envelope.dotNet = true;
+ envelope.setOutputSoapObject(request);
+
+ androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
+ androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
+
+ result = envelope.getResponse();
+
+ if (result.toString() != null) {
+ xpp.setInput(new StringReader(result.toString()));
+ xpp.next();
+ eventType = xpp.getEventType();
+ supervisorListGetterSetter = XMLHandlers.supervisorListXMLHandler(xpp, eventType);
+
+ String table_sup_list = supervisorListGetterSetter.getTable_SUPERVISOR_LIST();
+ if (table_sup_list != null) {
+ resultHttp = CommonString.KEY_SUCCESS;
+ TableBean.setTable_SUPERVISOR_LIST(table_sup_list);
+ }
+
+ if (supervisorListGetterSetter.getEMP_ID().size() > 0) {
+ data.value = 97;
+ data.name = "SUPERVISOR LIST DATA" + getResources().getString(R.string.download_data);
+ }
+ }
+ publishProgress(data);
+
//MAPPING_CATEGORY_IMAGE_ALLOW
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
request.addProperty("UserName", userId);
@@ -1302,10 +1341,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1337,10 +1377,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1374,10 +1415,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1409,10 +1451,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1444,10 +1487,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1479,10 +1523,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1514,10 +1559,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ // Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1550,10 +1596,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1588,10 +1635,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1618,10 +1666,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1650,8 +1699,8 @@ public class DownloadActivity extends AppCompatActivity {
androidHttpTransport = new HttpTransportSE(CommonString.URL);
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1687,10 +1736,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1727,10 +1777,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1764,10 +1815,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1791,7 +1843,7 @@ public class DownloadActivity extends AppCompatActivity {
publishProgress(data);
- //VISIT_TYPE_MASTER
+ //VISIT_TYPE_MASTER
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
request.addProperty("UserName", userId);
request.addProperty("Type", "VISIT_TYPE_MASTER");
@@ -1802,10 +1854,11 @@ public class DownloadActivity extends AppCompatActivity {
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
+ ;
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
- result = envelope.getResponse();
- Log.d("resultdata",result.toString());
+ result = envelope.getResponse();
+ Log.d("resultdata", result.toString());
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
@@ -1829,8 +1882,6 @@ public class DownloadActivity extends AppCompatActivity {
publishProgress(data);
-
-
//Images DownLoads
//MAPPING_PLANOGRAM Image save into folder
@@ -1852,7 +1903,7 @@ public class DownloadActivity extends AppCompatActivity {
file.mkdir();
}
- if (!new File(PATH + image_name).exists()) {
+ if (!new File(PATH + image_name).exists()) {
if (!image_name.equalsIgnoreCase("NA") && !image_name.equalsIgnoreCase("")) {
URL url = new URL(path + "/" + image_name);
HttpURLConnection c = (HttpURLConnection) url.openConnection();
@@ -2066,34 +2117,35 @@ public class DownloadActivity extends AppCompatActivity {
db.InsertPROMOTION_TYPE_MASTER(promotion_type_masterGetterSetter);
db.InsertCATEGORYWISE_SOS_TARGET(store_category_wiseGetterSetter);
db.InsertMAPPING_SKU_PRICING_ENABLE(mapping_sku_pricing_enableGetterSetter);
- }
- catch (MalformedURLException e) {
+ } catch (MalformedURLException e) {
ResultFlag = false;
str = CommonString.MESSAGE_EXCEPTION;
+ Log.d("exceptiondata", e.getMessage());
return CommonString.MESSAGE_EXCEPTION;
} catch (SocketTimeoutException e) {
ResultFlag = false;
str = CommonString.MESSAGE_SOCKETEXCEPTION;
+ Log.d("exceptiondata1", e.getMessage());
return CommonString.MESSAGE_SOCKETEXCEPTION;
} catch (InterruptedIOException e) {
ResultFlag = false;
str = CommonString.MESSAGE_EXCEPTION;
+ Log.d("exceptiondata2", e.getMessage());
return CommonString.MESSAGE_EXCEPTION;
} catch (IOException e) {
ResultFlag = false;
str = CommonString.MESSAGE_SOCKETEXCEPTION;
+ Log.d("exceptiondata3", e.getMessage());
return CommonString.MESSAGE_SOCKETEXCEPTION;
} catch (XmlPullParserException e) {
ResultFlag = false;
- Log.d("exceptiondata",e.getMessage() + ","+data.name );
+ Log.d("exceptiondata4", e.getMessage() + "," + data.name);
str = CommonString.MESSAGE_XmlPull;
return CommonString.MESSAGE_XmlPull;
} catch (Exception e) {
- // Crashlytics.log(7, CommonString.MESSAGE_EXCEPTION, e.toString());
- // Crashlytics.logException(e.getCause());
- // Crashlytics.logException(new Exception(e.getCause()));
ResultFlag = false;
str = CommonString.MESSAGE_EXCEPTION;
+ Log.d("exceptiondata5", e.getMessage());
return CommonString.MESSAGE_EXCEPTION;
}
@@ -2153,4 +2205,13 @@ public class DownloadActivity extends AppCompatActivity {
CommonFunctions.updateLangResources(context, preferences.getString(CommonString.KEY_LANGUAGE, ""));
}
+
+ private void enableOldTLS() {
+ try {
+ SSLSocketFactory tlsSocketFactory = new TLSSocketFactory();
+ HttpsURLConnection.setDefaultSSLSocketFactory(tlsSocketFactory);
+ } catch (Exception e) {
+ e.fillInStackTrace();
+ }
+ }
}
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/gsk_dailyentry/DailyDataMenuActivity.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/gsk_dailyentry/DailyDataMenuActivity.java
index 994d0f0..2c78dd7 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/gsk_dailyentry/DailyDataMenuActivity.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/gsk_dailyentry/DailyDataMenuActivity.java
@@ -51,6 +51,7 @@ import cpm.com.gskmtorange.dailyentry.CreateSelfActivity;
import cpm.com.gskmtorange.dailyentry.NewStockDataActivity;
import cpm.com.gskmtorange.dailyentry.OrderTakingActivity;
import cpm.com.gskmtorange.dailyentry.PDVisibilityActivity;
+import cpm.com.gskmtorange.dailyentry.PD_Pog_Activity;
import cpm.com.gskmtorange.dailyentry.PDimageActivity;
import cpm.com.gskmtorange.dailyentry.POGQuestionsActivity;
import cpm.com.gskmtorange.dailyentry.StockActivity;
@@ -113,7 +114,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
db.open();
- // deleteIRURl(context);
+ // deleteIRURl(context);
visittypelist = db.getInsertedVisitType(store_id, visit_date, "3");
if (visittypelist.size() > 0) {
if (visittypelist.get(0).getVISIT_TYPE_ID().equals("3")) {
@@ -134,7 +135,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
ArrayList uris = irList.get(i).getImageUris();
if (uris != null && !uris.isEmpty()) {
for (int k = 0; k < uris.size(); k++) {
- // CommonUtils.INSTANCE.deleteSpecificImage(this,uris.get(k).getUri());
+ // CommonUtils.INSTANCE.deleteSpecificImage(this,uris.get(k).getUri());
deleteSpecificImage(context,uris.get(k).getUri());
}
}
@@ -522,12 +523,25 @@ public class DailyDataMenuActivity extends AppCompatActivity {
} else {
data.setCategory_img(R.mipmap.picturecatogory_grey);
}
-
- }
- data.setCategory_name(getResources()
- .getString(R.string.title_activity_ir_visibility));
+ data.setCategory_name(getResources().getString(R.string.title_activity_ir_visibility));
categoryList.add(data);
+ //IR POG
+ /*data = new DailyDataMenuGetterSetter();
+ ArrayList ir_pog = isPdPogIRMapping();
+ if (ir_pog != null && !ir_pog.isEmpty() && camera_allow.equals("1")) {
+ data.setCategory_img(R.mipmap.picturecatogory);
+ db.open();
+ if (db.isPdPogImages(store_id, visit_date, CommonString.KEY_COMPELETE, categoryId)) {
+ data.setCategory_img(R.mipmap.picturecatogory_done);
+ }
+ } else {
+ data.setCategory_img(R.mipmap.picturecatogory_grey);
+ }
+ data.setCategory_name(getResources().getString(R.string.title_activity_ir_pog));
+ categoryList.add(data);*/
+ }
+
adapter = new DailyDataMenuAdapter(DailyDataMenuActivity.this, categoryList);
recyclerView.setAdapter(adapter);
recyclerView.setLayoutManager(new GridLayoutManager(context, 2));
@@ -738,6 +752,10 @@ public class DailyDataMenuActivity extends AppCompatActivity {
holder.categoryName.setTextColor(isPdVisibiltyMapping() != null && !isPdVisibiltyMapping().isEmpty() && camera_allow.equals("1")
? ContextCompat.getColor(context, R.color.black) : ContextCompat.getColor(context, R.color.grey_background));
}
+ /*else if (dailyData.getCategory_name().equalsIgnoreCase(getString(R.string.title_activity_ir_pog))) {
+ holder.categoryName.setTextColor(isPdPogIRMapping() != null && !isPdPogIRMapping().isEmpty() && camera_allow.equals("1")
+ ? ContextCompat.getColor(context, R.color.black) : ContextCompat.getColor(context, R.color.grey_background));
+ }*/
else{
holder.irview.setVisibility(View.GONE);
}
@@ -807,7 +825,8 @@ public class DailyDataMenuActivity extends AppCompatActivity {
startActivity(intent);
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
}
- } else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.title_activity_ir_image))) {
+ }
+ else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.title_activity_ir_image))) {
if (isPdIRMapping() != null && !isPdIRMapping().isEmpty() && camera_allow.equals("1")) {
Intent intent = new Intent(DailyDataMenuActivity.this, PDimageActivity.class);
intent.putExtra("kpi_name", dailyData.getCategory_name());
@@ -817,8 +836,18 @@ public class DailyDataMenuActivity extends AppCompatActivity {
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
}
}
+ /*else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.title_activity_ir_pog))) {
+ if (isPdPogIRMapping() != null && !isPdPogIRMapping().isEmpty() && camera_allow.equals("1")) {
+ Intent intent = new Intent(DailyDataMenuActivity.this, PD_Pog_Activity.class);
+ intent.putExtra("kpi_name", dailyData.getCategory_name());
+ intent.putExtra("categoryName", categoryName);
+ intent.putExtra("categoryId", categoryId);
+ startActivity(intent);
+ overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
+ }
+ }*/
else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.title_activity_ir_visibility))) {
- if (isPdIRMapping() != null && !isPdIRMapping().isEmpty() && camera_allow.equals("1")) {
+ if (isPdVisibiltyMapping() != null && !isPdVisibiltyMapping().isEmpty() && camera_allow.equals("1")) {
Intent intent = new Intent(DailyDataMenuActivity.this, PDVisibilityActivity.class);
intent.putExtra("kpi_name", dailyData.getCategory_name());
intent.putExtra("categoryName", categoryName);
@@ -1009,6 +1038,43 @@ public class DailyDataMenuActivity extends AppCompatActivity {
return ir_list;
}
+ private ArrayList isPdPogIRMapping() {
+ ArrayList ir_list;
+ if (country_id.equals("8")) {
+ ir_list = db.getCategoryPicturePogdata(
+ date,
+ categoryId,
+ null,
+ null,
+ null,
+ store_id,
+ CommonString.TABLE_MAPPING_STOCK_STOREWISE
+ );
+ } else if (store_flag_str != null && store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
+ ir_list = db.getCategoryPicturePogdata(
+ date,
+ categoryId,
+ keyAccount_id,
+ storeType_id,
+ class_id,
+ store_id,
+ CommonString.TABLE_MAPPING_STOCK_ADHOC
+ );
+ } else {
+ ir_list = db.getCategoryPicturePogdata(
+ date,
+ categoryId,
+ keyAccount_id,
+ storeType_id,
+ class_id,
+ store_id,
+ CommonString.TABLE_MAPPING_STOCK
+ );
+ }
+
+ return ir_list;
+ }
+
private ArrayList isPdVisibiltyMapping() {
ArrayList ir_list;
if (country_id.equals("6")) {
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/password/MPinActivity.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/password/MPinActivity.java
index 367a9a9..61ab02b 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/password/MPinActivity.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/password/MPinActivity.java
@@ -474,7 +474,7 @@ public class MPinActivity extends AppCompatActivity implements BlurLockView.OnPa
protected String doInBackground(Void... params) {
try {
versionCode = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;
- String userauth_xml = "[DATA]" + "[USER_DATA][USER_ID]" + userId + "[/USER_ID]" + "[PASSWORD]" + password + "[/PASSWORD]" + "[IN_TIME]" + CommonFunctions.getCurrentTimeWithLanguage(context) + "[/IN_TIME]" + "[LATITUDE]" + lat + "[/LATITUDE]" + "[LONGITUDE]" + lon + "[/LONGITUDE]" + "[APP_VERSION]" + app_ver + "[/APP_VERSION]" + "[ATT_MODE]OnLine[/ATT_MODE]" + "[NETWORK_STATUS]" + "LoginStatus" + "[/NETWORK_STATUS]" + "[/USER_DATA][/DATA]";
+ String userauth_xml = "[DATA]" + "[USER_DATA][USER_ID]" + userId + "[/USER_ID]" + "[PASSWORD]" + password + "[/PASSWORD]" + "[IN_TIME]" + CommonFunctions.getCurrentTimeWithLanguage(context) + "[/IN_TIME]" + "[LATITUDE]" + lat + "[/LATITUDE]" + "[LONGITUDE]" + lon + "[/LONGITUDE]" + "[APP_VERSION]" + app_ver+"-T5" + "[/APP_VERSION]" + "[ATT_MODE]OnLine[/ATT_MODE]" + "[NETWORK_STATUS]" + "LoginStatus" + "[/NETWORK_STATUS]" + "[/USER_DATA][/DATA]";
SoapObject request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_LOGIN);
request.addProperty("onXML", userauth_xml);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/storeinmap/StoreListRouteActivity.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/storeinmap/StoreListRouteActivity.java
index 4881c7e..3e4fc06 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/storeinmap/StoreListRouteActivity.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/storeinmap/StoreListRouteActivity.java
@@ -1,5 +1,7 @@
package cpm.com.gskmtorange.storeinmap;
+import android.Manifest;
+import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.location.Location;
@@ -10,6 +12,7 @@ import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
+import androidx.core.app.ActivityCompat;
import androidx.fragment.app.FragmentActivity;
import com.google.android.gms.maps.CameraUpdateFactory;
@@ -56,34 +59,23 @@ public class StoreListRouteActivity extends FragmentActivity implements OnMapRea
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_store_list_route);
storelist = (ArrayList)getIntent().getSerializableExtra(CommonString.KEY_STORE_LIST);
+
+
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
- mapFragment.getMapAsync(this);
+ mapFragment.getMapAsync(this);
color_list.add("#f44336");
color_list.add("#1e88e5");
color_list.add("#2e7d32");
color_list.add("#ab47bc");
color_list.add("#ffcc80");
color_list.add("#fdd835");
-
}
-
-
- /**
- * Manipulates the map once available.
- * This callback is triggered when the map is ready to be used.
- * This is where we can add markers or lines, add listeners or move the camera. In this case,
- * we just add a marker near Sydney, Australia.
- * If Google Play services is not installed on the device, the user will be prompted to install
- * it inside the SupportMapFragment. This method will only be triggered once the user has
- * installed Google Play services and returned to the app.
- */
@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
-
showRoute(global_index);
}
@@ -102,6 +94,10 @@ public class StoreListRouteActivity extends FragmentActivity implements OnMapRea
Bitmap bm = tv.getDrawingCache();
lat = Double.parseDouble(storelist.get(index).getLATITUDE());
lon = Double.parseDouble(storelist.get(index).getLONGITUDE());
+ /*lat = 28.5275;
+ lon = 77.2781;*/
+
+ Log.e("directiondata",lat +","+lon);
LatLng loc = new LatLng(lat, lon);
mMap.addMarker(new MarkerOptions().position(loc).anchor(0.5f, 0.5f).icon(BitmapDescriptorFactory.fromBitmap(bm)));
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/storeinmap/StoreRouteActivity.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/storeinmap/StoreRouteActivity.java
index c4f980f..db33021 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/storeinmap/StoreRouteActivity.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/storeinmap/StoreRouteActivity.java
@@ -6,7 +6,6 @@ import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.location.Location;
-import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
@@ -24,11 +23,10 @@ import androidx.fragment.app.FragmentActivity;
import com.google.android.gms.appindexing.Action;
import com.google.android.gms.appindexing.AppIndex;
import com.google.android.gms.appindexing.Thing;
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.GooglePlayServicesUtil;
-import com.google.android.gms.common.api.GoogleApiClient;
-import com.google.android.gms.location.LocationListener;
+import com.google.android.gms.location.FusedLocationProviderClient;
+import com.google.android.gms.location.LocationCallback;
import com.google.android.gms.location.LocationRequest;
+import com.google.android.gms.location.LocationResult;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
@@ -40,9 +38,7 @@ import com.google.android.gms.maps.model.LatLngBounds;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.android.gms.maps.model.PolylineOptions;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
-
import org.json.JSONObject;
-
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@@ -57,122 +53,136 @@ import cpm.com.gskmtorange.GetterSetter.StoreBean;
import cpm.com.gskmtorange.R;
import cpm.com.gskmtorange.constant.CommonString;
-public class StoreRouteActivity extends FragmentActivity implements OnMapReadyCallback, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener {
+public class StoreRouteActivity extends FragmentActivity implements OnMapReadyCallback {
+
private Context context;
private GoogleMap mMap;
- StoreBean store;
- LatLng origin, destination;
- private final static int PLAY_SERVICES_RESOLUTION_REQUEST = 1000;
- private GoogleApiClient mGoogleApiClient;
- private LocationRequest mLocationRequest;
- private static int UPDATE_INTERVAL = 500; // 5 sec
- private static int FATEST_INTERVAL = 100; // 1 sec
- private static int DISPLACEMENT = 5; // 10 meters
- private Location mLastLocation;
- double latitude = 0.0;
- double longitude = 0.0;
- Boolean markerflag = true;
+ private StoreBean store;
+ private LatLng origin, destination;
+
+ private FusedLocationProviderClient fusedLocationClient;
+ private LocationRequest locationRequest;
+ private LocationCallback locationCallback;
+
+ private static final int LOCATION_PERMISSION_REQUEST = 1001;
+
FloatingActionButton fab_cancel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_store_route);
- fab_cancel = (FloatingActionButton) findViewById(R.id.fab_cancel);
context = this;
- fab_cancel.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- finish();
- overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
- }
+
+ fab_cancel = findViewById(R.id.fab_cancel);
+ fab_cancel.setOnClickListener(v -> {
+ finish();
+ overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
});
store = (StoreBean) getIntent().getSerializableExtra(CommonString.KEY_STORE_LIST);
- /*store.setLATITUDE("28.5420901");
- store.setLONGITUDE("77.2430997");*/
- /*store.setLATITUDE("28.544055");
- store.setLONGITUDE("77.264060");*/
- // Obtain the SupportMapFragment and get notified when the map is ready to be used.
+ fusedLocationClient = LocationServices.getFusedLocationProviderClient(this);
+
+ locationRequest = LocationRequest.create()
+ .setInterval(2000) // 2 sec
+ .setFastestInterval(1000) // 1 sec
+ .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
+
+ locationCallback = new LocationCallback() {
+ @Override
+ public void onLocationResult(@NonNull LocationResult locationResult) {
+ if (locationResult.getLastLocation() != null) {
+ Location loc = locationResult.getLastLocation();
+ updateMapWithCurrentLocation(loc);
+ }
+ }
+ };
+
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
- mapFragment.getMapAsync(this);
-
- if (checkPlayServices()) {
-
- // Building the GoogleApi client
- buildGoogleApiClient();
-
- createLocationRequest();
+ if (mapFragment != null) {
+ mapFragment.getMapAsync(this);
}
}
- private boolean checkPlayServices() {
- int resultCode = GooglePlayServicesUtil
- .isGooglePlayServicesAvailable(this);
- if (resultCode != ConnectionResult.SUCCESS) {
- if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {
- GooglePlayServicesUtil.getErrorDialog(resultCode, this,
- PLAY_SERVICES_RESOLUTION_REQUEST).show();
- } else {
- Toast.makeText(context, getResources().getString(R.string.notsuppoted)
- , Toast.LENGTH_LONG)
- .show();
- finish();
- }
+ @Override
+ public void onMapReady(GoogleMap googleMap) {
+ mMap = googleMap;
+
+ // Enable zoom controls for user
+ mMap.getUiSettings().setZoomControlsEnabled(true);
+
+ // Request permissions
+ if (checkLocationPermission()) {
+ startLocationUpdates();
+ fusedLocationClient.getLastLocation()
+ .addOnSuccessListener(this, location -> {
+ if (location != null) {
+ updateMapWithCurrentLocation(location); // show instantly with last known location
+ } else {
+ Toast.makeText(this, "Waiting for current location...", Toast.LENGTH_SHORT).show();
+ }
+ });
+ }
+ /* if (store != null) {
+ LatLng storeLoc = new LatLng(Double.parseDouble(store.getLATITUDE()), Double.parseDouble(store.getLONGITUDE()));
+ mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(storeLoc, 15));
+ }*/
+ }
+
+ private boolean checkLocationPermission() {
+ if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
+ != PackageManager.PERMISSION_GRANTED) {
+ ActivityCompat.requestPermissions(
+ this,
+ new String[]{Manifest.permission.ACCESS_FINE_LOCATION},
+ LOCATION_PERMISSION_REQUEST
+ );
return false;
}
return true;
}
- protected synchronized void buildGoogleApiClient() {
- mGoogleApiClient = new GoogleApiClient.Builder(this)
- .addConnectionCallbacks(this)
- .addOnConnectionFailedListener(this)
- .addApi(LocationServices.API).build();
- }
-
-
- protected void createLocationRequest() {
- mLocationRequest = new LocationRequest();
- mLocationRequest.setInterval(UPDATE_INTERVAL);
- mLocationRequest.setFastestInterval(FATEST_INTERVAL);
- mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
- mLocationRequest.setSmallestDisplacement(DISPLACEMENT);
- }
-
- protected void startLocationUpdates() {
-
-
- if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED
- || ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
-
- LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this);
-
+ private void startLocationUpdates() {
+ if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
+ fusedLocationClient.requestLocationUpdates(locationRequest, locationCallback, null);
}
-
}
- /**
- * Manipulates the map once available.
- * This callback is triggered when the map is ready to be used.
- * This is where we can add markers or lines, add listeners or move the camera. In this case,
- * we just add a marker near Sydney, Australia.
- * If Google Play services is not installed on the device, the user will be prompted to install
- * it inside the SupportMapFragment. This method will only be triggered once the user has
- * installed Google Play services and returned to the app.
- */
- @Override
- public void onMapReady(GoogleMap googleMap) {
- mMap = googleMap;
+ private void updateMapWithCurrentLocation(Location location) {
+ double latitude = location.getLatitude();
+ double longitude = location.getLongitude();
+
+ origin = new LatLng(latitude, longitude);
+ destination = new LatLng(Double.parseDouble(store.getLATITUDE()), Double.parseDouble(store.getLONGITUDE()));
+
+ // Show markers
+ StoreBean currentStore = new StoreBean();
+ currentStore.setLATITUDE(latitude + "");
+ currentStore.setLONGITUDE(longitude + "");
+ currentStore.setSTORE_NAME("Current Location");
+ showMarker(currentStore, R.layout.current_marker_view);
+
+ showMarker(store, R.layout.marker_view);
+
+ // Move camera to fit both points
+ LatLngBounds.Builder builder = new LatLngBounds.Builder();
+ builder.include(origin);
+ builder.include(destination);
+ mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), 100));
+
+ // Fetch and draw route
+ String url = getUrl(origin, destination);
+ new FetchUrl().execute(url);
+
+ // Stop updates once we get location
+ fusedLocationClient.removeLocationUpdates(locationCallback);
}
- public void showMarker(double lat, double lon) {
- // Add a marker and move the camera
- LinearLayout tv = (LinearLayout) this.getLayoutInflater().inflate(R.layout.marker_view, null, false);
-
- TextView desc = (TextView) tv.findViewById(R.id.tv_desc);
+ public void showMarker(StoreBean store, int layout_resource) {
+ LinearLayout tv = (LinearLayout) this.getLayoutInflater().inflate(layout_resource, null, false);
+ TextView desc = tv.findViewById(R.id.tv_desc);
desc.setText(store.getSTORE_NAME());
tv.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
@@ -180,302 +190,117 @@ public class StoreRouteActivity extends FragmentActivity implements OnMapReadyCa
tv.layout(0, 0, tv.getMeasuredWidth(), tv.getMeasuredHeight());
tv.setDrawingCacheEnabled(true);
- tv.buildDrawingCache();
Bitmap bm = tv.getDrawingCache();
+
LatLng loc = new LatLng(Double.parseDouble(store.getLATITUDE()), Double.parseDouble(store.getLONGITUDE()));
- mMap.addMarker(new MarkerOptions().position(loc).anchor(0.5f, 0.5f).icon(BitmapDescriptorFactory.fromBitmap(bm)));
+ mMap.addMarker(new MarkerOptions()
+ .position(loc)
+ .anchor(0.5f, 0.5f)
+ .icon(BitmapDescriptorFactory.fromBitmap(bm)));
}
private String getUrl(LatLng origin, LatLng dest) {
-
- // Origin of route
String str_origin = "origin=" + origin.latitude + "," + origin.longitude;
-
- // Destination of route
String str_dest = "destination=" + dest.latitude + "," + dest.longitude;
-
-
- // Sensor enabled
- String sensor = "sensor=false";
-
- // Building the parameters to the web service
- String parameters = str_origin + "&" + str_dest + "&" + sensor;
-
- // Output format
+ String parameters = str_origin + "&" + str_dest + "&sensor=false";
String output = "json";
-
- // Building the url to the web service
- String url = "https://maps.googleapis.com/maps/api/directions/" + output + "?" + parameters+"&key=AIzaSyCPo-giwVv5h8AzsbE1IDRsFsPHjVlCm5A";
-
-
- return url;
+ return "https://maps.googleapis.com/maps/api/directions/" + output + "?" + parameters + "&key=AIzaSyCPo-giwVv5h8AzsbE1IDRsFsPHjVlCm5A";
}
- /**
- * A method to download json data from url
- */
private String downloadUrl(String strUrl) throws IOException {
- String data = "";
+ StringBuilder sb = new StringBuilder();
InputStream iStream = null;
HttpURLConnection urlConnection = null;
try {
URL url = new URL(strUrl);
-
- // Creating an http connection to communicate with url
urlConnection = (HttpURLConnection) url.openConnection();
-
- // Connecting to url
urlConnection.connect();
-
- // Reading data from url
iStream = urlConnection.getInputStream();
-
BufferedReader br = new BufferedReader(new InputStreamReader(iStream));
-
- StringBuffer sb = new StringBuffer();
-
- String line = "";
+ String line;
while ((line = br.readLine()) != null) {
sb.append(line);
}
-
- data = sb.toString();
- Log.d("downloadUrl", data.toString());
br.close();
-
} catch (Exception e) {
- Log.d("Exception", e.toString());
+ Log.e("Exception", e.toString());
} finally {
- iStream.close();
- urlConnection.disconnect();
+ if (iStream != null) iStream.close();
+ if (urlConnection != null) urlConnection.disconnect();
}
- return data;
+ return sb.toString();
}
- @Override
- public void onConnected(@Nullable Bundle bundle) {
- if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
- // TODO: Consider calling
- // ActivityCompat#requestPermissions
- // here to request the missing permissions, and then overriding
- // public void onRequestPermissionsResult(int requestCode, String[] permissions,
- // int[] grantResults)
- // to handle the case where the user grants the permission. See the documentation
- // for ActivityCompat#requestPermissions for more details.
- return;
- }
- mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);
-
- if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED
- || ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
- if (mLastLocation != null) {
- latitude = mLastLocation.getLatitude();
- longitude = mLastLocation.getLongitude();
-
- mMap.setMyLocationEnabled(true);
-
- origin = new LatLng(latitude, longitude);
- destination = new LatLng(Double.parseDouble(store.getLATITUDE()), Double.parseDouble(store.getLONGITUDE()));
-
- StoreBean store1 = new StoreBean();
- store1.setLATITUDE(latitude+"");
- store1.setLONGITUDE(longitude+"");
- store1.setSTORE_NAME("Current Location");
- showMarker(store1, R.layout.current_marker_view);
-
- showMarker(store, R.layout.marker_view);
-
- LatLngBounds.Builder builder = new LatLngBounds.Builder();
- builder.include(new LatLng(Double.parseDouble(store.getLATITUDE()), Double.parseDouble(store.getLONGITUDE())));
- builder.include(new LatLng(latitude, longitude));
- //mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), 48));
- mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), 48));
-
- //destination = new LatLng(mapLat[1], mapLon[1]);
- /*mMap.moveCamera(CameraUpdateFactory.newLatLng(origin));
- mMap.animateCamera(CameraUpdateFactory.zoomTo(17));*/
-
- //new GetDirection().execute();
- // Getting URL to the Google Directions API
- String url = getUrl(origin, destination);
- Log.d("onMapClick", url.toString());
- FetchUrl FetchUrl = new FetchUrl();
-
- // Start downloading json data from Google Directions API
- FetchUrl.execute(url);
-
- }
- }
-
-
- // if (mRequestingLocationUpdates) {
- startLocationUpdates();
- }
-
- @Override
- public void onConnectionSuspended(int i) {
-
- }
-
- @Override
- public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
-
- }
-
- @Override
- public void onLocationChanged(Location location) {
-
- }
-
- public void showMarker(StoreBean store, int layout_resource){
- // Add a marker of latest location and move the camera
- LinearLayout tv = (LinearLayout) this.getLayoutInflater().inflate(layout_resource, null, false);
-
- TextView desc = (TextView) tv.findViewById(R.id.tv_desc);
- desc.setText(store.getSTORE_NAME());
-
- tv.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
- View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
- tv.layout(0, 0, tv.getMeasuredWidth(), tv.getMeasuredHeight());
-
- tv.setDrawingCacheEnabled(true);
- tv.buildDrawingCache();
- Bitmap bm = tv.getDrawingCache();
- LatLng loc = new LatLng(Double.parseDouble(store.getLATITUDE()), Double.parseDouble(store.getLONGITUDE()));
- mMap.addMarker(new MarkerOptions().position(loc).anchor(0.5f, 0.5f).icon(BitmapDescriptorFactory.fromBitmap(bm)));
-
-
- }
-
- protected void onStart() {
- super.onStart();// ATTENTION: This was auto-generated to implement the App Indexing API.
-// See https://g.co/AppIndexing/AndroidStudio for more information.
- mGoogleApiClient.connect();
- if (mGoogleApiClient != null) {
- mGoogleApiClient.connect();
- }
- // ATTENTION: This was auto-generated to implement the App Indexing API.
- // See https://g.co/AppIndexing/AndroidStudio for more information.
- // AppIndex.AppIndexApi.start(mGoogleApiClient, getIndexApiAction());
- }
-
- /**
- * ATTENTION: This was auto-generated to implement the App Indexing API.
- * See https://g.co/AppIndexing/AndroidStudio for more information.
- */
- public Action getIndexApiAction() {
- Thing object = new Thing.Builder()
- .setName("GeoTag Page") // TODO: Define a title for the content shown.
- // TODO: Make sure this auto-generated URL is correct.
- .setUrl(Uri.parse("http://[ENTER-YOUR-URL-HERE]"))
- .build();
- return new Action.Builder(Action.TYPE_VIEW)
- .setObject(object)
- .setActionStatus(Action.STATUS_TYPE_COMPLETED)
- .build();
- }
-
- // Fetches data from url passed
+ // AsyncTask to fetch directions
private class FetchUrl extends AsyncTask {
-
@Override
protected String doInBackground(String... url) {
-
- // For storing data from web service
- String data = "";
-
try {
- // Fetching the data from web service
- data = downloadUrl(url[0]);
- Log.d("Background Task data", data.toString());
- } catch (Exception e) {
- Log.d("Background Task", e.toString());
+ return downloadUrl(url[0]);
+ } catch (IOException e) {
+ Log.e("Background Task", e.toString());
+ return "";
}
- return data;
}
@Override
protected void onPostExecute(String result) {
super.onPostExecute(result);
-
- ParserTask parserTask = new ParserTask();
-
- // Invokes the thread for parsing the JSON data
- parserTask.execute(result);
-
+ Log.d("DirectionsResponse", result);
+ new ParserTask().execute(result);
}
}
- /**
- * A class to parse the Google Places in JSON format
- */
private class ParserTask extends AsyncTask>>> {
-
- // Parsing the data in non-ui thread
@Override
protected List>> doInBackground(String... jsonData) {
-
- JSONObject jObject;
- List>> routes = null;
-
try {
- jObject = new JSONObject(jsonData[0]);
- Log.d("ParserTask",jsonData[0].toString());
+ JSONObject jObject = new JSONObject(jsonData[0]);
DataParser parser = new DataParser();
- Log.d("ParserTask", parser.toString());
-
- // Starts parsing data
- routes = parser.parse(jObject);
- Log.d("ParserTask","Executing routes");
- Log.d("ParserTask",routes.toString());
-
+ return parser.parse(jObject);
} catch (Exception e) {
- Log.d("ParserTask",e.toString());
- e.printStackTrace();
+ Log.e("ParserTask", e.toString());
+ return null;
}
- return routes;
}
- // Executes in UI thread, after the parsing process
@Override
protected void onPostExecute(List>> result) {
+ if (result == null) return;
+
ArrayList points;
PolylineOptions lineOptions = null;
- // Traversing through all the routes
- for (int i = 0; i < result.size(); i++) {
+ for (List> path : result) {
points = new ArrayList<>();
lineOptions = new PolylineOptions();
- // Fetching i-th route
- List> path = result.get(i);
-
- // Fetching all the points in i-th route
- for (int j = 0; j < path.size(); j++) {
- HashMap point = path.get(j);
-
+ for (HashMap point : path) {
double lat = Double.parseDouble(point.get("lat"));
double lng = Double.parseDouble(point.get("lng"));
- LatLng position = new LatLng(lat, lng);
-
- points.add(position);
+ points.add(new LatLng(lat, lng));
}
- // Adding all the points in the route to LineOptions
lineOptions.addAll(points);
lineOptions.width(12);
lineOptions.color(Color.parseColor("#5ac614"));
-
- Log.d("onPostExecute","onPostExecute lineoptions decoded");
-
}
- // Drawing polyline in the Google Map for the i-th route
- if(lineOptions != null) {
+ if (lineOptions != null) {
mMap.addPolyline(lineOptions);
}
- else {
- Log.d("onPostExecute","without Polylines drawn");
+ }
+ }
+
+ @Override
+ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
+ @NonNull int[] grantResults) {
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults);
+ if (requestCode == LOCATION_PERMISSION_REQUEST) {
+ if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+ startLocationUpdates();
+ } else {
+ Toast.makeText(this, "Location permission required", Toast.LENGTH_SHORT).show();
}
}
}
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/upload/UploadImageWithRetrofit.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/upload/UploadImageWithRetrofit.java
index 61f4caf..681ee0c 100644
--- a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/upload/UploadImageWithRetrofit.java
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/upload/UploadImageWithRetrofit.java
@@ -15,11 +15,13 @@ import android.util.Log;
//import com.crashlytics.android.Crashlytics;
import com.google.gson.JsonSyntaxException;
+import com.squareup.okhttp.ConnectionSpec;
import com.squareup.okhttp.MediaType;
import com.squareup.okhttp.MultipartBuilder;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Protocol;
import com.squareup.okhttp.RequestBody;
+import com.squareup.okhttp.TlsVersion;
import org.json.JSONObject;
import org.ksoap2.SoapEnvelope;
@@ -144,9 +146,8 @@ public class UploadImageWithRetrofit {
if (finalFile == null) {
finalFile = originalFile;
}
-
OkHttpClient okHttpClient = new OkHttpClient();
- // okHttpClient.setProtocols(Arrays.asList(Protocol.HTTP_1_1));
+ // okHttpClient.setProtocols(Arrays.asList(Protocol.));
okHttpClient.setConnectTimeout(20, TimeUnit.SECONDS);
okHttpClient.setWriteTimeout(20, TimeUnit.SECONDS);
okHttpClient.setReadTimeout(20, TimeUnit.SECONDS);
@@ -177,7 +178,6 @@ public class UploadImageWithRetrofit {
uploadedFiles++;
} else {
status = 0;
- //uploadedFiles = 0;
}
if (status == 0) {
pd.dismiss();
@@ -202,13 +202,11 @@ public class UploadImageWithRetrofit {
}
});
-
} else {
if (totalFiles == uploadedFiles) {
//region Coverage upload status Data
new StatusUpload().execute();
}
-
}
} catch (JsonSyntaxException e) {
e.fillInStackTrace();
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/utils/OkHttpTransportSE.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/utils/OkHttpTransportSE.java
new file mode 100644
index 0000000..439561e
--- /dev/null
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/utils/OkHttpTransportSE.java
@@ -0,0 +1,112 @@
+package cpm.com.gskmtorange.utils;
+import com.squareup.okhttp.ConnectionSpec;
+import com.squareup.okhttp.MediaType;
+import com.squareup.okhttp.OkHttpClient;
+import com.squareup.okhttp.Request;
+import com.squareup.okhttp.RequestBody;
+import com.squareup.okhttp.Response;
+import com.squareup.okhttp.TlsVersion;
+import org.ksoap2.HeaderProperty;
+import org.ksoap2.SoapEnvelope;
+import org.ksoap2.transport.ServiceConnection;
+import org.ksoap2.transport.Transport;
+import org.xmlpull.v1.XmlPullParserException;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+public class OkHttpTransportSE extends Transport {
+
+ private final String url;
+ private final OkHttpClient client;
+
+ public OkHttpTransportSE(String url) {
+ this(url, 60000); // default 60s timeout
+ }
+
+ public OkHttpTransportSE(String url, int timeout) {
+ super(url, timeout);
+ this.url = url;
+
+ client = new OkHttpClient();
+
+ // Force TLS 1.2
+ ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
+ .tlsVersions(TlsVersion.TLS_1_2,
+ TlsVersion.TLS_1_1,
+ TlsVersion.TLS_1_0)
+ .build();
+
+ client.setConnectionSpecs(Collections.singletonList(spec));
+ client.setConnectTimeout(timeout, TimeUnit.MILLISECONDS);
+ client.setReadTimeout(timeout, TimeUnit.MILLISECONDS);
+ }
+
+ @Override
+ public List call(String soapAction, SoapEnvelope envelope, List headers)
+ throws IOException, XmlPullParserException {
+ return call(soapAction, envelope, headers, null);
+ }
+
+
+ @Override
+ public ServiceConnection getServiceConnection() throws IOException {
+ return null; // not used with OkHttp
+ }
+
+ @Override
+ public List call(String soapAction, SoapEnvelope envelope, List headers, File outputFile)
+ throws IOException, XmlPullParserException {
+
+ if (soapAction == null) {
+ soapAction = "";
+ }
+
+ byte[] requestData = this.createRequestData(envelope, "UTF-8");
+ this.requestDump = this.debug ? new String(requestData) : null;
+ this.responseDump = null;
+
+ // Build request
+ Request.Builder builder = new Request.Builder()
+ .url(url)
+ .addHeader("User-Agent", "ksoap2-android/2.6.0+");
+
+ if (envelope.version == SoapEnvelope.VER12) {
+ builder.addHeader("Content-Type", "application/soap+xml;charset=utf-8");
+ } else {
+ builder.addHeader("Content-Type", "text/xml;charset=utf-8");
+ builder.addHeader("SOAPAction", soapAction); // Match HttpTransportSE
+ }
+
+ // Add custom headers if any
+ if (headers != null) {
+ for (Object h : headers) {
+ HeaderProperty hp = (HeaderProperty) h;
+ if (hp.getKey() != null && hp.getValue() != null) {
+ builder.addHeader(hp.getKey(), hp.getValue());
+ }
+ }
+ }
+
+ builder.post(RequestBody.create(MediaType.parse("text/xml; charset=utf-8"), requestData));
+
+ // Execute request
+ Response response = client.newCall(builder.build()).execute();
+
+ if (!response.isSuccessful()) {
+ throw new IOException("HTTP request failed, code: " + response.code());
+ }
+
+ // Collect response headers
+ List retHeaders = new ArrayList<>();
+ for (String name : response.headers().names()) {
+ retHeaders.add(new HeaderProperty(name, response.header(name)));
+ }
+ // Parse SOAP response
+ parseResponse(envelope, response.body().byteStream());
+ return retHeaders;
+ }
+}
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/utils/ScoreItem.kt b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/utils/ScoreItem.kt
new file mode 100644
index 0000000..c514917
--- /dev/null
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/utils/ScoreItem.kt
@@ -0,0 +1,25 @@
+package cpm.com.gskmtorange.utils
+
+// ScoreItem.kt
+sealed class ScoreItem {
+ data class OverallScore(
+ val osa: String,
+ val msl: String,
+ val posm: String,
+ val sosSku: String,
+ val sosBrand: String
+ ) : ScoreItem()
+
+ data class CategoryScore(
+ val categoryName: String,
+ val msl: String,
+ val posm: String,
+ val sosSku: String,
+ val sosBrand: String,
+ val brandDetails: List> // BrandName to Value
+ ) : ScoreItem()
+
+ data class ImageItem(
+ val url: String
+ ) : ScoreItem()
+}
diff --git a/GSKMTOrange/src/main/java/cpm/com/gskmtorange/utils/TLSSocketFactory.java b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/utils/TLSSocketFactory.java
new file mode 100644
index 0000000..d94fc39
--- /dev/null
+++ b/GSKMTOrange/src/main/java/cpm/com/gskmtorange/utils/TLSSocketFactory.java
@@ -0,0 +1,78 @@
+package cpm.com.gskmtorange.utils;
+
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.SSLSocketFactory;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class TLSSocketFactory extends SSLSocketFactory {
+ private final SSLSocketFactory delegate;
+
+ public TLSSocketFactory() {
+ this.delegate = (SSLSocketFactory) SSLSocketFactory.getDefault();
+ }
+
+ @Override
+ public String[] getDefaultCipherSuites() {
+ return delegate.getDefaultCipherSuites();
+ }
+
+ @Override
+ public String[] getSupportedCipherSuites() {
+ return delegate.getSupportedCipherSuites();
+ }
+
+ @Override
+ public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException {
+ return enableModernTLS(delegate.createSocket(s, host, port, autoClose));
+ }
+
+ @Override
+ public Socket createSocket(String host, int port) throws IOException {
+ return enableModernTLS(delegate.createSocket(host, port));
+ }
+
+ @Override
+ public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException {
+ return enableModernTLS(delegate.createSocket(host, port, localHost, localPort));
+ }
+
+ @Override
+ public Socket createSocket(InetAddress host, int port) throws IOException {
+ return enableModernTLS(delegate.createSocket(host, port));
+ }
+
+ @Override
+ public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
+ return enableModernTLS(delegate.createSocket(address, port, localAddress, localPort));
+ }
+
+ private Socket enableModernTLS(Socket socket) {
+ if (socket instanceof SSLSocket) {
+ SSLSocket sslSocket = (SSLSocket) socket;
+
+ // Supported protocols on this device
+ String[] supported = sslSocket.getSupportedProtocols();
+
+ // Collect TLSv1.2 and TLSv1.3 if available
+ List enabled = new ArrayList<>();
+ for (String proto : supported) {
+ if ("TLSv1.2".equals(proto) || "TLSv1.3".equals(proto)) {
+ enabled.add(proto);
+ }
+ }
+
+ if (!enabled.isEmpty()) {
+ sslSocket.setEnabledProtocols(enabled.toArray(new String[0]));
+ }
+
+ // Debug log
+ System.out.println("Enabled protocols: " + Arrays.toString(sslSocket.getEnabledProtocols()));
+ }
+ return socket;
+ }
+}
diff --git a/GSKMTOrange/src/main/res/drawable/rectangle_realtime_card.xml b/GSKMTOrange/src/main/res/drawable/rectangle_realtime_card.xml
new file mode 100644
index 0000000..b9bbb00
--- /dev/null
+++ b/GSKMTOrange/src/main/res/drawable/rectangle_realtime_card.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GSKMTOrange/src/main/res/layout/activity_login.xml b/GSKMTOrange/src/main/res/layout/activity_login.xml
index 80b3c00..1128d4b 100644
--- a/GSKMTOrange/src/main/res/layout/activity_login.xml
+++ b/GSKMTOrange/src/main/res/layout/activity_login.xml
@@ -20,6 +20,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
+ android:visibility="gone"
android:layout_marginBottom="8dp"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GSKMTOrange/src/main/res/layout/activity_pd_realtime_report.xml b/GSKMTOrange/src/main/res/layout/activity_pd_realtime_report.xml
new file mode 100644
index 0000000..d36a239
--- /dev/null
+++ b/GSKMTOrange/src/main/res/layout/activity_pd_realtime_report.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GSKMTOrange/src/main/res/layout/activity_pd_realtime_report_detail.xml b/GSKMTOrange/src/main/res/layout/activity_pd_realtime_report_detail.xml
new file mode 100644
index 0000000..3731adf
--- /dev/null
+++ b/GSKMTOrange/src/main/res/layout/activity_pd_realtime_report_detail.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GSKMTOrange/src/main/res/layout/activity_webview.xml b/GSKMTOrange/src/main/res/layout/activity_webview.xml
new file mode 100644
index 0000000..448e9fd
--- /dev/null
+++ b/GSKMTOrange/src/main/res/layout/activity_webview.xml
@@ -0,0 +1,4 @@
+
diff --git a/GSKMTOrange/src/main/res/layout/content_ir_pog_picture.xml b/GSKMTOrange/src/main/res/layout/content_ir_pog_picture.xml
new file mode 100644
index 0000000..015ea5f
--- /dev/null
+++ b/GSKMTOrange/src/main/res/layout/content_ir_pog_picture.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
diff --git a/GSKMTOrange/src/main/res/layout/content_mpin.xml b/GSKMTOrange/src/main/res/layout/content_mpin.xml
index b5bf237..52b50a8 100644
--- a/GSKMTOrange/src/main/res/layout/content_mpin.xml
+++ b/GSKMTOrange/src/main/res/layout/content_mpin.xml
@@ -6,6 +6,7 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".password.MPinActivity"
+ android:fitsSystemWindows="true"
tools:showIn="@layout/activity_mpin">
+
+
+
+
+
diff --git a/GSKMTOrange/src/main/res/layout/item_category_score.xml b/GSKMTOrange/src/main/res/layout/item_category_score.xml
new file mode 100644
index 0000000..ee5f2c8
--- /dev/null
+++ b/GSKMTOrange/src/main/res/layout/item_category_score.xml
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GSKMTOrange/src/main/res/layout/item_overall_score.xml b/GSKMTOrange/src/main/res/layout/item_overall_score.xml
new file mode 100644
index 0000000..a12f2c0
--- /dev/null
+++ b/GSKMTOrange/src/main/res/layout/item_overall_score.xml
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GSKMTOrange/src/main/res/layout/item_pd_image.xml b/GSKMTOrange/src/main/res/layout/item_pd_image.xml
new file mode 100644
index 0000000..b784d53
--- /dev/null
+++ b/GSKMTOrange/src/main/res/layout/item_pd_image.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
diff --git a/GSKMTOrange/src/main/res/layout/item_realtime_pd.xml b/GSKMTOrange/src/main/res/layout/item_realtime_pd.xml
new file mode 100644
index 0000000..4ecc840
--- /dev/null
+++ b/GSKMTOrange/src/main/res/layout/item_realtime_pd.xml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GSKMTOrange/src/main/res/layout/item_subcategory_pd.xml b/GSKMTOrange/src/main/res/layout/item_subcategory_pd.xml
index f9398d4..d2a1527 100644
--- a/GSKMTOrange/src/main/res/layout/item_subcategory_pd.xml
+++ b/GSKMTOrange/src/main/res/layout/item_subcategory_pd.xml
@@ -5,6 +5,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">
+
+
+
diff --git a/GSKMTOrange/src/main/res/values-ar-rEG/string.xml b/GSKMTOrange/src/main/res/values-ar-rEG/string.xml
index 253e9d9..dd6538d 100644
--- a/GSKMTOrange/src/main/res/values-ar-rEG/string.xml
+++ b/GSKMTOrange/src/main/res/values-ar-rEG/string.xml
@@ -235,4 +235,5 @@
تعليق
تعليق
التواجد
+ عرض التقرير
diff --git a/GSKMTOrange/src/main/res/values/strings.xml b/GSKMTOrange/src/main/res/values/strings.xml
index d6da818..df44f75 100644
--- a/GSKMTOrange/src/main/res/values/strings.xml
+++ b/GSKMTOrange/src/main/res/values/strings.xml
@@ -52,6 +52,7 @@
Exit
Settings
Services
+ Version/Versiyon
Visibility/T2P
Category List
@@ -457,7 +458,10 @@
IR Category Images
IR Visibility Images
+ IR POG Images
IR Category Data Uploading
IR Visibilty Images Data Uploading
+ View Report
+
diff --git a/GSKMTOrange/src/main/res/xml/network_security_config.xml b/GSKMTOrange/src/main/res/xml/network_security_config.xml
index 624ed13..01fd1f8 100644
--- a/GSKMTOrange/src/main/res/xml/network_security_config.xml
+++ b/GSKMTOrange/src/main/res/xml/network_security_config.xml
@@ -1,4 +1,9 @@
-
-
-
-
\ No newline at end of file
+
+
+ gskme2.parinaam.in
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GSKMTOrange/src/test/java/cpm/com/gskmtorange/ExampleUnitTest.java b/GSKMTOrange/src/test/java/cpm/com/gskmtorange/ExampleUnitTest.java
index 34895e9..8a17fa5 100644
--- a/GSKMTOrange/src/test/java/cpm/com/gskmtorange/ExampleUnitTest.java
+++ b/GSKMTOrange/src/test/java/cpm/com/gskmtorange/ExampleUnitTest.java
@@ -4,11 +4,6 @@ import org.junit.Test;
import static org.junit.Assert.*;
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$LimitExceedListener.dex b/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$LimitExceedListener.dex
deleted file mode 100644
index 5923dff..0000000
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$LimitExceedListener.dex and /dev/null differ
diff --git a/library/build/.transforms/b0d4d1c39e3443dda94314a4e6bcabe9/results.bin b/library/build/.transforms/a1f02cef407daea7cf1927889bcba8ed/results.bin
similarity index 100%
rename from library/build/.transforms/b0d4d1c39e3443dda94314a4e6bcabe9/results.bin
rename to library/build/.transforms/a1f02cef407daea7cf1927889bcba8ed/results.bin
diff --git a/library/build/.transforms/b0d4d1c39e3443dda94314a4e6bcabe9/transformed/classes/classes_dex/classes.dex b/library/build/.transforms/a1f02cef407daea7cf1927889bcba8ed/transformed/classes/classes_dex/classes.dex
similarity index 99%
rename from library/build/.transforms/b0d4d1c39e3443dda94314a4e6bcabe9/transformed/classes/classes_dex/classes.dex
rename to library/build/.transforms/a1f02cef407daea7cf1927889bcba8ed/transformed/classes/classes_dex/classes.dex
index 243a064..37b27c5 100644
Binary files a/library/build/.transforms/b0d4d1c39e3443dda94314a4e6bcabe9/transformed/classes/classes_dex/classes.dex and b/library/build/.transforms/a1f02cef407daea7cf1927889bcba8ed/transformed/classes/classes_dex/classes.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/results.bin b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/results.bin
similarity index 100%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/results.bin
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/results.bin
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/KeyPairBoolData.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/KeyPairBoolData.dex
similarity index 90%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/KeyPairBoolData.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/KeyPairBoolData.dex
index 72a3ffe..9a58895 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/KeyPairBoolData.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/KeyPairBoolData.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinner$1.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinner$1.dex
similarity index 90%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinner$1.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinner$1.dex
index 5cb13fa..beff045 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinner$1.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinner$1.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinner.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinner.dex
similarity index 97%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinner.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinner.dex
index 23b8d6c..2b67590 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinner.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinner.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerListener.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerListener.dex
similarity index 80%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerListener.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerListener.dex
index 6c65faa..f60e3ae 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerListener.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerListener.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$1.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$1.dex
similarity index 92%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$1.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$1.dex
index 104f5e4..e9d1ce6 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$1.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$1.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$2.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$2.dex
similarity index 92%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$2.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$2.dex
index c62e280..30fff00 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$2.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$2.dex differ
diff --git a/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$LimitExceedListener.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$LimitExceedListener.dex
new file mode 100644
index 0000000..4647c9d
Binary files /dev/null and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$LimitExceedListener.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$1.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$1.dex
similarity index 96%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$1.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$1.dex
index 81daba3..100fd2f 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$1.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$1.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$2.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$2.dex
similarity index 96%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$2.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$2.dex
index 141d355..b6c6141 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$2.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$2.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$ViewHolder.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$ViewHolder.dex
similarity index 90%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$ViewHolder.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$ViewHolder.dex
index ef9af4b..e771e5b 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$ViewHolder.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter$ViewHolder.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter.dex
similarity index 97%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter.dex
index 82fe9de..a2fd407 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch$MyAdapter.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch.dex
similarity index 86%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch.dex
index 64fb250..53ebdca 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/MultiSpinnerSearch.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$1.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$1.dex
similarity index 92%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$1.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$1.dex
index 4b2a348..be329a1 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$1.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$1.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter$1.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter$1.dex
similarity index 96%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter$1.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter$1.dex
index 9b390f1..b48b67d 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter$1.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter$1.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter$ViewHolder.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter$ViewHolder.dex
similarity index 90%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter$ViewHolder.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter$ViewHolder.dex
index bd53f44..9f1e8c6 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter$ViewHolder.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter$ViewHolder.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter.dex
similarity index 96%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter.dex
index 41b6dc8..9355683 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner$MyAdapter.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner.dex
similarity index 98%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner.dex
index a1f3616..740bf4b 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinner.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$1.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$1.dex
similarity index 92%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$1.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$1.dex
index 71f7156..16213c2 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$1.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$1.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$2.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$2.dex
similarity index 92%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$2.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$2.dex
index a7ad8c7..4998629 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$2.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$2.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$1.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$1.dex
similarity index 96%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$1.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$1.dex
index 641472b..d66e904 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$1.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$1.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$2.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$2.dex
similarity index 96%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$2.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$2.dex
index 0c6b36e..26c2be9 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$2.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$2.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$ViewHolder.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$ViewHolder.dex
similarity index 76%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$ViewHolder.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$ViewHolder.dex
index e8925f7..fa4a2d2 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$ViewHolder.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter$ViewHolder.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter.dex
similarity index 97%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter.dex
index a08af35..d944103 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch$MyAdapter.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch.dex
similarity index 98%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch.dex
index 911741e..af048d6 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SingleSpinnerSearch.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SpinnerListener.dex b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SpinnerListener.dex
similarity index 85%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SpinnerListener.dex
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SpinnerListener.dex
index 8488f30..5eb3e27 100644
Binary files a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SpinnerListener.dex and b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/bundleLibRuntimeToDirRelease_dex/com/androidbuts/multispinnerfilter/SpinnerListener.dex differ
diff --git a/library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/desugar_graph.bin b/library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/desugar_graph.bin
similarity index 100%
rename from library/build/.transforms/5f026ab275f9e9d1434019530aa35201/transformed/bundleLibRuntimeToDirRelease/desugar_graph.bin
rename to library/build/.transforms/eb7e9d9c1e5fb46d6a941e27ceb32052/transformed/bundleLibRuntimeToDirRelease/desugar_graph.bin
diff --git a/library/build/intermediates/incremental/release/packageReleaseResources/compile-file-map.properties b/library/build/intermediates/incremental/release/packageReleaseResources/compile-file-map.properties
index 4807bec..68775d8 100644
--- a/library/build/intermediates/incremental/release/packageReleaseResources/compile-file-map.properties
+++ b/library/build/intermediates/incremental/release/packageReleaseResources/compile-file-map.properties
@@ -1,4 +1,4 @@
-#Tue Jul 29 16:36:46 IST 2025
+#Thu Sep 25 11:55:29 IST 2025
com.androidbuts.multispinnerfilter.library-main-5\:/layout/textview_for_spinner.xml=D\:\\Haleon_Egypt_PD_Git\\library\\build\\intermediates\\packaged_res\\release\\packageReleaseResources\\layout\\textview_for_spinner.xml
com.androidbuts.multispinnerfilter.library-main-5\:/layout/activity_main.xml=D\:\\Haleon_Egypt_PD_Git\\library\\build\\intermediates\\packaged_res\\release\\packageReleaseResources\\layout\\activity_main.xml
com.androidbuts.multispinnerfilter.library-main-5\:/layout/alert_dialog_listview_search.xml=D\:\\Haleon_Egypt_PD_Git\\library\\build\\intermediates\\packaged_res\\release\\packageReleaseResources\\layout\\alert_dialog_listview_search.xml