banner_module
This commit is contained in:
Generated
+109
@@ -352,6 +352,18 @@
|
|||||||
<option name="screenX" value="1080" />
|
<option name="screenX" value="1080" />
|
||||||
<option name="screenY" value="2340" />
|
<option name="screenY" value="2340" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="33" />
|
||||||
|
<option name="brand" value="samsung" />
|
||||||
|
<option name="codename" value="a32" />
|
||||||
|
<option name="id" value="a32" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Samsung" />
|
||||||
|
<option name="name" value="Galaxy A32" />
|
||||||
|
<option name="screenDensity" value="420" />
|
||||||
|
<option name="screenX" value="1080" />
|
||||||
|
<option name="screenY" value="2400" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="36" />
|
<option name="api" value="36" />
|
||||||
<option name="brand" value="samsung" />
|
<option name="brand" value="samsung" />
|
||||||
@@ -568,6 +580,11 @@
|
|||||||
<option name="screenDensity" value="420" />
|
<option name="screenDensity" value="420" />
|
||||||
<option name="screenX" value="1080" />
|
<option name="screenX" value="1080" />
|
||||||
<option name="screenY" value="2410" />
|
<option name="screenY" value="2410" />
|
||||||
|
<option name="tags">
|
||||||
|
<list>
|
||||||
|
<option value="dda-default" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="32" />
|
<option name="api" value="32" />
|
||||||
@@ -665,6 +682,18 @@
|
|||||||
<option name="screenX" value="2076" />
|
<option name="screenX" value="2076" />
|
||||||
<option name="screenY" value="2152" />
|
<option name="screenY" value="2152" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="36" />
|
||||||
|
<option name="brand" value="google" />
|
||||||
|
<option name="codename" value="comet" />
|
||||||
|
<option name="id" value="comet" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Google" />
|
||||||
|
<option name="name" value="Pixel 9 Pro Fold" />
|
||||||
|
<option name="screenDensity" value="390" />
|
||||||
|
<option name="screenX" value="2076" />
|
||||||
|
<option name="screenY" value="2152" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="35" />
|
<option name="api" value="35" />
|
||||||
<option name="brand" value="motorola" />
|
<option name="brand" value="motorola" />
|
||||||
@@ -893,6 +922,18 @@
|
|||||||
<option name="screenX" value="2208" />
|
<option name="screenX" value="2208" />
|
||||||
<option name="screenY" value="1840" />
|
<option name="screenY" value="1840" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="36" />
|
||||||
|
<option name="brand" value="google" />
|
||||||
|
<option name="codename" value="felix" />
|
||||||
|
<option name="id" value="felix" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Google" />
|
||||||
|
<option name="name" value="Pixel Fold" />
|
||||||
|
<option name="screenDensity" value="420" />
|
||||||
|
<option name="screenX" value="2208" />
|
||||||
|
<option name="screenY" value="1840" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="33" />
|
<option name="api" value="33" />
|
||||||
<option name="brand" value="google" />
|
<option name="brand" value="google" />
|
||||||
@@ -965,6 +1006,11 @@
|
|||||||
<option name="screenDensity" value="420" />
|
<option name="screenDensity" value="420" />
|
||||||
<option name="screenX" value="1080" />
|
<option name="screenX" value="1080" />
|
||||||
<option name="screenY" value="2424" />
|
<option name="screenY" value="2424" />
|
||||||
|
<option name="tags">
|
||||||
|
<list>
|
||||||
|
<option value="dda-default" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="34" />
|
<option name="api" value="34" />
|
||||||
@@ -1014,6 +1060,19 @@
|
|||||||
<option name="screenX" value="1200" />
|
<option name="screenX" value="1200" />
|
||||||
<option name="screenY" value="1920" />
|
<option name="screenY" value="1920" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="36" />
|
||||||
|
<option name="brand" value="samsung" />
|
||||||
|
<option name="codename" value="gts10pwifi" />
|
||||||
|
<option name="formFactor" value="Tablet" />
|
||||||
|
<option name="id" value="gts10pwifi" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Samsung" />
|
||||||
|
<option name="name" value="Galaxy Tab S10+" />
|
||||||
|
<option name="screenDensity" value="320" />
|
||||||
|
<option name="screenX" value="1752" />
|
||||||
|
<option name="screenY" value="2800" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="33" />
|
<option name="api" value="33" />
|
||||||
<option name="brand" value="samsung" />
|
<option name="brand" value="samsung" />
|
||||||
@@ -1292,6 +1351,11 @@
|
|||||||
<option name="screenDensity" value="390" />
|
<option name="screenDensity" value="390" />
|
||||||
<option name="screenX" value="1080" />
|
<option name="screenX" value="1080" />
|
||||||
<option name="screenY" value="2404" />
|
<option name="screenY" value="2404" />
|
||||||
|
<option name="tags">
|
||||||
|
<list>
|
||||||
|
<option value="dda-default" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="34" />
|
<option name="api" value="34" />
|
||||||
@@ -1389,6 +1453,11 @@
|
|||||||
<option name="screenDensity" value="450" />
|
<option name="screenDensity" value="450" />
|
||||||
<option name="screenX" value="1080" />
|
<option name="screenX" value="1080" />
|
||||||
<option name="screenY" value="2340" />
|
<option name="screenY" value="2340" />
|
||||||
|
<option name="tags">
|
||||||
|
<list>
|
||||||
|
<option value="dda-default" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="36" />
|
<option name="api" value="36" />
|
||||||
@@ -1402,6 +1471,11 @@
|
|||||||
<option name="screenDensity" value="450" />
|
<option name="screenDensity" value="450" />
|
||||||
<option name="screenX" value="1080" />
|
<option name="screenX" value="1080" />
|
||||||
<option name="screenY" value="2340" />
|
<option name="screenY" value="2340" />
|
||||||
|
<option name="tags">
|
||||||
|
<list>
|
||||||
|
<option value="dda-default" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="33" />
|
<option name="api" value="33" />
|
||||||
@@ -1427,6 +1501,18 @@
|
|||||||
<option name="screenX" value="1440" />
|
<option name="screenX" value="1440" />
|
||||||
<option name="screenY" value="3120" />
|
<option name="screenY" value="3120" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="36" />
|
||||||
|
<option name="brand" value="samsung" />
|
||||||
|
<option name="codename" value="q4qksx" />
|
||||||
|
<option name="id" value="q4qksx" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Samsung" />
|
||||||
|
<option name="name" value="Galaxy Z Fold4" />
|
||||||
|
<option name="screenDensity" value="420" />
|
||||||
|
<option name="screenX" value="1812" />
|
||||||
|
<option name="screenY" value="2176" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="34" />
|
<option name="api" value="34" />
|
||||||
<option name="brand" value="samsung" />
|
<option name="brand" value="samsung" />
|
||||||
@@ -1597,6 +1683,11 @@
|
|||||||
<option name="screenDensity" value="390" />
|
<option name="screenDensity" value="390" />
|
||||||
<option name="screenX" value="2076" />
|
<option name="screenX" value="2076" />
|
||||||
<option name="screenY" value="2152" />
|
<option name="screenY" value="2152" />
|
||||||
|
<option name="tags">
|
||||||
|
<list>
|
||||||
|
<option value="dda-default" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="30" />
|
<option name="api" value="30" />
|
||||||
@@ -1609,6 +1700,11 @@
|
|||||||
<option name="screenDensity" value="440" />
|
<option name="screenDensity" value="440" />
|
||||||
<option name="screenX" value="1080" />
|
<option name="screenX" value="1080" />
|
||||||
<option name="screenY" value="2340" />
|
<option name="screenY" value="2340" />
|
||||||
|
<option name="tags">
|
||||||
|
<list>
|
||||||
|
<option value="default" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="34" />
|
<option name="api" value="34" />
|
||||||
@@ -1671,6 +1767,19 @@
|
|||||||
<option name="screenX" value="1600" />
|
<option name="screenX" value="1600" />
|
||||||
<option name="screenY" value="2560" />
|
<option name="screenY" value="2560" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="36" />
|
||||||
|
<option name="brand" value="google" />
|
||||||
|
<option name="codename" value="tangorpro" />
|
||||||
|
<option name="formFactor" value="Tablet" />
|
||||||
|
<option name="id" value="tangorpro" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Google" />
|
||||||
|
<option name="name" value="Pixel Tablet" />
|
||||||
|
<option name="screenDensity" value="320" />
|
||||||
|
<option name="screenX" value="1600" />
|
||||||
|
<option name="screenY" value="2560" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="35" />
|
<option name="api" value="35" />
|
||||||
<option name="brand" value="google" />
|
<option name="brand" value="google" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ apply plugin: 'com.google.firebase.crashlytics'
|
|||||||
apply plugin: 'org.jetbrains.kotlin.android'
|
apply plugin: 'org.jetbrains.kotlin.android'
|
||||||
android {
|
android {
|
||||||
namespace("cpm.com.gskmtorange")
|
namespace("cpm.com.gskmtorange")
|
||||||
compileSdk(35)
|
compileSdk 36
|
||||||
|
|
||||||
lintOptions {
|
lintOptions {
|
||||||
checkReleaseBuilds false
|
checkReleaseBuilds false
|
||||||
@@ -126,6 +126,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation 'androidx.activity:activity-ktx:1.13.0'
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
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.0.0-jar-with-dependencies.jar')
|
||||||
// implementation files('libs/ksoap2-android-assembly-3.6.4.jar')
|
// implementation files('libs/ksoap2-android-assembly-3.6.4.jar')
|
||||||
|
|||||||
@@ -46,29 +46,33 @@
|
|||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:largeHeap="true"
|
android:largeHeap="true"
|
||||||
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
android:supportsRtl="false"
|
android:supportsRtl="false"
|
||||||
android:networkSecurityConfig="@xml/network_security_config"
|
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
tools:replace="android:supportsRtl">
|
tools:replace="android:supportsRtl">
|
||||||
|
<activity
|
||||||
|
android:name=".dailyentry.BannerActivity"
|
||||||
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/AppTheme.NoActionBar"
|
||||||
|
android:windowSoftInputMode="adjustPan"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".dailyentry.PD_Realtime_Report_Detail"
|
android:name=".dailyentry.PD_Realtime_Report_Detail"
|
||||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppTheme.NoActionBar"
|
android:theme="@style/AppTheme.NoActionBar"
|
||||||
android:windowSoftInputMode="adjustPan"
|
android:windowSoftInputMode="adjustPan"
|
||||||
tools:ignore="DiscouragedApi,LockedOrientationActivity"/>
|
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".dailyentry.PD_Realtime_Report"
|
android:name=".dailyentry.PD_Realtime_Report"
|
||||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppTheme.NoActionBar"
|
android:theme="@style/AppTheme.NoActionBar"
|
||||||
android:windowSoftInputMode="adjustPan"
|
android:windowSoftInputMode="adjustPan"
|
||||||
tools:ignore="DiscouragedApi,LockedOrientationActivity"/>
|
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".dailyentry.WebViewActivity"
|
android:name=".dailyentry.WebViewActivity"
|
||||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ import android.database.sqlite.SQLiteOpenHelper;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -69,6 +72,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockStorewiseGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockStorewiseGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingSubCategoryImageAllowGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingSubCategoryImageAllowGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MasterDetailerGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.Master_Storelist_PDA_GetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.Master_Storelist_PDA_GetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraDataGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraDataGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraLastVisitGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraLastVisitGetterSetter;
|
||||||
@@ -146,6 +150,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.execSQL(TableBean.getJourneyPlan());
|
db.execSQL(TableBean.getJourneyPlan());
|
||||||
db.execSQL(TableBean.getAdhocJourneyPlan());
|
db.execSQL(TableBean.getAdhocJourneyPlan());
|
||||||
//Gagan Start
|
//Gagan Start
|
||||||
|
db.execSQL(TableBean.getTable_MASTER_DETAILER());
|
||||||
db.execSQL(TableBean.getBrandMaster());
|
db.execSQL(TableBean.getBrandMaster());
|
||||||
db.execSQL(TableBean.getSkuMaster());
|
db.execSQL(TableBean.getSkuMaster());
|
||||||
db.execSQL(TableBean.getCategoryMaster());
|
db.execSQL(TableBean.getCategoryMaster());
|
||||||
@@ -193,6 +198,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_STORE_CAMERA);
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_STORE_CAMERA);
|
||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_CATEGORY_PICTURE_LIST);
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_CATEGORY_PICTURE_LIST);
|
||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_CATEGORY_PICTURE);
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_CATEGORY_PICTURE);
|
||||||
|
db.execSQL(CommonString.CREATE_TABLE_WEBVIEW_TIME_SPENT);
|
||||||
db.execSQL(TableBean.getMappingSubCategoryImageAllow());
|
db.execSQL(TableBean.getMappingSubCategoryImageAllow());
|
||||||
db.execSQL(TableBean.getMappingCategoryImageAllow());
|
db.execSQL(TableBean.getMappingCategoryImageAllow());
|
||||||
db.execSQL(TableBean.getSkugroupMaster());
|
db.execSQL(TableBean.getSkugroupMaster());
|
||||||
@@ -254,7 +260,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
e.fillInStackTrace();
|
e.fillInStackTrace();
|
||||||
Toast.makeText(context, "Error -" + e.toString(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, "Error -" + e.toString(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -338,7 +343,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.delete(CommonString.TABLE_INSERT_PROMO_SKUWISE, null, null);
|
db.delete(CommonString.TABLE_INSERT_PROMO_SKUWISE, null, null);
|
||||||
db.delete(CommonString.TABLE_INSERT_PROMO_SKUWISE_EXISTS, null, null);
|
db.delete(CommonString.TABLE_INSERT_PROMO_SKUWISE_EXISTS, null, null);
|
||||||
//Gagan end code
|
//Gagan end code
|
||||||
|
|
||||||
db.delete(CommonString.TABLE_INSERT_T2P_COMPLIANCE, null, null);
|
db.delete(CommonString.TABLE_INSERT_T2P_COMPLIANCE, null, null);
|
||||||
db.delete(CommonString.TABLE_INSERT_T2P_GAPS, null, null);
|
db.delete(CommonString.TABLE_INSERT_T2P_GAPS, null, null);
|
||||||
db.delete(CommonString.TABLE_INSERT_T2P_SKU, null, null);
|
db.delete(CommonString.TABLE_INSERT_T2P_SKU, null, null);
|
||||||
@@ -375,14 +379,10 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
for (int i = 0; i < data.getSTORE_ID().size(); i++) {
|
for (int i = 0; i < data.getSTORE_ID().size(); i++) {
|
||||||
|
|
||||||
values.put("STORE_ID", data.getSTORE_ID().get(i));
|
values.put("STORE_ID", data.getSTORE_ID().get(i));
|
||||||
values.put("EMP_ID", data.getEMP_ID().get(i));
|
values.put("EMP_ID", data.getEMP_ID().get(i));
|
||||||
|
|
||||||
values.put("STORE_NAME", data.getSTORE_NAME().get(i));
|
values.put("STORE_NAME", data.getSTORE_NAME().get(i));
|
||||||
|
|
||||||
values.put("CITY", data.getCITY().get(i));
|
values.put("CITY", data.getCITY().get(i));
|
||||||
|
|
||||||
values.put("VISIT_DATE", data.getVISIT_DATE().get(i));
|
values.put("VISIT_DATE", data.getVISIT_DATE().get(i));
|
||||||
|
|
||||||
values.put("ADDRESS", data.getADDRESS().get(i));
|
values.put("ADDRESS", data.getADDRESS().get(i));
|
||||||
@@ -393,7 +393,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
values.put("KEYACCOUNT_ID", data.getKEYACCOUNT_ID().get(i));
|
values.put("KEYACCOUNT_ID", data.getKEYACCOUNT_ID().get(i));
|
||||||
|
|
||||||
|
|
||||||
values.put("STORETYPE_ID", data.getSTORETYPE_ID().get(i));
|
values.put("STORETYPE_ID", data.getSTORETYPE_ID().get(i));
|
||||||
|
|
||||||
values.put("CHECKOUT_STATUS", data.getCHECKOUT_STATUS().get(i));
|
values.put("CHECKOUT_STATUS", data.getCHECKOUT_STATUS().get(i));
|
||||||
@@ -1364,7 +1363,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
dbcursor.moveToFirst();
|
dbcursor.moveToFirst();
|
||||||
while (!dbcursor.isAfterLast()) {
|
while (!dbcursor.isAfterLast()) {
|
||||||
CategoryGetterSetter cd = new CategoryGetterSetter();
|
CategoryGetterSetter cd = new CategoryGetterSetter();
|
||||||
|
|
||||||
cd.setCategory_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CATEGORY_ID")));
|
cd.setCategory_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CATEGORY_ID")));
|
||||||
cd.setCategory(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CATEGORY")));
|
cd.setCategory(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CATEGORY")));
|
||||||
cd.setCategory_img(-1);
|
cd.setCategory_img(-1);
|
||||||
@@ -7649,10 +7647,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
dbcursor.moveToFirst();
|
dbcursor.moveToFirst();
|
||||||
while (!dbcursor.isAfterLast()) {
|
while (!dbcursor.isAfterLast()) {
|
||||||
MSL_AvailabilityStockFacingGetterSetter cd = new MSL_AvailabilityStockFacingGetterSetter();
|
MSL_AvailabilityStockFacingGetterSetter cd = new MSL_AvailabilityStockFacingGetterSetter();
|
||||||
|
|
||||||
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||||
cd.setSub_category(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
cd.setSub_category(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
||||||
|
|
||||||
list.add(cd);
|
list.add(cd);
|
||||||
dbcursor.moveToNext();
|
dbcursor.moveToNext();
|
||||||
}
|
}
|
||||||
@@ -8915,7 +8911,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
dbcursor = db.rawQuery("SELECT * from GEO_FENCING where COUNTRY_ID ='" + country_id + "'", null);
|
dbcursor = db.rawQuery("SELECT * from GEO_FENCING where COUNTRY_ID ='" + country_id + "'", null);
|
||||||
|
|
||||||
if (dbcursor != null) {
|
if (dbcursor != null) {
|
||||||
dbcursor.moveToFirst();
|
dbcursor.moveToFirst();
|
||||||
while (!dbcursor.isAfterLast()) {
|
while (!dbcursor.isAfterLast()) {
|
||||||
@@ -8936,13 +8931,10 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
dbcursor.close();
|
dbcursor.close();
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.d("Excep get geofencing!", e.toString());
|
Log.d("Excep get geofencing!", e.toString());
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11091,6 +11083,25 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void InsertMasterDetailerData(MasterDetailerGetterSetter data) {
|
||||||
|
db.delete("MASTER_DETAILER", null, null);
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
try {
|
||||||
|
for (int i = 0; i < data.getDTID().size(); i++) {
|
||||||
|
values.put("DTID", data.getDTID().get(i));
|
||||||
|
values.put("DT_LEVEL", data.getDT_LEVEL().get(i));
|
||||||
|
values.put("DT_NAME", data.getDT_NAME().get(i));
|
||||||
|
values.put("CATEGORY_ID", data.getCATEGORY_ID().get(i));
|
||||||
|
values.put("DT_URL", data.getDT_URL().get(i));
|
||||||
|
values.put("DT_THUMBNAIL", data.getDT_THUMBNAIL().get(i));
|
||||||
|
db.insert("MASTER_DETAILER", null, values);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", "MASTER_DETAILER" + ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*public void InsertNoticeBoardData(NoticeboardGetterSetter data) {
|
/*public void InsertNoticeBoardData(NoticeboardGetterSetter data) {
|
||||||
db.delete("Mer_NoticeBoard", null, null);
|
db.delete("Mer_NoticeBoard", null, null);
|
||||||
ContentValues values = new ContentValues();
|
ContentValues values = new ContentValues();
|
||||||
@@ -11828,6 +11839,44 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long insertWebViewTimeSpent(String storeId, String visitDate, String startTime, String endTime, String duration, String noticeboardId, String userId, String categoryId) {
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
values.put("STORE_ID", storeId);
|
||||||
|
values.put("VISIT_DATE", visitDate);
|
||||||
|
values.put("START_TIME", startTime);
|
||||||
|
values.put("END_TIME", endTime);
|
||||||
|
values.put("DURATION", duration);
|
||||||
|
values.put("NOTICEBOARD_ID", noticeboardId);
|
||||||
|
values.put("USER_ID", userId);
|
||||||
|
values.put("CATEGORY_ID", categoryId);
|
||||||
|
return db.insert(CommonString.TABLE_WEBVIEW_TIME_SPENT, null, values);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<MasterDetailerGetterSetter> getMasterDetailerData(String tableName) {
|
||||||
|
ArrayList<MasterDetailerGetterSetter> list = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
String query = "SELECT * FROM " + tableName;
|
||||||
|
try (Cursor cursor = db.rawQuery(query, null)) {
|
||||||
|
while (cursor != null && cursor.moveToNext()) {
|
||||||
|
MasterDetailerGetterSetter sb = new MasterDetailerGetterSetter();
|
||||||
|
sb.setDTID(cursor.getString(cursor.getColumnIndexOrThrow("DTID")));
|
||||||
|
sb.setDT_LEVEL(cursor.getString(cursor.getColumnIndexOrThrow("DT_LEVEL")));
|
||||||
|
sb.setCATEGORY_ID(cursor.getString(cursor.getColumnIndexOrThrow("CATEGORY_ID")));
|
||||||
|
sb.setDT_NAME(cursor.getString(cursor.getColumnIndexOrThrow("DT_NAME")));
|
||||||
|
sb.setDT_THUMBNAIL(cursor.getString(cursor.getColumnIndexOrThrow("DT_THUMBNAIL")));
|
||||||
|
sb.setDT_URL(cursor.getString(cursor.getColumnIndexOrThrow("DT_URL")));
|
||||||
|
list.add(sb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e("DB_ERROR", "Error fetching MasterDetailer data", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -656,12 +656,6 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
|||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ATTENTION: This was auto-generated to implement the App Indexing API.
|
|
||||||
* See https://g.co/AppIndexing/AndroidStudio for more information.
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
public class GeoTagUpload extends AsyncTask<Void, Void, String> {
|
public class GeoTagUpload extends AsyncTask<Void, Void, String> {
|
||||||
|
|
||||||
|
|||||||
@@ -702,9 +702,9 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
editor.putString("NOTICEBOARD_DATA", noticeJson);
|
editor.putString("NOTICEBOARD_DATA", noticeJson);
|
||||||
editor.apply();
|
editor.apply();
|
||||||
|
|
||||||
} else {
|
} /*else {
|
||||||
return CommonString.KEY_FAILURE;
|
return CommonString.KEY_FAILURE;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
editor.putString(CommonString.KEY_USERNAME, userid);
|
editor.putString(CommonString.KEY_USERNAME, userid);
|
||||||
@@ -814,7 +814,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String safe(ArrayList<String> list, int index) {
|
private String safe(ArrayList<String> list, int index) {
|
||||||
if (list == null || list.size() <= index || list.get(index) == null) {
|
if (list == null || list.size() <= index || list.get(index) == null) {
|
||||||
return "";
|
return "";
|
||||||
@@ -830,56 +829,12 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
AlertDialog alert = builder.create();
|
AlertDialog alert = builder.create();
|
||||||
alert.show();
|
alert.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static String arabicToenglish(String number) {
|
|
||||||
char[] chars = new char[number.length()];
|
|
||||||
for (int i = 0; i < number.length(); i++) {
|
|
||||||
char ch = number.charAt(i);
|
|
||||||
if (ch >= 0x0660 && ch <= 0x0669)
|
|
||||||
ch -= 0x0660 - '0';
|
|
||||||
else if (ch >= 0x06f0 && ch <= 0x06F9)
|
|
||||||
ch -= 0x06f0 - '0';
|
|
||||||
chars[i] = ch;
|
|
||||||
}
|
|
||||||
return new String(chars);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCurrentTimeNotUsed() {
|
|
||||||
Calendar m_cal = Calendar.getInstance();
|
|
||||||
|
|
||||||
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
|
|
||||||
String cdate = formatter.format(m_cal.getTime());
|
|
||||||
|
|
||||||
if (preferences.getString(CommonString.KEY_LANGUAGE, "").equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_KSA)) {
|
|
||||||
cdate = arabicToenglish(cdate);
|
|
||||||
} else if (preferences.getString(CommonString.KEY_LANGUAGE, "").equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_UAE)) {
|
|
||||||
cdate = arabicToenglish(cdate);
|
|
||||||
} else if (preferences.getString(CommonString.KEY_LANGUAGE, "").equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_JORDAN)) {
|
|
||||||
cdate = arabicToenglish(cdate);
|
|
||||||
} else if (preferences.getString(CommonString.KEY_LANGUAGE, "").equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_KUWAIT)) {
|
|
||||||
cdate = arabicToenglish(cdate);
|
|
||||||
} else if (preferences.getString(CommonString.KEY_LANGUAGE, "").equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_BAHRAIN)) {
|
|
||||||
cdate = arabicToenglish(cdate);
|
|
||||||
} else if (preferences.getString(CommonString.KEY_LANGUAGE, "").equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_OMAN)) {
|
|
||||||
cdate = arabicToenglish(cdate);
|
|
||||||
} else if (preferences.getString(CommonString.KEY_LANGUAGE, "").equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_QATAR)) {
|
|
||||||
cdate = arabicToenglish(cdate);
|
|
||||||
} else if (preferences.getString(CommonString.KEY_LANGUAGE, "").equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_LEBANON)) {
|
|
||||||
cdate = arabicToenglish(cdate);
|
|
||||||
} else if (preferences.getString(CommonString.KEY_LANGUAGE, "").equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_LIBIYA)) {
|
|
||||||
cdate = arabicToenglish(cdate);
|
|
||||||
}
|
|
||||||
return cdate;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void setDataFromSharedPreferences(LoginGetterSetter lgs) {
|
private void setDataFromSharedPreferences(LoginGetterSetter lgs) {
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
String jsonCurProduct = gson.toJson(lgs);
|
String jsonCurProduct = gson.toJson(lgs);
|
||||||
@@ -890,7 +845,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
|
|
||||||
void checkAppPermission(String permission, int requestCode) {
|
void checkAppPermission(String permission, int requestCode) {
|
||||||
|
|
||||||
boolean permission_flag = false;
|
|
||||||
// Here, thisActivity is the current activity
|
// Here, thisActivity is the current activity
|
||||||
if (ContextCompat.checkSelfPermission(LoginActivity.this,
|
if (ContextCompat.checkSelfPermission(LoginActivity.this,
|
||||||
permission)
|
permission)
|
||||||
@@ -900,19 +854,12 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
// Should we show an explanation?
|
// Should we show an explanation?
|
||||||
if (ActivityCompat.shouldShowRequestPermissionRationale(LoginActivity.this,
|
if (ActivityCompat.shouldShowRequestPermissionRationale(LoginActivity.this,
|
||||||
permission)) {
|
permission)) {
|
||||||
// Show an explanation to the user *asynchronously* -- don't block
|
|
||||||
// this thread waiting for the user's response! After the user
|
|
||||||
// sees the explanation, try again to request the permission.
|
|
||||||
showOnPermissiondenied(Manifest.permission.CAMERA, MY_PERMISSIONS_REQUEST_CAMERA, 1);
|
showOnPermissiondenied(Manifest.permission.CAMERA, MY_PERMISSIONS_REQUEST_CAMERA, 1);
|
||||||
} else {
|
} else {
|
||||||
// No explanation needed; request the permission
|
// No explanation needed; request the permission
|
||||||
ActivityCompat.requestPermissions(LoginActivity.this,
|
ActivityCompat.requestPermissions(LoginActivity.this,
|
||||||
new String[]{permission},
|
new String[]{permission},
|
||||||
requestCode);
|
requestCode);
|
||||||
|
|
||||||
// MY_PERMISSIONS_REQUEST_READ_CONTACTS is an
|
|
||||||
// app-defined int constant. The callback method gets the
|
|
||||||
// result of the request.
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Permission has already been granted
|
// Permission has already been granted
|
||||||
@@ -962,13 +909,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/* builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
dialog.cancel();
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});*/
|
|
||||||
builder.show();
|
builder.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1001,8 +941,8 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED
|
if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED
|
||||||
&& ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
&& ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||||
ActivityCompat.requestPermissions(LoginActivity.this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, 1);
|
ActivityCompat.requestPermissions(LoginActivity.this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, 1);
|
||||||
ActivityCompat.requestPermissions(LoginActivity.this, new String[]{android.Manifest.permission.ACCESS_COARSE_LOCATION}, 2);
|
ActivityCompat.requestPermissions(LoginActivity.this, new String[]{android.Manifest.permission.ACCESS_COARSE_LOCATION}, 2);
|
||||||
}
|
}
|
||||||
@@ -1017,8 +957,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
GooglePlayServicesUtil.getErrorDialog(resultCode, this,
|
GooglePlayServicesUtil.getErrorDialog(resultCode, this,
|
||||||
PLAY_SERVICES_RESOLUTION_REQUEST).show();
|
PLAY_SERVICES_RESOLUTION_REQUEST).show();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(context, getResources().getString(R.string.notsuppoted), Toast.LENGTH_LONG)
|
Toast.makeText(context, getResources().getString(R.string.notsuppoted), Toast.LENGTH_LONG).show();
|
||||||
.show();
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ import com.google.gson.Gson;
|
|||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.net.URLEncoder;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -113,14 +114,16 @@ public class MainActivity extends AppCompatActivity
|
|||||||
webView.setWebViewClient(new MyWebViewClient());
|
webView.setWebViewClient(new MyWebViewClient());
|
||||||
webView.getSettings().setJavaScriptEnabled(true);
|
webView.getSettings().setJavaScriptEnabled(true);
|
||||||
|
|
||||||
String json = preferences.getString("NOTICEBOARD_DATA", null);
|
String json = preferences.getString("NOTICEBOARD_DATA", null) != null
|
||||||
|
? preferences.getString("NOTICEBOARD_DATA", null)
|
||||||
|
: "";
|
||||||
Log.d("noticejsondata",json);
|
Log.d("noticejsondata",json);
|
||||||
if (json != null) {
|
if (!json.isEmpty()) {
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
NoticeResponse response =
|
NoticeResponse response =
|
||||||
gson.fromJson(json, NoticeResponse.class);
|
gson.fromJson(json, NoticeResponse.class);
|
||||||
bannerlist = response.Mer_NoticeBoard;
|
bannerlist = response.Mer_NoticeBoard;
|
||||||
Log.d("SIZE", String.valueOf(bannerlist.size()));
|
Log.d("SIZE", String.valueOf(bannerlist.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -242,17 +245,28 @@ public class MainActivity extends AppCompatActivity
|
|||||||
|
|
||||||
String url = String.valueOf(item.getNoticeLink_FullPage());
|
String url = String.valueOf(item.getNoticeLink_FullPage());
|
||||||
String type = String.valueOf(item.getFullPageTarget());
|
String type = String.valueOf(item.getFullPageTarget());
|
||||||
Log.d("clickdata",url + ","+type);
|
// Log.d("clickdata",url + ","+type);
|
||||||
|
Log.e("clickdata", "URL = " + url);
|
||||||
|
System.out.println("FULL URL = " + url);
|
||||||
|
|
||||||
if (type == null) return;
|
if (type == null) return;
|
||||||
|
|
||||||
|
// append store id and merchant id (NoticeBoardId) to the url as query params
|
||||||
|
String storeId = preferences.getString(CommonString.KEY_STORE_ID, "");
|
||||||
|
String merId = String.valueOf(item.getNoticeBoardId());
|
||||||
|
String finalUrl = appendStoreMerQuery(url, storeId, merId);
|
||||||
|
Log.d("finalurl", finalUrl);
|
||||||
|
// Log full URL in chunks to avoid logcat truncation or masking
|
||||||
|
|
||||||
switch (type.toLowerCase()) {
|
switch (type.toLowerCase()) {
|
||||||
|
|
||||||
case "html-webview":
|
case "html-webview":
|
||||||
Log.d("itemdata", String.valueOf(item.getFullPageTarget()));
|
Log.d("itemdata", String.valueOf(item.getFullPageTarget()));
|
||||||
Intent webIntent = new Intent(this, WebViewActivity.class);
|
Intent webIntent = new Intent(this, WebViewActivity.class);
|
||||||
webIntent.putExtra("url", url);
|
webIntent.putExtra("url", finalUrl);
|
||||||
webIntent.putExtra("type", item.getFullPageTarget());
|
webIntent.putExtra("type", item.getFullPageTarget());
|
||||||
|
webIntent.putExtra("storeid", storeId);
|
||||||
|
webIntent.putExtra("merid", merId);
|
||||||
startActivity(webIntent);
|
startActivity(webIntent);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -262,21 +276,25 @@ public class MainActivity extends AppCompatActivity
|
|||||||
|
|
||||||
case "video":
|
case "video":
|
||||||
Intent videoIntent = new Intent(this, WebViewActivity.class);
|
Intent videoIntent = new Intent(this, WebViewActivity.class);
|
||||||
videoIntent.putExtra("url", url);
|
videoIntent.putExtra("url", finalUrl);
|
||||||
videoIntent.putExtra("type", item.getFullPageTarget());
|
videoIntent.putExtra("type", item.getFullPageTarget());
|
||||||
|
videoIntent.putExtra("storeid", storeId);
|
||||||
|
videoIntent.putExtra("merid", merId);
|
||||||
startActivity(videoIntent);
|
startActivity(videoIntent);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "image":
|
case "image":
|
||||||
Intent imageIntent = new Intent(this, WebViewActivity.class);
|
Intent imageIntent = new Intent(this, WebViewActivity.class);
|
||||||
imageIntent.putExtra("url", url);
|
imageIntent.putExtra("url", finalUrl);
|
||||||
imageIntent.putExtra("type", item.getFullPageTarget());
|
imageIntent.putExtra("type", item.getFullPageTarget());
|
||||||
|
imageIntent.putExtra("storeid", storeId);
|
||||||
|
imageIntent.putExtra("merid", merId);
|
||||||
startActivity(imageIntent);
|
startActivity(imageIntent);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "deeplink":
|
case "deeplink":
|
||||||
try {
|
try {
|
||||||
Intent deepIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
Intent deepIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(finalUrl));
|
||||||
startActivity(deepIntent);
|
startActivity(deepIntent);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Toast.makeText(this, "Invalid deeplink", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "Invalid deeplink", Toast.LENGTH_SHORT).show();
|
||||||
@@ -786,6 +804,32 @@ public class MainActivity extends AppCompatActivity
|
|||||||
return list != null ? list.size() : 0;
|
return list != null ? list.size() : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Append storeid and merid to the provided URL as query parameters.
|
||||||
|
* If the URL already contains query params, append with '&', otherwise use '?'.
|
||||||
|
*/
|
||||||
|
private String appendStoreMerQuery(String url, String storeId, String merId) {
|
||||||
|
if (url == null) return null;
|
||||||
|
try {
|
||||||
|
StringBuilder sb = new StringBuilder(url);
|
||||||
|
String separator = url.contains("?") ? "&" : "?";
|
||||||
|
boolean appended = false;
|
||||||
|
if (storeId != null && !storeId.isEmpty()) {
|
||||||
|
sb.append(separator).append("storeid=").append(URLEncoder.encode(storeId, "UTF-8"));
|
||||||
|
separator = "&";
|
||||||
|
appended = true;
|
||||||
|
}
|
||||||
|
if (merId != null && !merId.isEmpty()) {
|
||||||
|
sb.append(separator).append("merid=").append(URLEncoder.encode(merId, "UTF-8"));
|
||||||
|
appended = true;
|
||||||
|
}
|
||||||
|
return sb.toString();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1642,11 +1642,27 @@ public class CommonString {
|
|||||||
+ KEY_IRPD_VISIBILITY_IMAGES
|
+ KEY_IRPD_VISIBILITY_IMAGES
|
||||||
+ " VARCHAR)";
|
+ " VARCHAR)";
|
||||||
|
|
||||||
|
public static final String TABLE_WEBVIEW_TIME_SPENT = "WEBVIEW_TIME_SPENT";
|
||||||
|
public static final String CREATE_TABLE_WEBVIEW_TIME_SPENT = "CREATE TABLE IF NOT EXISTS "
|
||||||
|
+ TABLE_WEBVIEW_TIME_SPENT
|
||||||
|
+ " ("
|
||||||
|
+ "KEY_ID INTEGER PRIMARY KEY AUTOINCREMENT,"
|
||||||
|
+ "STORE_ID VARCHAR,"
|
||||||
|
+ "VISIT_DATE VARCHAR,"
|
||||||
|
+ "START_TIME VARCHAR,"
|
||||||
|
+ "END_TIME VARCHAR,"
|
||||||
|
+ "DURATION VARCHAR,"
|
||||||
|
+ "NOTICEBOARD_ID VARCHAR,"
|
||||||
|
+ "USER_ID VARCHAR,"
|
||||||
|
+ "CATEGORY_ID VARCHAR)";
|
||||||
|
|
||||||
public static final String BACKUP_FOLDER_NAME = "HaleonMT_Backup";
|
public static final String BACKUP_FOLDER_NAME = "HaleonMT_Backup";
|
||||||
public static final String IMAGE_FOLDER_NAME = "HaleonMT_Images";
|
public static final String IMAGE_FOLDER_NAME = "HaleonMT_Images";
|
||||||
public static final String Download_IMAGE_FOLDER = "Downloaded_HaleonMT_Images";
|
public static final String Download_IMAGE_FOLDER = "Downloaded_HaleonMT_Images";
|
||||||
public static final String ApkFolder = "HaleonMT_ApkFolder";
|
public static final String ApkFolder = "HaleonMT_ApkFolder";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static String getApkFolder(Context context) {
|
public static String getApkFolder(Context context) {
|
||||||
return AppUtils.getInternalDirectory(context, ApkFolder).getAbsolutePath() + "/";
|
return AppUtils.getInternalDirectory(context, ApkFolder).getAbsolutePath() + "/";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,141 @@
|
|||||||
|
package cpm.com.gskmtorange.dailyentry
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.content.SharedPreferences
|
||||||
|
import android.net.Uri
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.preference.PreferenceManager
|
||||||
|
import android.util.Log
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.widget.ImageView
|
||||||
|
import android.widget.TextView
|
||||||
|
import android.widget.Toast
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
|
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
||||||
|
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.xmlGetterSetter.MasterDetailerGetterSetter
|
||||||
|
import java.net.URLEncoder
|
||||||
|
|
||||||
|
class BannerActivity : AppCompatActivity() {
|
||||||
|
private lateinit var recyclerView: RecyclerView
|
||||||
|
var bannerlistnew: ArrayList<MasterDetailerGetterSetter>? = ArrayList()
|
||||||
|
|
||||||
|
private lateinit var preferences: SharedPreferences
|
||||||
|
private lateinit var db: GSKOrangeDB
|
||||||
|
private lateinit var countryId: String
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
setContentView(R.layout.activity_banner)
|
||||||
|
|
||||||
|
val toolbar: androidx.appcompat.widget.Toolbar = findViewById(R.id.toolbar)
|
||||||
|
setSupportActionBar(toolbar)
|
||||||
|
supportActionBar?.title = "Banner Dashboard"
|
||||||
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
toolbar.setNavigationOnClickListener {
|
||||||
|
onBackPressedDispatcher.onBackPressed()
|
||||||
|
}
|
||||||
|
|
||||||
|
recyclerView = findViewById(R.id.recyclerView)
|
||||||
|
recyclerView.layoutManager = LinearLayoutManager(this)
|
||||||
|
|
||||||
|
preferences = PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
|
CommonFunctions.updateLangResources(this, preferences.getString(CommonString.KEY_LANGUAGE, ""))
|
||||||
|
countryId = preferences.getString(CommonString.KEY_COUNTRY_ID, "") ?: ""
|
||||||
|
|
||||||
|
db = GSKOrangeDB(this)
|
||||||
|
db.open()
|
||||||
|
|
||||||
|
bannerlistnew = db.getMasterDetailerData("MASTER_DETAILER")
|
||||||
|
Log.d("bannerlistkotlin", bannerlistnew?.size.toString())
|
||||||
|
|
||||||
|
bannerlistnew?.let {
|
||||||
|
if (it.isNotEmpty()) {
|
||||||
|
recyclerView.adapter = BannerListAdapter(it) { item -> handleClick(item) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun handleClick(item: MasterDetailerGetterSetter) {
|
||||||
|
val url = if (item.dT_URL.isNotEmpty()) item.dT_URL[0] else ""
|
||||||
|
val type = "html-webview" // Default type as not specified in MASTER_DETAILER metadata
|
||||||
|
Log.e("clickdata", "URL = $url")
|
||||||
|
|
||||||
|
val storeId = preferences.getString(CommonString.KEY_STORE_ID, "") ?: ""
|
||||||
|
val merId = if (item.dtid.isNotEmpty()) item.dtid[0] else ""
|
||||||
|
val categoryId = intent.getStringExtra("CategoryId") ?: ""
|
||||||
|
val finalUrl = appendStoreMerQuery(url, storeId, merId)
|
||||||
|
Log.d("finalurl", finalUrl)
|
||||||
|
|
||||||
|
val webIntent = Intent(this, WebViewActivity::class.java).apply {
|
||||||
|
putExtra("url", finalUrl)
|
||||||
|
putExtra("type", type)
|
||||||
|
putExtra("storeid", storeId)
|
||||||
|
putExtra("merid", merId)
|
||||||
|
putExtra("categoryId", categoryId)
|
||||||
|
}
|
||||||
|
startActivity(webIntent)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun appendStoreMerQuery(url: String?, storeId: String?, merId: String?): String {
|
||||||
|
if (url == null) return ""
|
||||||
|
return try {
|
||||||
|
val sb = StringBuilder(url)
|
||||||
|
var separator = if (url.contains("?")) "&" else "?"
|
||||||
|
if (!storeId.isNullOrEmpty()) {
|
||||||
|
sb.append(separator).append("storeid=").append(URLEncoder.encode(storeId, "UTF-8"))
|
||||||
|
separator = "&"
|
||||||
|
}
|
||||||
|
if (!merId.isNullOrEmpty()) {
|
||||||
|
sb.append(separator).append("merid=").append(URLEncoder.encode(merId, "UTF-8"))
|
||||||
|
}
|
||||||
|
sb.toString()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
url
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class BannerListAdapter(
|
||||||
|
private val list: List<MasterDetailerGetterSetter>,
|
||||||
|
private val listener: (MasterDetailerGetterSetter) -> Unit
|
||||||
|
) : RecyclerView.Adapter<BannerListAdapter.ViewHolder>() {
|
||||||
|
|
||||||
|
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||||
|
val image: ImageView = itemView.findViewById(R.id.imgThumbnail)
|
||||||
|
val name: TextView = itemView.findViewById(R.id.tvName)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
|
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_banner_list, parent, false)
|
||||||
|
return ViewHolder(view)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
|
val item = list[position]
|
||||||
|
// Accessing first element of internal list as per parinaam pattern
|
||||||
|
val url = if (item.dT_THUMBNAIL.isNotEmpty()) item.dT_THUMBNAIL[0] else ""
|
||||||
|
val displayName = if (item.dT_NAME.isNotEmpty()) item.dT_NAME[0] else ""
|
||||||
|
|
||||||
|
holder.name.text = displayName
|
||||||
|
|
||||||
|
Glide.with(holder.itemView.context)
|
||||||
|
.load(url)
|
||||||
|
.placeholder(R.mipmap.ic_launcher)
|
||||||
|
.transform(RoundedCorners(15))
|
||||||
|
.into(holder.image)
|
||||||
|
|
||||||
|
holder.itemView.setOnClickListener { listener(item) }
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemCount(): Int = list.size
|
||||||
|
}
|
||||||
|
}
|
||||||
+205
-245
@@ -119,7 +119,6 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
|||||||
//temp
|
//temp
|
||||||
public static final String FILE_PATH = Environment.getExternalStorageDirectory() + "/";
|
public static final String FILE_PATH = Environment.getExternalStorageDirectory() + "/";
|
||||||
ProductAdapter productAdapter;
|
ProductAdapter productAdapter;
|
||||||
//ImageView bmImage;
|
|
||||||
RelativeLayout view;
|
RelativeLayout view;
|
||||||
RadioButton radio_yes,radio_no;
|
RadioButton radio_yes,radio_no;
|
||||||
RadioGroup radio_group;
|
RadioGroup radio_group;
|
||||||
@@ -133,7 +132,6 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
try {
|
try {
|
||||||
//setContentView(R.layout.activity_msl__availability_stock_facing);
|
|
||||||
setContentView(R.layout.activity_order_taking);
|
setContentView(R.layout.activity_order_taking);
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
expandableListView = (ExpandableListView) findViewById(R.id.expandableListView);
|
expandableListView = (ExpandableListView) findViewById(R.id.expandableListView);
|
||||||
@@ -194,7 +192,7 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
|||||||
//subcategory_list.clear();
|
//subcategory_list.clear();
|
||||||
//txt_mslAvailabilityName.setText(getResources().getString(R.string.title_activity_msl__availability));
|
//txt_mslAvailabilityName.setText(getResources().getString(R.string.title_activity_msl__availability));
|
||||||
addedCounterfeitProducts = db.getOrderTakingNewAfterData(store_id, categoryId);
|
addedCounterfeitProducts = db.getOrderTakingNewAfterData(store_id, categoryId);
|
||||||
if(addedCounterfeitProducts.size()>0){
|
if(!addedCounterfeitProducts.isEmpty()){
|
||||||
rec_added_counterfeit_product.setLayoutManager(new LinearLayoutManager(context));
|
rec_added_counterfeit_product.setLayoutManager(new LinearLayoutManager(context));
|
||||||
productAdapter = new ProductAdapter(addedCounterfeitProducts);
|
productAdapter = new ProductAdapter(addedCounterfeitProducts);
|
||||||
rec_added_counterfeit_product.setAdapter(productAdapter);
|
rec_added_counterfeit_product.setAdapter(productAdapter);
|
||||||
@@ -217,250 +215,227 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
|||||||
podateET.setText(visit_date);
|
podateET.setText(visit_date);
|
||||||
prepareList();
|
prepareList();
|
||||||
|
|
||||||
fab_add.setOnClickListener(new View.OnClickListener() {
|
fab_add.setOnClickListener(view -> {
|
||||||
@Override
|
Order_qty = editText_QTY.getText().toString();
|
||||||
public void onClick(View view) {
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter>finddetailbysku= new ArrayList<>();
|
||||||
Order_qty = editText_QTY.getText().toString();
|
finddetailbysku = db.getSkuDetails(String.valueOf(skuid));
|
||||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter>finddetailbysku= new ArrayList<>();
|
|
||||||
finddetailbysku = db.getSkuDetails(String.valueOf(skuid));
|
|
||||||
|
|
||||||
for(int i =0;i<addedCounterfeitProducts.size();i++){
|
for(int i =0;i<addedCounterfeitProducts.size();i++){
|
||||||
if (String.valueOf(skuid)
|
if (String.valueOf(skuid)
|
||||||
.equalsIgnoreCase(addedCounterfeitProducts.get(i).getSku_id())) {
|
.equalsIgnoreCase(addedCounterfeitProducts.get(i).getSku_id())) {
|
||||||
Snackbar.make(rec_added_counterfeit_product, R.string.add_different_sku,
|
Snackbar.make(rec_added_counterfeit_product, R.string.add_different_sku,
|
||||||
Snackbar.LENGTH_SHORT).show();
|
Snackbar.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (skuname.isEmpty()) {
|
||||||
|
Snackbar.make(rec_added_counterfeit_product, R.string.pls_select_sku, Snackbar.LENGTH_SHORT).show();
|
||||||
|
} else if (Order_qty.isEmpty()) {
|
||||||
|
Snackbar.make(rec_added_counterfeit_product, R.string.please_enter_order_qty, Snackbar.LENGTH_SHORT).show();
|
||||||
|
} else {
|
||||||
|
MSL_AvailabilityStockFacingGetterSetter product = new MSL_AvailabilityStockFacingGetterSetter();
|
||||||
|
product.setBrand(brand.isEmpty() ? finddetailbysku.get(0).getBrand() : brand);
|
||||||
|
product.setSub_category(subcategory.isEmpty() ? finddetailbysku.get(0).getSub_category() : subcategory);
|
||||||
|
product.setSub_category_id(subcategoryId==0? finddetailbysku.get(0).getSub_category_id() : String.valueOf(subcategoryId));
|
||||||
|
product.setBrand_id(brand_id==0 ? finddetailbysku.get(0).getBrand_id() : String.valueOf(brand_id));
|
||||||
|
product.setSku(skuname);
|
||||||
|
product.setSku_id(String.valueOf(skuid));
|
||||||
|
product.setOrder_qty(Order_qty);
|
||||||
|
addedCounterfeitProducts.add(product);
|
||||||
|
|
||||||
//
|
rec_added_counterfeit_product.setLayoutManager(new LinearLayoutManager(context));
|
||||||
|
productAdapter = new ProductAdapter(addedCounterfeitProducts);
|
||||||
if (skuname.isEmpty()) {
|
rec_added_counterfeit_product.setAdapter(productAdapter);
|
||||||
Snackbar.make(rec_added_counterfeit_product, R.string.pls_select_sku, Snackbar.LENGTH_SHORT).show();
|
subcategory = "";
|
||||||
} else if (Order_qty.isEmpty()) {
|
brand = "";
|
||||||
Snackbar.make(rec_added_counterfeit_product, R.string.please_enter_order_qty, Snackbar.LENGTH_SHORT).show();
|
subcategory = "";
|
||||||
} else {
|
subcategoryId = 0;
|
||||||
MSL_AvailabilityStockFacingGetterSetter product = new MSL_AvailabilityStockFacingGetterSetter();
|
brand_id = 0;
|
||||||
product.setBrand(brand.isEmpty() ? finddetailbysku.get(0).getBrand() : brand);
|
skuid = 0;
|
||||||
product.setSub_category(subcategory.isEmpty() ? finddetailbysku.get(0).getSub_category() : subcategory);
|
skuname = "";
|
||||||
product.setSub_category_id(subcategoryId==0? finddetailbysku.get(0).getSub_category_id() : String.valueOf(subcategoryId));
|
editText_QTY.setText("");
|
||||||
product.setBrand_id(brand_id==0 ? finddetailbysku.get(0).getBrand_id() : String.valueOf(brand_id));
|
sp_subcategory.setSelection(0);
|
||||||
product.setSku(skuname);
|
spinner_brand_list.setSelection(0);
|
||||||
product.setSku_id(String.valueOf(skuid));
|
sp_promotion_typ.setSelection(0);
|
||||||
product.setOrder_qty(Order_qty);
|
brand_list.clear();
|
||||||
addedCounterfeitProducts.add(product);
|
subcategory_list.clear();
|
||||||
|
skuListdata.clear();
|
||||||
rec_added_counterfeit_product.setLayoutManager(new LinearLayoutManager(context));
|
setNewData();
|
||||||
productAdapter = new ProductAdapter(addedCounterfeitProducts);
|
isdata_added = true;
|
||||||
rec_added_counterfeit_product.setAdapter(productAdapter);
|
|
||||||
|
|
||||||
subcategory = "";
|
|
||||||
brand = "";
|
|
||||||
subcategory = "";
|
|
||||||
subcategoryId = 0;
|
|
||||||
brand_id = 0;
|
|
||||||
skuid = 0;
|
|
||||||
skuname = "";
|
|
||||||
editText_QTY.setText("");
|
|
||||||
sp_subcategory.setSelection(0);
|
|
||||||
spinner_brand_list.setSelection(0);
|
|
||||||
sp_promotion_typ.setSelection(0);
|
|
||||||
brand_list.clear();
|
|
||||||
subcategory_list.clear();
|
|
||||||
skuListdata.clear();
|
|
||||||
setNewData();
|
|
||||||
isdata_added = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
final FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
final FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||||
|
|
||||||
poIV.setOnClickListener(new View.OnClickListener() {
|
poIV.setOnClickListener(v -> {
|
||||||
@Override
|
_pathforcheck = store_id + categoryId + "POImage_" + date.replace("/", "") + CommonFunctions.getCurrentTimeWithLanguage(context).replace(":", "") + ".jpg";
|
||||||
public void onClick(View v) {
|
|
||||||
_pathforcheck = store_id + categoryId + "POImage_" + date.replace("/", "") + CommonFunctions.getCurrentTimeWithLanguage(context).replace(":", "") + ".jpg";
|
|
||||||
|
|
||||||
_path = CommonString.getImagesFolder(context) + _pathforcheck;
|
_path = CommonString.getImagesFolder(context) + _pathforcheck;
|
||||||
intime = CommonFunctions.getCurrentTimeWithLanguage(context);
|
intime = CommonFunctions.getCurrentTimeWithLanguage(context);
|
||||||
startCameraActivity();
|
startCameraActivity();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
radio_group.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
radio_group.setOnCheckedChangeListener((radioGroup, i) -> {
|
||||||
@Override
|
if (radio_yes.isChecked()) {
|
||||||
public void onCheckedChanged(RadioGroup radioGroup, int i) {
|
radio_yes.setBackground(getResources().getDrawable(R.mipmap.yes_green));
|
||||||
if (radio_yes.isChecked()) {
|
radio_no.setBackground(getResources().getDrawable(R.mipmap.no_white));
|
||||||
radio_yes.setBackground(getResources().getDrawable(R.mipmap.yes_green));
|
poLL.setVisibility(View.VISIBLE);
|
||||||
radio_no.setBackground(getResources().getDrawable(R.mipmap.no_white));
|
if(country_id.equals("17")){
|
||||||
poLL.setVisibility(View.VISIBLE);
|
pocamLL.setVisibility(View.VISIBLE);
|
||||||
if(country_id.equals("17")){
|
|
||||||
pocamLL.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
pocamLL.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
isExist="yes";
|
|
||||||
/*expListView.setVisibility(View.VISIBLE);
|
|
||||||
categoryobject.setIsChecked(1);
|
|
||||||
skuData.get(0).setIsChecked(1);*/
|
|
||||||
}
|
|
||||||
if (radio_no.isChecked()) {
|
|
||||||
radio_no.setBackground(getResources().getDrawable(R.mipmap.no_red));
|
|
||||||
radio_yes.setBackground(getResources().getDrawable(R.mipmap.yes_white));
|
|
||||||
poLL.setVisibility(View.GONE);
|
|
||||||
pocamLL.setVisibility(View.GONE);
|
|
||||||
isExist="no";
|
|
||||||
img_str = "";
|
|
||||||
/*expListView.setVisibility(View.GONE);
|
|
||||||
categoryobject.setIsChecked(0);
|
|
||||||
skuData.get(0).setIsChecked(0);*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
fab.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(final View view) {
|
|
||||||
expandableListView.clearFocus();
|
|
||||||
adapter.notifyDataSetChanged();
|
|
||||||
storepo = storepoET.getText().toString();
|
|
||||||
if (addedCounterfeitProducts.size() == 0) {
|
|
||||||
Snackbar.make(rec_added_counterfeit_product, R.string.title_activity_Want_add, Snackbar.LENGTH_SHORT).show();
|
|
||||||
} else {
|
|
||||||
Log.d("sysponumber",sys_po_number);
|
|
||||||
db.InsertOrderTakingData(addedCounterfeitProducts, categoryId, store_id,date,sys_po_number);
|
|
||||||
finish();
|
|
||||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Log.e("storepo",storepo);
|
|
||||||
/* if(isExist.equalsIgnoreCase("no")){
|
|
||||||
if (db.checkOrder_taking_Data(store_id, categoryId)) {
|
|
||||||
db.updateOrder_taking_data(addedCounterfeitProducts, categoryId, store_id);
|
|
||||||
Toast.makeText(context,getResources().getString(R.string.update_message),Toast.LENGTH_SHORT).show();
|
|
||||||
} else {
|
|
||||||
db.InsertOrderTakingData(addedCounterfeitProducts, categoryId, store_id);
|
|
||||||
Toast.makeText(context,getResources().getString(R.string.save_message),Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
|
|
||||||
*//*String pharma_msl_xml = "";
|
|
||||||
String onXML = "";
|
|
||||||
String _onxml = "";
|
|
||||||
String categoryxml = "";
|
|
||||||
|
|
||||||
db.open();
|
|
||||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> ordertakinglist = db.getOrder_TAKING_UploadServerData(store_id);
|
|
||||||
db.open();
|
|
||||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> getOrder_TAKING_CategoryData = db.getOrder_TAKING_CategoryData(store_id);
|
|
||||||
|
|
||||||
if (ordertakinglist.size() > 0) {
|
|
||||||
for(int k = 0; k < getOrder_TAKING_CategoryData.size(); k++){
|
|
||||||
_onxml = "[CATEGORY_DATA]"
|
|
||||||
+ "[MID]" + 0 + "[/MID]"
|
|
||||||
+ "[USERID]" + username + "[/USERID]"
|
|
||||||
+ "[PRESENT]" + getOrder_TAKING_CategoryData.get(k).getIsExist() + "[/PRESENT]"
|
|
||||||
+ "[CATEGORY_ID]" + getOrder_TAKING_CategoryData.get(k).getCategory_id() + "[/CATEGORY_ID]"
|
|
||||||
+ "[/CATEGORY_DATA]";
|
|
||||||
categoryxml = categoryxml + _onxml;
|
|
||||||
}
|
|
||||||
String cat_xml = categoryxml;
|
|
||||||
|
|
||||||
for (int j = 0; j < ordertakinglist.size(); j++) {
|
|
||||||
if(ordertakinglist.get(j).getIsExist()==1){
|
|
||||||
onXML = "[ORDERDATA]"
|
|
||||||
+ "[MID]" + 0 + "[/MID]"
|
|
||||||
+ "[USERID]" + username + "[/USERID]"
|
|
||||||
+ "[PRESENT]" + ordertakinglist.get(j).getIsExist() + "[/PRESENT]"
|
|
||||||
+ "[SYSTEM_PO_NUM]" + ordertakinglist.get(j).getSys_PO_No() + "[/SYSTEM_PO_NUM]"
|
|
||||||
+ "[STORE_PO_NUM]" + ordertakinglist.get(j).getStore_PO_No() + "[/STORE_PO_NUM]"
|
|
||||||
+ "[PO_DATE]" + ordertakinglist.get(j).getPO_Date() + "[/PO_DATE]"
|
|
||||||
+ "[SKU_ID]" + ordertakinglist.get(j).getSku_id() + "[/SKU_ID]"
|
|
||||||
+ "[ORDER_QTY]" + ordertakinglist.get(j).getFacing() + "[/ORDER_QTY]"+
|
|
||||||
"[/ORDERDATA]";
|
|
||||||
pharma_msl_xml = pharma_msl_xml + onXML;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
String data_xml = cat_xml + pharma_msl_xml;
|
|
||||||
|
|
||||||
final String sos_xml = "[DATA]" + data_xml + "[/DATA]";
|
|
||||||
Log.e("order_xml",sos_xml);
|
|
||||||
}*//*
|
|
||||||
|
|
||||||
finish();
|
|
||||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(validation()){
|
pocamLL.setVisibility(View.GONE);
|
||||||
if (validateData(hashMapListHeaderData, hashMapListChildData)) {
|
}
|
||||||
db.open();
|
isExist="yes";
|
||||||
if (db.checkOrder_taking_Data(store_id, categoryId)) {
|
}
|
||||||
db.updateOrder_taking_data(img_str,isExist,storepo,sys_po_number,date,store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
if (radio_no.isChecked()) {
|
||||||
Toast.makeText(context,getResources().getString(R.string.update_message),Toast.LENGTH_SHORT).show();
|
radio_no.setBackground(getResources().getDrawable(R.mipmap.no_red));
|
||||||
|
radio_yes.setBackground(getResources().getDrawable(R.mipmap.yes_white));
|
||||||
|
poLL.setVisibility(View.GONE);
|
||||||
|
pocamLL.setVisibility(View.GONE);
|
||||||
|
isExist="no";
|
||||||
|
img_str = "";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
} else {
|
|
||||||
db.InsertOrderTakingData(img_str,isExist,storepo,sys_po_number,date,store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
|
||||||
Toast.makeText(context,getResources().getString(R.string.save_message),Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
finish();
|
|
||||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
|
||||||
|
|
||||||
String pharma_msl_xml = "";
|
fab.setOnClickListener(view -> {
|
||||||
String onXML = "";
|
expandableListView.clearFocus();
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
storepo = storepoET.getText().toString();
|
||||||
|
if (addedCounterfeitProducts.isEmpty()) {
|
||||||
|
Snackbar.make(rec_added_counterfeit_product, R.string.title_activity_Want_add, Snackbar.LENGTH_SHORT).show();
|
||||||
|
} else {
|
||||||
|
Log.d("sysponumber",sys_po_number);
|
||||||
|
db.InsertOrderTakingData(addedCounterfeitProducts, categoryId, store_id,date,sys_po_number);
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
|
}
|
||||||
|
|
||||||
// db.open();
|
//Log.e("storepo",storepo);
|
||||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> ordertakinglist = db.getOrder_TAKING_UploadServerData(store_id);
|
/* if(isExist.equalsIgnoreCase("no")){
|
||||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> getOrder_TAKING_CategoryData = db.getOrder_TAKING_CategoryData(store_id);
|
if (db.checkOrder_taking_Data(store_id, categoryId)) {
|
||||||
String _onxml = "";
|
db.updateOrder_taking_data(addedCounterfeitProducts, categoryId, store_id);
|
||||||
String categoryxml = "";
|
Toast.makeText(context,getResources().getString(R.string.update_message),Toast.LENGTH_SHORT).show();
|
||||||
if (ordertakinglist.size() > 0) {
|
} else {
|
||||||
for(int k = 0; k < getOrder_TAKING_CategoryData.size(); k++){
|
db.InsertOrderTakingData(addedCounterfeitProducts, categoryId, store_id);
|
||||||
_onxml = "[CATEGORY_DATA]"
|
Toast.makeText(context,getResources().getString(R.string.save_message),Toast.LENGTH_SHORT).show();
|
||||||
+ "[MID]" + 0 + "[/MID]"
|
}
|
||||||
+ "[USERID]" + username + "[/USERID]"
|
|
||||||
+ "[PRESENT]" + getOrder_TAKING_CategoryData.get(k).getIsExist() + "[/PRESENT]"
|
|
||||||
+ "[CATEGORY_ID]" + getOrder_TAKING_CategoryData.get(k).getCategory_id() + "[/CATEGORY_ID]"
|
|
||||||
+ "[/CATEGORY_DATA]";
|
|
||||||
categoryxml = categoryxml + _onxml;
|
|
||||||
}
|
|
||||||
String cat_xml = categoryxml;
|
|
||||||
|
|
||||||
for (int j = 0; j < ordertakinglist.size(); j++) {
|
*//*String pharma_msl_xml = "";
|
||||||
if(ordertakinglist.get(j).getIsExist()==1){
|
String onXML = "";
|
||||||
if(!ordertakinglist.get(j).getFacing().equals("0") &&
|
String _onxml = "";
|
||||||
!ordertakinglist.get(j).getFacing().equals("")) {
|
String categoryxml = "";
|
||||||
onXML = "[ORDERDATA]"
|
|
||||||
+ "[MID]" + 0 + "[/MID]"
|
|
||||||
+ "[USERID]" + username + "[/USERID]"
|
|
||||||
+ "[PRESENT]" + ordertakinglist.get(j).getIsExist() + "[/PRESENT]"
|
|
||||||
+ "[SYSTEM_PO_NUM]" + ordertakinglist.get(j).getSys_PO_No() + "[/SYSTEM_PO_NUM]"
|
|
||||||
+ "[STORE_PO_NUM]" + ordertakinglist.get(j).getStore_PO_No() + "[/STORE_PO_NUM]"
|
|
||||||
+ "[PO_IMAGE]" + ordertakinglist.get(j).getPO_Img() + "[/PO_IMAGE]"
|
|
||||||
+ "[PO_DATE]" + ordertakinglist.get(j).getPO_Date() + "[/PO_DATE]"
|
|
||||||
+ "[SKU_ID]" + ordertakinglist.get(j).getSku_id() + "[/SKU_ID]"
|
|
||||||
+ "[ORDER_QTY]" + ordertakinglist.get(j).getFacing() + "[/ORDER_QTY]" +
|
|
||||||
"[/ORDERDATA]";
|
|
||||||
pharma_msl_xml = pharma_msl_xml + onXML;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
String data_xml = cat_xml + pharma_msl_xml;
|
|
||||||
|
|
||||||
final String sos_xml = "[DATA]" + data_xml + "[/DATA]";
|
db.open();
|
||||||
Log.e("order_xml",sos_xml);
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> ordertakinglist = db.getOrder_TAKING_UploadServerData(store_id);
|
||||||
}
|
db.open();
|
||||||
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> getOrder_TAKING_CategoryData = db.getOrder_TAKING_CategoryData(store_id);
|
||||||
|
|
||||||
} else {
|
if (ordertakinglist.size() > 0) {
|
||||||
for (int i = 0; i < adapter.getGroupCount(); i++)
|
for(int k = 0; k < getOrder_TAKING_CategoryData.size(); k++){
|
||||||
expandableListView.expandGroup(i);
|
_onxml = "[CATEGORY_DATA]"
|
||||||
|
+ "[MID]" + 0 + "[/MID]"
|
||||||
|
+ "[USERID]" + username + "[/USERID]"
|
||||||
|
+ "[PRESENT]" + getOrder_TAKING_CategoryData.get(k).getIsExist() + "[/PRESENT]"
|
||||||
|
+ "[CATEGORY_ID]" + getOrder_TAKING_CategoryData.get(k).getCategory_id() + "[/CATEGORY_ID]"
|
||||||
|
+ "[/CATEGORY_DATA]";
|
||||||
|
categoryxml = categoryxml + _onxml;
|
||||||
|
}
|
||||||
|
String cat_xml = categoryxml;
|
||||||
|
|
||||||
|
for (int j = 0; j < ordertakinglist.size(); j++) {
|
||||||
|
if(ordertakinglist.get(j).getIsExist()==1){
|
||||||
|
onXML = "[ORDERDATA]"
|
||||||
|
+ "[MID]" + 0 + "[/MID]"
|
||||||
|
+ "[USERID]" + username + "[/USERID]"
|
||||||
|
+ "[PRESENT]" + ordertakinglist.get(j).getIsExist() + "[/PRESENT]"
|
||||||
|
+ "[SYSTEM_PO_NUM]" + ordertakinglist.get(j).getSys_PO_No() + "[/SYSTEM_PO_NUM]"
|
||||||
|
+ "[STORE_PO_NUM]" + ordertakinglist.get(j).getStore_PO_No() + "[/STORE_PO_NUM]"
|
||||||
|
+ "[PO_DATE]" + ordertakinglist.get(j).getPO_Date() + "[/PO_DATE]"
|
||||||
|
+ "[SKU_ID]" + ordertakinglist.get(j).getSku_id() + "[/SKU_ID]"
|
||||||
|
+ "[ORDER_QTY]" + ordertakinglist.get(j).getFacing() + "[/ORDER_QTY]"+
|
||||||
|
"[/ORDERDATA]";
|
||||||
|
pharma_msl_xml = pharma_msl_xml + onXML;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
String data_xml = cat_xml + pharma_msl_xml;
|
||||||
|
|
||||||
}*/
|
final String sos_xml = "[DATA]" + data_xml + "[/DATA]";
|
||||||
|
Log.e("order_xml",sos_xml);
|
||||||
|
}*//*
|
||||||
|
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
if(validation()){
|
||||||
|
if (validateData(hashMapListHeaderData, hashMapListChildData)) {
|
||||||
|
db.open();
|
||||||
|
if (db.checkOrder_taking_Data(store_id, categoryId)) {
|
||||||
|
db.updateOrder_taking_data(img_str,isExist,storepo,sys_po_number,date,store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||||
|
Toast.makeText(context,getResources().getString(R.string.update_message),Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
db.InsertOrderTakingData(img_str,isExist,storepo,sys_po_number,date,store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||||
|
Toast.makeText(context,getResources().getString(R.string.save_message),Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
|
|
||||||
|
String pharma_msl_xml = "";
|
||||||
|
String onXML = "";
|
||||||
|
|
||||||
|
// db.open();
|
||||||
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> ordertakinglist = db.getOrder_TAKING_UploadServerData(store_id);
|
||||||
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> getOrder_TAKING_CategoryData = db.getOrder_TAKING_CategoryData(store_id);
|
||||||
|
String _onxml = "";
|
||||||
|
String categoryxml = "";
|
||||||
|
if (ordertakinglist.size() > 0) {
|
||||||
|
for(int k = 0; k < getOrder_TAKING_CategoryData.size(); k++){
|
||||||
|
_onxml = "[CATEGORY_DATA]"
|
||||||
|
+ "[MID]" + 0 + "[/MID]"
|
||||||
|
+ "[USERID]" + username + "[/USERID]"
|
||||||
|
+ "[PRESENT]" + getOrder_TAKING_CategoryData.get(k).getIsExist() + "[/PRESENT]"
|
||||||
|
+ "[CATEGORY_ID]" + getOrder_TAKING_CategoryData.get(k).getCategory_id() + "[/CATEGORY_ID]"
|
||||||
|
+ "[/CATEGORY_DATA]";
|
||||||
|
categoryxml = categoryxml + _onxml;
|
||||||
|
}
|
||||||
|
String cat_xml = categoryxml;
|
||||||
|
|
||||||
|
for (int j = 0; j < ordertakinglist.size(); j++) {
|
||||||
|
if(ordertakinglist.get(j).getIsExist()==1){
|
||||||
|
if(!ordertakinglist.get(j).getFacing().equals("0") &&
|
||||||
|
!ordertakinglist.get(j).getFacing().equals("")) {
|
||||||
|
onXML = "[ORDERDATA]"
|
||||||
|
+ "[MID]" + 0 + "[/MID]"
|
||||||
|
+ "[USERID]" + username + "[/USERID]"
|
||||||
|
+ "[PRESENT]" + ordertakinglist.get(j).getIsExist() + "[/PRESENT]"
|
||||||
|
+ "[SYSTEM_PO_NUM]" + ordertakinglist.get(j).getSys_PO_No() + "[/SYSTEM_PO_NUM]"
|
||||||
|
+ "[STORE_PO_NUM]" + ordertakinglist.get(j).getStore_PO_No() + "[/STORE_PO_NUM]"
|
||||||
|
+ "[PO_IMAGE]" + ordertakinglist.get(j).getPO_Img() + "[/PO_IMAGE]"
|
||||||
|
+ "[PO_DATE]" + ordertakinglist.get(j).getPO_Date() + "[/PO_DATE]"
|
||||||
|
+ "[SKU_ID]" + ordertakinglist.get(j).getSku_id() + "[/SKU_ID]"
|
||||||
|
+ "[ORDER_QTY]" + ordertakinglist.get(j).getFacing() + "[/ORDER_QTY]" +
|
||||||
|
"[/ORDERDATA]";
|
||||||
|
pharma_msl_xml = pharma_msl_xml + onXML;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String data_xml = cat_xml + pharma_msl_xml;
|
||||||
|
|
||||||
|
final String sos_xml = "[DATA]" + data_xml + "[/DATA]";
|
||||||
|
Log.e("order_xml",sos_xml);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
for (int i = 0; i < adapter.getGroupCount(); i++)
|
||||||
|
expandableListView.expandGroup(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}*/
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
expandableListView.setOnScrollListener(new AbsListView.OnScrollListener() {
|
expandableListView.setOnScrollListener(new AbsListView.OnScrollListener() {
|
||||||
@@ -472,11 +447,11 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
|||||||
int lastItem = firstVisibleItem + visibleItemCount;
|
int lastItem = firstVisibleItem + visibleItemCount;
|
||||||
|
|
||||||
if (firstVisibleItem == 0) {
|
if (firstVisibleItem == 0) {
|
||||||
fab.show();//.setVisibility(View.VISIBLE);
|
fab.show();
|
||||||
} else if (lastItem == totalItemCount) {
|
} else if (lastItem == totalItemCount) {
|
||||||
fab.hide();//setVisibility(View.INVISIBLE);
|
fab.hide();
|
||||||
} else {
|
} else {
|
||||||
fab.show();//setVisibility(View.VISIBLE);
|
fab.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1132,12 +1107,10 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
|||||||
AlertDialog.Builder builder = new AlertDialog.Builder(OrderTakingActivity.this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(OrderTakingActivity.this);
|
||||||
builder.setMessage(getString(R.string.check_faceup))
|
builder.setMessage(getString(R.string.check_faceup))
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
.setPositiveButton(getString(R.string.ok), (dialog, id) -> {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
finalHolder1.facing.setText("");
|
||||||
finalHolder1.facing.setText("");
|
dialog.dismiss();
|
||||||
dialog.dismiss();
|
finalHolder2.facing.setText("");
|
||||||
finalHolder2.facing.setText("");
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
AlertDialog alert = builder.create();
|
AlertDialog alert = builder.create();
|
||||||
alert.show();
|
alert.show();
|
||||||
@@ -1160,10 +1133,8 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
|||||||
faceup = "0";
|
faceup = "0";
|
||||||
} else {
|
} else {
|
||||||
faceup = edFaceup.replaceFirst("^0+(?!$)", "");
|
faceup = edFaceup.replaceFirst("^0+(?!$)", "");
|
||||||
//faceup = new DecimalFormat("##.#").format(Double.parseDouble(faceup));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// String str2 = PerfectDecimal(faceup, 3, 1);
|
|
||||||
childData.setFacing(faceup);
|
childData.setFacing(faceup);
|
||||||
} else {
|
} else {
|
||||||
childData.setFacing("");
|
childData.setFacing("");
|
||||||
@@ -1498,9 +1469,6 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
|||||||
MSL_AvailabilityStockFacingGetterSetter tempValues = null;
|
MSL_AvailabilityStockFacingGetterSetter tempValues = null;
|
||||||
LayoutInflater inflater;
|
LayoutInflater inflater;
|
||||||
|
|
||||||
/*************
|
|
||||||
* CustomBrandAdapter Constructor
|
|
||||||
*****************/
|
|
||||||
public CustomSkuAdapter(
|
public CustomSkuAdapter(
|
||||||
OrderTakingActivity activitySpinner,
|
OrderTakingActivity activitySpinner,
|
||||||
int textViewResourceId,
|
int textViewResourceId,
|
||||||
@@ -1524,26 +1492,19 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
|||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
return getCustomView(position, convertView, parent);
|
return getCustomView(position, convertView, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This funtion called for each row ( Called data.size() times )
|
|
||||||
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
||||||
|
|
||||||
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
||||||
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
||||||
|
|
||||||
/***** Get each Model object from Arraylist ********/
|
|
||||||
tempValues = null;
|
tempValues = null;
|
||||||
tempValues = (MSL_AvailabilityStockFacingGetterSetter) data.get(position);
|
tempValues = (MSL_AvailabilityStockFacingGetterSetter) data.get(position);
|
||||||
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
||||||
if (position == 0) {
|
if (position == 0) {
|
||||||
// Default selected Spinner item
|
// Default selected Spinner item
|
||||||
label.setText(getResources().getString(R.string.select));
|
label.setText(getResources().getString(R.string.select));
|
||||||
//sub.setText("");
|
|
||||||
} else {
|
} else {
|
||||||
// Set values for spinner each row
|
|
||||||
label.setText(tempValues.getSku());
|
label.setText(tempValues.getSku());
|
||||||
}
|
}
|
||||||
// label.setText(tempValues.getSku());
|
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1583,7 +1544,6 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
|||||||
|
|
||||||
public ViewHolder(View view) {
|
public ViewHolder(View view) {
|
||||||
super(view);
|
super(view);
|
||||||
|
|
||||||
mView = view;
|
mView = view;
|
||||||
tv_brand = (TextView) mView.findViewById(R.id.tv_brand);
|
tv_brand = (TextView) mView.findViewById(R.id.tv_brand);
|
||||||
tv_order_qty = (TextView) mView.findViewById(R.id.tv_order_qty);
|
tv_order_qty = (TextView) mView.findViewById(R.id.tv_order_qty);
|
||||||
|
|||||||
@@ -1338,7 +1338,6 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return flag_checked_in;
|
return flag_checked_in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ package cpm.com.gskmtorange.dailyentry
|
|||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.SharedPreferences
|
||||||
import android.graphics.BitmapFactory
|
import android.graphics.BitmapFactory
|
||||||
import android.graphics.drawable.Drawable
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.preference.PreferenceManager
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
@@ -16,23 +17,31 @@ import android.webkit.WebChromeClient
|
|||||||
import android.webkit.WebSettings
|
import android.webkit.WebSettings
|
||||||
import android.webkit.WebView
|
import android.webkit.WebView
|
||||||
import android.webkit.WebViewClient
|
import android.webkit.WebViewClient
|
||||||
import android.widget.ImageView
|
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.appcompat.widget.Toolbar
|
import androidx.appcompat.widget.Toolbar
|
||||||
import androidx.media3.common.MediaItem
|
import androidx.media3.common.MediaItem
|
||||||
import androidx.media3.exoplayer.ExoPlayer
|
import androidx.media3.exoplayer.ExoPlayer
|
||||||
import com.bumptech.glide.request.target.ViewTarget
|
import cpm.com.gskmtorange.Database.GSKOrangeDB
|
||||||
|
import cpm.com.gskmtorange.constant.CommonString
|
||||||
import cpm.com.gskmtorange.databinding.ActivityWebviewBinding
|
import cpm.com.gskmtorange.databinding.ActivityWebviewBinding
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Date
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
class WebViewActivity : AppCompatActivity() {
|
class WebViewActivity : AppCompatActivity() {
|
||||||
|
|
||||||
private lateinit var binding: ActivityWebviewBinding
|
private lateinit var binding: ActivityWebviewBinding
|
||||||
var toolbar: Toolbar? = null
|
var toolbar: Toolbar? = null
|
||||||
|
|
||||||
private lateinit var type : String
|
private lateinit var type : String
|
||||||
private var player: ExoPlayer? = null
|
private var player: ExoPlayer? = null
|
||||||
// private var player : ExoPlayer? = null
|
// private var player : ExoPlayer? = null
|
||||||
|
private var pageStartTime: Long = 0
|
||||||
|
private var pageEndTime: Long = 0
|
||||||
|
private lateinit var preferences: SharedPreferences
|
||||||
|
private lateinit var db: GSKOrangeDB
|
||||||
|
private var storeid: String = ""
|
||||||
|
private var merid: String = ""
|
||||||
|
private var categoryId: String = ""
|
||||||
|
|
||||||
@SuppressLint("SetJavaScriptEnabled")
|
@SuppressLint("SetJavaScriptEnabled")
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
@@ -40,56 +49,21 @@ class WebViewActivity : AppCompatActivity() {
|
|||||||
binding = ActivityWebviewBinding.inflate(layoutInflater)
|
binding = ActivityWebviewBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
preferences = PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
|
db = GSKOrangeDB(this)
|
||||||
|
db.open()
|
||||||
|
|
||||||
val url = intent.getStringExtra("url") ?: ""
|
val url = intent.getStringExtra("url") ?: ""
|
||||||
type = intent.getStringExtra("type") ?: "html-webview"
|
type = intent.getStringExtra("type") ?: "html-webview"
|
||||||
type = intent.getStringExtra("type") ?: "html-webview"
|
storeid = intent.getStringExtra("storeid") ?: ""
|
||||||
handleContent(type, url)
|
merid = intent.getStringExtra("merid") ?: ""
|
||||||
|
categoryId = intent.getStringExtra("categoryId") ?: ""
|
||||||
|
|
||||||
|
handleContent(type, url)
|
||||||
|
|
||||||
binding.toolbar.setTitle("Banner Detail")
|
binding.toolbar.setTitle("Banner Detail")
|
||||||
setSupportActionBar(binding.toolbar)
|
setSupportActionBar(binding.toolbar)
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* // ✅ SETTINGS
|
|
||||||
with(binding.webView.settings) {
|
|
||||||
javaScriptEnabled = true
|
|
||||||
domStorageEnabled = true
|
|
||||||
javaScriptCanOpenWindowsAutomatically = true
|
|
||||||
setSupportMultipleWindows(true)
|
|
||||||
loadWithOverviewMode = true
|
|
||||||
useWideViewPort = true
|
|
||||||
mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
|
|
||||||
}
|
|
||||||
|
|
||||||
// ✅ JS INTERFACE
|
|
||||||
binding.webView.addJavascriptInterface(WebAppInterface(), "Android")
|
|
||||||
|
|
||||||
// ✅ WEBVIEW CLIENT
|
|
||||||
binding.webView.webViewClient = object : WebViewClient() {
|
|
||||||
|
|
||||||
override fun onPageStarted(view: WebView?, url: String?, favicon: android.graphics.Bitmap?) {
|
|
||||||
super.onPageStarted(view, url, favicon)
|
|
||||||
injectJS(view) // 🔥 early injection
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPageFinished(view: WebView?, url: String?) {
|
|
||||||
super.onPageFinished(view, url)
|
|
||||||
injectJS(view) // 🔥 safe injection again
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ✅ JS LOGS
|
|
||||||
binding.webView.webChromeClient = object : WebChromeClient() {
|
|
||||||
override fun onConsoleMessage(consoleMessage: ConsoleMessage?): Boolean {
|
|
||||||
Log.e("JS_LOG", consoleMessage?.message() ?: "")
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.webView.loadUrl(url)
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleContent(type: String, url: String) {
|
private fun handleContent(type: String, url: String) {
|
||||||
@@ -148,7 +122,6 @@ class WebViewActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
@SuppressLint("SetJavaScriptEnabled")
|
@SuppressLint("SetJavaScriptEnabled")
|
||||||
private fun setupWebView(url: String) {
|
private fun setupWebView(url: String) {
|
||||||
|
|
||||||
with(binding.webView.settings) {
|
with(binding.webView.settings) {
|
||||||
javaScriptEnabled = true
|
javaScriptEnabled = true
|
||||||
domStorageEnabled = true
|
domStorageEnabled = true
|
||||||
@@ -169,10 +142,20 @@ class WebViewActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
binding.webView.webViewClient = object : WebViewClient() {
|
binding.webView.webViewClient = object : WebViewClient() {
|
||||||
override fun onPageStarted(view: WebView?, url: String?, favicon: android.graphics.Bitmap?) {
|
override fun onPageStarted(view: WebView?, url: String?, favicon: android.graphics.Bitmap?) {
|
||||||
|
pageStartTime = System.currentTimeMillis()
|
||||||
|
val formattedTime = SimpleDateFormat(
|
||||||
|
"HH:mm:ss",
|
||||||
|
Locale.getDefault()
|
||||||
|
).format(Date(pageStartTime))
|
||||||
|
|
||||||
|
// println(formattedTime)
|
||||||
|
Log.d("WEBVIEW_START_TIME", "Start time is :$formattedTime ")
|
||||||
injectJS(view)
|
injectJS(view)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPageFinished(view: WebView?, url: String?) {
|
override fun onPageFinished(view: WebView?, url: String?) {
|
||||||
|
pageStartTime = System.currentTimeMillis()
|
||||||
|
Log.d("WEBVIEW_TIME", " viewed for $pageStartTime sec")
|
||||||
injectJS(view)
|
injectJS(view)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -183,7 +166,6 @@ class WebViewActivity : AppCompatActivity() {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.webView.loadUrl(url)
|
binding.webView.loadUrl(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,11 +429,31 @@ class WebViewActivity : AppCompatActivity() {
|
|||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
player?.pause()
|
player?.pause()
|
||||||
}
|
pageEndTime = System.currentTimeMillis()
|
||||||
|
val start_time = SimpleDateFormat("HH:mm:ss", Locale.getDefault()).format(Date(pageStartTime))
|
||||||
|
val end_time = SimpleDateFormat("HH:mm:ss", Locale.getDefault()).format(Date(pageEndTime))
|
||||||
|
val spent = (pageEndTime - pageStartTime) / 1000
|
||||||
|
val visit_date = preferences.getString(CommonString.KEY_DATE, "") ?: ""
|
||||||
|
val user_id = preferences.getString(CommonString.KEY_USERNAME, "") ?: ""
|
||||||
|
|
||||||
|
db.insertWebViewTimeSpent(
|
||||||
|
storeid,
|
||||||
|
visit_date,
|
||||||
|
start_time,
|
||||||
|
end_time,
|
||||||
|
spent.toString(),
|
||||||
|
merid,
|
||||||
|
user_id,
|
||||||
|
categoryId
|
||||||
|
)
|
||||||
|
|
||||||
|
Log.d("WEBVIEW_END_TIME", "End time is :$end_time and viewed for $spent sec ")
|
||||||
|
}
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
player?.release()
|
player?.release()
|
||||||
player = null
|
player = null
|
||||||
|
// pageStartTime = System.currentTimeMillis()
|
||||||
|
// Log.d("WEBVIEW_END_TIME", " viewed for $pageStartTime sec")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,6 +67,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockStorewiseGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockStorewiseGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingSubCategoryImageAllowGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingSubCategoryImageAllowGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MasterDetailerGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.Master_Storelist_PDA_GetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.Master_Storelist_PDA_GetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraLastVisitGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraLastVisitGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.NonT2pReasonGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.NonT2pReasonGetterSetter;
|
||||||
@@ -145,6 +146,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
Visit_Type_Master_GetterSetter visit_type_master_getterSetter;
|
Visit_Type_Master_GetterSetter visit_type_master_getterSetter;
|
||||||
Master_Storelist_PDA_GetterSetter masterStorelistPdaGetterSetter;
|
Master_Storelist_PDA_GetterSetter masterStorelistPdaGetterSetter;
|
||||||
NoticeboardGetterSetter noticeboardGetterSetter;
|
NoticeboardGetterSetter noticeboardGetterSetter;
|
||||||
|
MasterDetailerGetterSetter masterDetailerGetterSetter;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1910,9 +1912,9 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
|
|
||||||
//Mer_Noticeboard
|
//Mer_Noticeboard
|
||||||
/* request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||||
request.addProperty("UserName", userId);
|
request.addProperty("UserName", userId);
|
||||||
request.addProperty("Type", "Mer_NoticeBoard");
|
request.addProperty("Type", "MASTER_DETAILER");
|
||||||
request.addProperty("cultureid", culture_id);
|
request.addProperty("cultureid", culture_id);
|
||||||
|
|
||||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||||
@@ -1930,23 +1932,22 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
xpp.next();
|
xpp.next();
|
||||||
eventType = xpp.getEventType();
|
eventType = xpp.getEventType();
|
||||||
|
|
||||||
noticeboardGetterSetter = XMLHandlers.Noticeboard_XMLHandler(xpp, eventType);
|
masterDetailerGetterSetter = XMLHandlers.MasterDetailer_XMLHandler(xpp, eventType);
|
||||||
String stocktable = noticeboardGetterSetter.getTable_mer_noticeboard_detailer();
|
String stocktable = masterDetailerGetterSetter.getTable_MASTER_DETAILER();
|
||||||
if (stocktable != null) {
|
if (stocktable != null) {
|
||||||
resultHttp = CommonString.KEY_SUCCESS;
|
resultHttp = CommonString.KEY_SUCCESS;
|
||||||
TableBean.setNoticeboardData(stocktable);
|
TableBean.setTable_MASTER_DETAILER(stocktable);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (noticeboardGetterSetter.getNoticeBoardId().size() > 0) {
|
if (masterDetailerGetterSetter.getDTID().size() > 0) {
|
||||||
Log.d("mer_noticeboard","download");
|
Log.d("master_detailer","download");
|
||||||
data.value = 99;
|
data.value = 99;
|
||||||
data.name = "Mer_NoticeBoard" + getResources().getString(R.string.download_data);
|
data.name = "master_detailer" + getResources().getString(R.string.download_data);
|
||||||
} else {
|
} else {
|
||||||
// return "MAPPING_PHARMA_MSL";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
publishProgress(data);
|
||||||
publishProgress(data);*/
|
|
||||||
|
|
||||||
|
|
||||||
//Images DownLoads
|
//Images DownLoads
|
||||||
@@ -2182,6 +2183,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
db.InsertCATEGORYWISE_SOS_TARGET(store_category_wiseGetterSetter);
|
db.InsertCATEGORYWISE_SOS_TARGET(store_category_wiseGetterSetter);
|
||||||
db.InsertMAPPING_SKU_PRICING_ENABLE(mapping_sku_pricing_enableGetterSetter);
|
db.InsertMAPPING_SKU_PRICING_ENABLE(mapping_sku_pricing_enableGetterSetter);
|
||||||
db.InsertMaster_Storelist_Pda(masterStorelistPdaGetterSetter);
|
db.InsertMaster_Storelist_Pda(masterStorelistPdaGetterSetter);
|
||||||
|
db.InsertMasterDetailerData(masterDetailerGetterSetter);
|
||||||
// db.InsertNoticeBoardData(noticeboardGetterSetter);
|
// db.InsertNoticeBoardData(noticeboardGetterSetter);
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
ResultFlag = false;
|
ResultFlag = false;
|
||||||
|
|||||||
+37
-13
@@ -33,21 +33,27 @@ import java.util.Objects;
|
|||||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||||
import cpm.com.gskmtorange.GetterSetter.CategoryPictureGetterSetter;
|
import cpm.com.gskmtorange.GetterSetter.CategoryPictureGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.MainActivity;
|
||||||
import cpm.com.gskmtorange.R;
|
import cpm.com.gskmtorange.R;
|
||||||
import cpm.com.gskmtorange.constant.CommonFunctions;
|
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||||
import cpm.com.gskmtorange.constant.CommonString;
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
|
import cpm.com.gskmtorange.dailyentry.BannerActivity;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.AuditDataGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.AuditDataGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.CategoryGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MasterDetailerGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
||||||
|
|
||||||
public class CategoryListActivity extends AppCompatActivity {
|
public class CategoryListActivity extends AppCompatActivity {
|
||||||
private Context context;
|
private Context context;
|
||||||
RecyclerView recyclerView;
|
RecyclerView recyclerView;
|
||||||
ArrayList<CategoryGetterSetter> categoryList;
|
ArrayList<CategoryGetterSetter> categoryList;
|
||||||
|
|
||||||
|
ArrayList<MasterDetailerGetterSetter> bannerdatacheck;
|
||||||
|
|
||||||
CategoryListAdapter adapter;
|
CategoryListAdapter adapter;
|
||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow, country_id, store_flag_str, pog_type_id;
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow, country_id, store_flag_str, pog_type_id, mer_Id;
|
||||||
private SharedPreferences preferences;
|
private SharedPreferences preferences;
|
||||||
String visit_type_id = "";
|
String visit_type_id = "";
|
||||||
|
|
||||||
@@ -69,9 +75,9 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
||||||
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
||||||
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
||||||
|
mer_Id = preferences.getString(CommonString.KEY_MERCHANDISER_ID, "");
|
||||||
camera_allow = preferences.getString(CommonString.KEY_CAMERA_ALLOW, "");
|
camera_allow = preferences.getString(CommonString.KEY_CAMERA_ALLOW, "");
|
||||||
country_id = preferences.getString(CommonString.KEY_COUNTRY_ID, null);
|
country_id = preferences.getString(CommonString.KEY_COUNTRY_ID, null);
|
||||||
Log.d("countrydata",country_id);
|
|
||||||
store_flag_str = preferences.getString(CommonString.KEY_STORE_FLAG, null);
|
store_flag_str = preferences.getString(CommonString.KEY_STORE_FLAG, null);
|
||||||
pog_type_id = preferences.getString(CommonString.KEY_POG_TYPE_ID, "");
|
pog_type_id = preferences.getString(CommonString.KEY_POG_TYPE_ID, "");
|
||||||
preferences.getString(CommonString.KEY_VISIT_ID, "");
|
preferences.getString(CommonString.KEY_VISIT_ID, "");
|
||||||
@@ -80,6 +86,8 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab_category);
|
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab_category);
|
||||||
|
|
||||||
|
bannerdatacheck = db.getMasterDetailerData("MASTER_DETAILER");
|
||||||
fab.setOnClickListener(view -> Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG).setAction("Action", null).show());
|
fab.setOnClickListener(view -> Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG).setAction("Action", null).show());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,6 +108,18 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
categoryList = db.getCategoryListData(keyAccount_id, storeType_id, class_id, store_id, "MAPPING_STOCK");
|
categoryList = db.getCategoryListData(keyAccount_id, storeType_id, class_id, store_id, "MAPPING_STOCK");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add a manual KPI tile for "Detailer" (manual usage without a DB category id)
|
||||||
|
// This will appear as an extra item in the grid. The id used is a reserved key
|
||||||
|
// "detailer_manual" and its images are mapped in getImageRes().
|
||||||
|
try {
|
||||||
|
CategoryGetterSetter detailer = new CategoryGetterSetter();
|
||||||
|
detailer.setCategory("Detailer");
|
||||||
|
detailer.setCategory_id("detailer_manual");
|
||||||
|
categoryList.add(detailer);
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
// If CategoryGetterSetter constructor/signatures differ, skip adding manually.
|
||||||
|
}
|
||||||
|
|
||||||
if (categoryList != null && !categoryList.isEmpty()) {
|
if (categoryList != null && !categoryList.isEmpty()) {
|
||||||
for (int i = 0; i < categoryList.size(); i++) {
|
for (int i = 0; i < categoryList.size(); i++) {
|
||||||
String category_id = categoryList.get(i).getCategory_id();
|
String category_id = categoryList.get(i).getCategory_id();
|
||||||
@@ -120,6 +140,7 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
imageRes = switch (category_id) {
|
imageRes = switch (category_id) {
|
||||||
case "1" -> R.mipmap.health_food_drink_tick;
|
case "1" -> R.mipmap.health_food_drink_tick;
|
||||||
case "2" -> R.mipmap.oralcare_tick;
|
case "2" -> R.mipmap.oralcare_tick;
|
||||||
|
case "detailer_manual" -> R.mipmap.oralcare_tick;
|
||||||
case "3" -> R.mipmap.wellness_tick;
|
case "3" -> R.mipmap.wellness_tick;
|
||||||
case "4" -> R.mipmap.nutritionals_tick;
|
case "4" -> R.mipmap.nutritionals_tick;
|
||||||
case "5" -> R.mipmap.gastro_n_indigestion_tick;
|
case "5" -> R.mipmap.gastro_n_indigestion_tick;
|
||||||
@@ -132,6 +153,7 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
imageRes = switch (category_id) {
|
imageRes = switch (category_id) {
|
||||||
case "1" -> R.mipmap.health_food_drink;
|
case "1" -> R.mipmap.health_food_drink;
|
||||||
case "2" -> R.mipmap.oral_care;
|
case "2" -> R.mipmap.oral_care;
|
||||||
|
case "detailer_manual" -> R.mipmap.oral_care;
|
||||||
case "3" -> R.mipmap.wellness;
|
case "3" -> R.mipmap.wellness;
|
||||||
case "4" -> R.mipmap.nutritionals;
|
case "4" -> R.mipmap.nutritionals;
|
||||||
case "5" -> R.mipmap.gastro_n_indigestion;
|
case "5" -> R.mipmap.gastro_n_indigestion;
|
||||||
@@ -231,20 +253,15 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
// Handle action bar item clicks here. The action bar will
|
|
||||||
// automatically handle clicks on the Home/Up button, so long
|
|
||||||
// as you specify a parent activity in AndroidManifest.xml.
|
|
||||||
int id = item.getItemId();
|
int id = item.getItemId();
|
||||||
if (id == android.R.id.home) {
|
if (id == android.R.id.home) {
|
||||||
finish();
|
finish();
|
||||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
//noinspection SimplifiableIfStatement
|
//noinspection SimplifiableIfStatement
|
||||||
if (id == R.id.action_settings) {
|
if (id == R.id.action_settings) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,11 +297,19 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
Log.e("CatImg--", "" + categoryData.getCategory_img());
|
Log.e("CatImg--", "" + categoryData.getCategory_img());
|
||||||
holder.categoryIcon.setImageResource(categoryData.getCategory_img());
|
holder.categoryIcon.setImageResource(categoryData.getCategory_img());
|
||||||
holder.lay_menu.setOnClickListener(view -> {
|
holder.lay_menu.setOnClickListener(view -> {
|
||||||
Intent intent = new Intent(CategoryListActivity.this, CategoryWisePerformanceActivity.class);
|
if(categoryData.getCategory().equalsIgnoreCase("Detailer")){
|
||||||
intent.putExtra("categoryName", categoryData.getCategory());
|
Intent intent = new Intent(CategoryListActivity.this, BannerActivity.class);
|
||||||
intent.putExtra("categoryId", categoryData.getCategory_id());
|
intent.putExtra("StoreId", store_id);
|
||||||
startActivity(intent);
|
intent.putExtra("MerId",mer_Id);
|
||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
startActivity(intent);
|
||||||
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
} else{
|
||||||
|
Intent intent = new Intent(CategoryListActivity.this, CategoryWisePerformanceActivity.class);
|
||||||
|
intent.putExtra("categoryName", categoryData.getCategory());
|
||||||
|
intent.putExtra("categoryId", categoryData.getCategory_id());
|
||||||
|
startActivity(intent);
|
||||||
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -344,7 +369,6 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//New MSL_Availability_StockFacing
|
|
||||||
if (country_id.equals("10") || country_id.equals("8")) {
|
if (country_id.equals("10") || country_id.equals("8")) {
|
||||||
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
|
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
|
||||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
|
|||||||
+32
-7
@@ -44,6 +44,7 @@ import cpm.com.gskmtorange.constant.CommonUtils;
|
|||||||
import cpm.com.gskmtorange.dailyentry.AdditionalPromoSKUwiseActivity;
|
import cpm.com.gskmtorange.dailyentry.AdditionalPromoSKUwiseActivity;
|
||||||
import cpm.com.gskmtorange.dailyentry.AdditionalVisibility;
|
import cpm.com.gskmtorange.dailyentry.AdditionalVisibility;
|
||||||
import cpm.com.gskmtorange.dailyentry.AuditActivity;
|
import cpm.com.gskmtorange.dailyentry.AuditActivity;
|
||||||
|
import cpm.com.gskmtorange.dailyentry.BannerActivity;
|
||||||
import cpm.com.gskmtorange.dailyentry.CategoryPicture;
|
import cpm.com.gskmtorange.dailyentry.CategoryPicture;
|
||||||
import cpm.com.gskmtorange.dailyentry.CompetitionPromoActivity;
|
import cpm.com.gskmtorange.dailyentry.CompetitionPromoActivity;
|
||||||
import cpm.com.gskmtorange.dailyentry.CounterfeitProductsActivity;
|
import cpm.com.gskmtorange.dailyentry.CounterfeitProductsActivity;
|
||||||
@@ -477,17 +478,23 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.competition);
|
data.setCategory_img(R.mipmap.competition);
|
||||||
}
|
}
|
||||||
|
|
||||||
data.setCategory_name(getString(R.string.title_activity_competition_promo));
|
data.setCategory_name(getString(R.string.title_activity_competition_promo));
|
||||||
categoryList.add(data);
|
categoryList.add(data);
|
||||||
|
|
||||||
data = new DailyDataMenuGetterSetter();
|
|
||||||
data.setCategory_img(R.mipmap.competition);
|
|
||||||
data.setCategory_name("");
|
|
||||||
categoryList.add(data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Detailer
|
||||||
|
data = new DailyDataMenuGetterSetter();
|
||||||
|
data.setCategory_name("Detailer");
|
||||||
|
data.setCategory_img(R.mipmap.oral_care);
|
||||||
|
categoryList.add(data);
|
||||||
|
|
||||||
|
if (categoryList.size() % 2 != 0) {
|
||||||
|
data = new DailyDataMenuGetterSetter();
|
||||||
|
data.setCategory_name("");
|
||||||
|
categoryList.add(data);
|
||||||
|
}
|
||||||
|
|
||||||
//IR Images
|
//IR Images
|
||||||
data = new DailyDataMenuGetterSetter();
|
data = new DailyDataMenuGetterSetter();
|
||||||
ArrayList<CategoryPictureGetterSetter> ir_list = isPdIRMapping();
|
ArrayList<CategoryPictureGetterSetter> ir_list = isPdIRMapping();
|
||||||
@@ -641,7 +648,13 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
public void onBindViewHolder(final DailyDataMenuAdapter.MyViewHolder holder, int position) {
|
public void onBindViewHolder(final DailyDataMenuAdapter.MyViewHolder holder, int position) {
|
||||||
final DailyDataMenuGetterSetter dailyData = list.get(position);
|
final DailyDataMenuGetterSetter dailyData = list.get(position);
|
||||||
holder.categoryName.setText(dailyData.getCategory_name());
|
holder.categoryName.setText(dailyData.getCategory_name());
|
||||||
holder.categoryIcon.setImageResource(dailyData.getCategory_img());
|
if (dailyData.getCategory_img() != -1) {
|
||||||
|
holder.categoryIcon.setImageResource(dailyData.getCategory_img());
|
||||||
|
} else {
|
||||||
|
holder.categoryIcon.setImageResource(0);
|
||||||
|
}
|
||||||
|
holder.lay_menu.setVisibility(View.VISIBLE);
|
||||||
|
holder.categoryName.setVisibility(View.VISIBLE);
|
||||||
holder.irview.setVisibility(View.GONE);
|
holder.irview.setVisibility(View.GONE);
|
||||||
db.open();
|
db.open();
|
||||||
visittypelist = db.getInsertedVisitType(store_id, visit_date, "3");
|
visittypelist = db.getInsertedVisitType(store_id, visit_date, "3");
|
||||||
@@ -757,6 +770,9 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
holder.categoryName.setTextColor(isPdPogIRMapping() != null && !isPdPogIRMapping().isEmpty() && camera_allow.equals("1")
|
holder.categoryName.setTextColor(isPdPogIRMapping() != null && !isPdPogIRMapping().isEmpty() && camera_allow.equals("1")
|
||||||
? ContextCompat.getColor(context, R.color.black) : ContextCompat.getColor(context, R.color.grey_background));
|
? ContextCompat.getColor(context, R.color.black) : ContextCompat.getColor(context, R.color.grey_background));
|
||||||
}*/
|
}*/
|
||||||
|
else if (dailyData.getCategory_name().equalsIgnoreCase("Detailer")) {
|
||||||
|
holder.categoryName.setTextColor(ContextCompat.getColor(context, R.color.black));
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
holder.irview.setVisibility(View.GONE);
|
holder.irview.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@@ -827,6 +843,15 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (dailyData.getCategory_name().equalsIgnoreCase("Detailer")) {
|
||||||
|
Intent intent = new Intent(DailyDataMenuActivity.this, BannerActivity.class);
|
||||||
|
String merId = preferences.getString(CommonString.KEY_MERCHANDISER_ID, "");
|
||||||
|
intent.putExtra("StoreId", store_id);
|
||||||
|
intent.putExtra("MerId", merId);
|
||||||
|
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_image))) {
|
else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.title_activity_ir_image))) {
|
||||||
if (isPdIRMapping() != null && !isPdIRMapping().isEmpty() && camera_allow.equals("1")) {
|
if (isPdIRMapping() != null && !isPdIRMapping().isEmpty() && camera_allow.equals("1")) {
|
||||||
Intent intent = new Intent(DailyDataMenuActivity.this, PDimageActivity.class);
|
Intent intent = new Intent(DailyDataMenuActivity.this, PDimageActivity.class);
|
||||||
|
|||||||
@@ -598,9 +598,9 @@ public class MPinActivity extends AppCompatActivity implements BlurLockView.OnPa
|
|||||||
editor.putString("NOTICEBOARD_DATA", noticeJson);
|
editor.putString("NOTICEBOARD_DATA", noticeJson);
|
||||||
editor.apply();
|
editor.apply();
|
||||||
|
|
||||||
} else {
|
} /*else {
|
||||||
return CommonString.KEY_FAILURE;
|
return CommonString.KEY_FAILURE;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
} catch (XmlPullParserException | IOException e) {
|
} catch (XmlPullParserException | IOException e) {
|
||||||
e.fillInStackTrace();
|
e.fillInStackTrace();
|
||||||
|
|||||||
+70
@@ -0,0 +1,70 @@
|
|||||||
|
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class MasterDetailerGetterSetter {
|
||||||
|
String Table_MASTER_DETAILER;
|
||||||
|
|
||||||
|
ArrayList<String> DTID = new ArrayList<>();
|
||||||
|
ArrayList<String> DT_LEVEL = new ArrayList<>();
|
||||||
|
ArrayList<String> DT_NAME = new ArrayList<>();
|
||||||
|
ArrayList<String> CATEGORY_ID = new ArrayList<>();
|
||||||
|
ArrayList<String> DT_URL = new ArrayList<>();
|
||||||
|
ArrayList<String> DT_THUMBNAIL = new ArrayList<>();
|
||||||
|
|
||||||
|
public String getTable_MASTER_DETAILER() {
|
||||||
|
return Table_MASTER_DETAILER;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTable_MASTER_DETAILER(String table_MASTER_DETAILER) {
|
||||||
|
Table_MASTER_DETAILER = table_MASTER_DETAILER;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getDTID() {
|
||||||
|
return DTID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDTID(String DTID) {
|
||||||
|
this.DTID.add(DTID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getDT_LEVEL() {
|
||||||
|
return DT_LEVEL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDT_LEVEL(String DT_LEVEL) {
|
||||||
|
this.DT_LEVEL.add(DT_LEVEL);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getDT_NAME() {
|
||||||
|
return DT_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDT_NAME(String DT_NAME) {
|
||||||
|
this.DT_NAME.add(DT_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getCATEGORY_ID() {
|
||||||
|
return CATEGORY_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCATEGORY_ID(String CATEGORY_ID) {
|
||||||
|
this.CATEGORY_ID.add(CATEGORY_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getDT_URL() {
|
||||||
|
return DT_URL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDT_URL(String DT_URL) {
|
||||||
|
this.DT_URL.add(DT_URL);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getDT_THUMBNAIL() {
|
||||||
|
return DT_THUMBNAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDT_THUMBNAIL(String DT_THUMBNAIL) {
|
||||||
|
this.DT_THUMBNAIL.add(DT_THUMBNAIL);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -76,8 +76,15 @@ public class TableBean {
|
|||||||
public static String Table_MAPPING_PLANOGRAM_STORE_WISE;
|
public static String Table_MAPPING_PLANOGRAM_STORE_WISE;
|
||||||
public static String Table_PROMOTION_TYPE_MASTER;
|
public static String Table_PROMOTION_TYPE_MASTER;
|
||||||
public static String Table_ORDER_RECEIVED_STATUS;
|
public static String Table_ORDER_RECEIVED_STATUS;
|
||||||
|
public static String Table_MASTER_DETAILER;
|
||||||
|
|
||||||
|
public static String getTable_MASTER_DETAILER() {
|
||||||
|
return Table_MASTER_DETAILER;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setTable_MASTER_DETAILER(String table_MASTER_DETAILER) {
|
||||||
|
Table_MASTER_DETAILER = table_MASTER_DETAILER;
|
||||||
|
}
|
||||||
|
|
||||||
public static String Table_Master_PDA_STORE_LIST;
|
public static String Table_Master_PDA_STORE_LIST;
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_ADDITIONAL_PROMOTION_MasterGe
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_MasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_MasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_SKU_PRICING_ENABLEGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_SKU_PRICING_ENABLEGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_SOS_TARGET_MasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_SOS_TARGET_MasterGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MasterDetailerGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingCategoryImageAllowGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingCategoryImageAllowGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPharmaMSLGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPharmaMSLGetterSetter;
|
||||||
@@ -1914,6 +1915,46 @@ public class XMLHandlers {
|
|||||||
return noticeboardGetterSetter;
|
return noticeboardGetterSetter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static MasterDetailerGetterSetter MasterDetailer_XMLHandler(XmlPullParser xpp,
|
||||||
|
int eventType) {
|
||||||
|
MasterDetailerGetterSetter masterDetailerGetterSetter = new MasterDetailerGetterSetter();
|
||||||
|
try {
|
||||||
|
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||||
|
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||||
|
if (xpp.getName().equals("META_DATA")) {
|
||||||
|
masterDetailerGetterSetter.setTable_MASTER_DETAILER(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("DTID")) {
|
||||||
|
masterDetailerGetterSetter.setDTID(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("DT_LEVEL")) {
|
||||||
|
masterDetailerGetterSetter.setDT_LEVEL(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("DT_NAME")) {
|
||||||
|
masterDetailerGetterSetter.setDT_NAME(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("CATEGORY_ID")) {
|
||||||
|
masterDetailerGetterSetter.setCATEGORY_ID(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("DT_URL")) {
|
||||||
|
masterDetailerGetterSetter.setDT_URL(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("DT_THUMBNAIL")) {
|
||||||
|
masterDetailerGetterSetter.setDT_THUMBNAIL(xpp.nextText());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xpp.next();
|
||||||
|
}
|
||||||
|
} catch (XmlPullParserException e) {
|
||||||
|
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IOException e) {
|
||||||
|
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return masterDetailerGetterSetter;
|
||||||
|
}
|
||||||
|
|
||||||
// JCP XML HANDLER
|
// JCP XML HANDLER
|
||||||
public static PD_CONFIGURATION PDConfigXMLHandler(XmlPullParser xpp) {
|
public static PD_CONFIGURATION PDConfigXMLHandler(XmlPullParser xpp) {
|
||||||
PD_CONFIGURATION jcpGetterSetter = new PD_CONFIGURATION();
|
PD_CONFIGURATION jcpGetterSetter = new PD_CONFIGURATION();
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".dailyentry.BannerActivity">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:elevation="8dp"
|
||||||
|
app:theme="@style/ThemeOverlay.AppCompat.Light"
|
||||||
|
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:clipToPadding="false" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardElevation="4dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imgThumbnail"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@mipmap/ic_launcher" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvName"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:text="Detailer Name"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
Reference in New Issue
Block a user