Compare commits

..

10 Commits

Author SHA1 Message Date
ravik 3634dc0fa9 initial_commit 2026-05-15 16:30:56 +05:30
ravik f1bdf73db2 geofence update code 2026-03-28 18:11:58 +05:30
jeevanp 5801aa3e6f added qr-generator in ba-assessment 2025-12-30 12:58:54 +05:30
jeevanp 9142924800 Added BA assessment and fixed baskinGss 2025-12-19 17:39:01 +05:30
ravik a1f14ac912 minsdk23 2025-09-26 19:03:00 +05:30
ravik cd4c4cc8e0 lockout-preference 2025-09-12 18:25:46 +05:30
ravik acb841cc11 Range_Promotion and locked feature 2025-09-09 19:01:59 +05:30
ravik d3033db48c Geotag and Geofence changes 2025-08-06 15:02:25 +05:30
ravik fb03926973 Geotag_geofence_checkout_profilemandate 2025-08-04 17:09:08 +05:30
Jeevan Prasad a263278382 Added Profile Mandate Alert Popup 2025-07-04 12:40:00 +05:30
634 changed files with 8754 additions and 3069 deletions
+16
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -22,8 +22,8 @@
<InsightsFilterSettings>
<option name="connection">
<ConnectionSetting>
<option name="appId" value="com.cpm.lorealbaautomation" />
<option name="mobileSdkAppId" value="1:629309347341:android:f9490de7c22042e2" />
<option name="appId" value="com.cpm.lorealbaMabeline" />
<option name="mobileSdkAppId" value="1:629309347341:android:79b6975868639be937a744" />
<option name="projectId" value="silicon-airlock-129611" />
<option name="projectNumber" value="629309347341" />
</ConnectionSetting>
+8
View File
@@ -4,6 +4,14 @@
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2026-04-17T05:11:06.218957500Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\ravik\.android\avd\Pixel_2.avd" />
</handle>
</Target>
</DropdownSelection>
<DialogSelection />
</SelectionState>
</selectionStates>
</component>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DeviceTable">
<option name="columnSorters">
<list>
<ColumnSorterState>
<option name="column" value="Name" />
<option name="order" value="ASCENDING" />
</ColumnSorterState>
</list>
</option>
</component>
</project>
+1 -2
View File
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="ms-17" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
+3 -1
View File
@@ -3,6 +3,8 @@ apply plugin: 'com.android.library'
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
@@ -16,7 +18,7 @@ ext {
PUBLISH_VERSION_CODE = 11
SUPPORT_VERSION = '25.3.1'
TARGET_SDK = 35
MIN_SDK = 24
MIN_SDK = 23
}
android {
+6
View File
@@ -13,3 +13,9 @@
.externalNativeBuild
.cxx
local.properties
# Android build outputs
*.apk
*.aab
/build
/app/build
+15 -14
View File
@@ -5,15 +5,15 @@ apply plugin: 'org.jetbrains.kotlin.android'
android {
namespace("com.cpm.lorealbaautomation")
namespace("com.cpm.lorealbaMabeline")
compileSdk(35)
defaultConfig {
minSdkVersion 29
applicationId "com.cpm.lorealbaautomation"
minSdkVersion 23
applicationId "com.cpm.lorealbaMabeline"
//noinspection OldTargetApi
targetSdk 34
versionCode 20
versionName "2.9"
versionCode 23
versionName "3.1"
multiDexEnabled true
useLibrary 'org.apache.http.legacy'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -21,7 +21,6 @@ android {
abiFilters.add("armeabi-v7a")
abiFilters.add("arm64-v8a")
}
}
signingConfigs {
config {
@@ -33,10 +32,10 @@ android {
}
buildTypes {
release {
buildConfigField "boolean", "LOG_ENABLED", "true"
debuggable true
minifyEnabled true
shrinkResources true
//buildConfigField "boolean", "LOG_ENABLED", "true"
debuggable false
minifyEnabled false
shrinkResources false
signingConfig signingConfigs.config
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
firebaseCrashlytics {
@@ -73,12 +72,14 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.4.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
implementation 'org.jetbrains:annotations-java5:15.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
//noinspection GradleDependency
implementation 'com.squareup.retrofit2:retrofit:2.0.2'
//noinspection GradleDependency
implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
implementation 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.github.bumptech.glide:glide:4.16.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'
implementation 'de.hdodenhof:circleimageview:3.1.0'
+1 -1
View File
@@ -2250,7 +2250,7 @@
"client_info": {
"mobilesdk_app_id": "1:629309347341:android:f9490de7c22042e2",
"android_client_info": {
"package_name": "com.cpm.lorealbaautomation"
"package_name": "com.cpm.lorealbaMabeline"
}
},
"oauth_client": [
Binary file not shown.
Binary file not shown.
+3 -3
View File
@@ -4,15 +4,15 @@
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.cpm.lorealbaautomation",
"applicationId": "com.cpm.lorealbaMabeline",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 20,
"versionName": "2.9",
"versionCode": 23,
"versionName": "3.1",
"outputFile": "app-release.apk"
}
],
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation;
package com.cpm.lorealbaMabeline;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -21,6 +21,6 @@ public class ExampleInstrumentedTest {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getContext();
assertEquals("com.cpm.lorealbaautomation", appContext.getPackageName());
assertEquals("com.cpm.lorealbaMabeline", appContext.getPackageName());
}
}
+101 -91
View File
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.cpm.lorealbaautomation">
package="com.cpm.lorealbaMabeline">
<permission
android:name="com.cpm.lorealbaautomation.android.permission.SET_TIME"
android:name="com.cpm.lorealbaMabeline.android.permission.SET_TIME"
android:protectionLevel="signature|system"
tools:ignore="ReservedSystemPermission" />
<supports-screens
@@ -33,7 +33,7 @@
android:required="true" />
<application
android:name=".LorealBa"
android:name="com.cpm.lorealbaMabeline.LorealBa"
android:hardwareAccelerated="true"
android:icon="@mipmap/app_icon_rec"
android:label="@string/app_name"
@@ -47,142 +47,142 @@
tools:ignore="DataExtractionRules">
<activity
android:name=".reports.PerformanceHistoryActivity"
android:name="com.cpm.lorealbaMabeline.reports.PerformanceHistoryActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.MeSaleReport"
android:name="com.cpm.lorealbaMabeline.reports.MeSaleReport"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.RetailExcellenceActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.RetailExcellenceActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".makeupexpert.SalesActivity"
android:name="com.cpm.lorealbaMabeline.makeupexpert.SalesActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".competitionoffer.CompetitionOfferActivity"
android:name="com.cpm.lorealbaMabeline.competitionoffer.CompetitionOfferActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.SkinGeniusScreenshotActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.SkinGeniusScreenshotActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.SkinGeniusCategoryActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.SkinGeniusCategoryActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".timer.TimerActivity"
android:name="com.cpm.lorealbaMabeline.timer.TimerActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".upload.UploadKeyData"
android:name="com.cpm.lorealbaMabeline.upload.UploadKeyData"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".upload.ManualUploadActivity"
android:name="com.cpm.lorealbaMabeline.upload.ManualUploadActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".consumeractivity.ConsumerReturnReplaceProductActivity"
android:name="com.cpm.lorealbaMabeline.consumeractivity.ConsumerReturnReplaceProductActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.SalesReportsActivity"
android:name="com.cpm.lorealbaMabeline.reports.SalesReportsActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.ReportDayWiseActivity"
android:name="com.cpm.lorealbaMabeline.reports.ReportDayWiseActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.ReportConsumerWiseActivity"
android:name="com.cpm.lorealbaMabeline.reports.ReportConsumerWiseActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.ReportConsumerProductWiseActivity"
android:name="com.cpm.lorealbaMabeline.reports.ReportConsumerProductWiseActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.FilledRegularStockDataActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.FilledRegularStockDataActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.TargetAchievementActivity"
android:name="com.cpm.lorealbaMabeline.reports.TargetAchievementActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".promooffer.PromoOffersActivity"
android:name="com.cpm.lorealbaMabeline.promooffer.PromoOffersActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".promooffer.PromoOfferDetailsActivity"
android:name="com.cpm.lorealbaMabeline.promooffer.PromoOfferDetailsActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.MeQuizListActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.MeQuizListActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.DamagedCategoryActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.DamagedCategoryActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".pinviewactivity.PinViewActivity"
android:name="com.cpm.lorealbaMabeline.pinviewactivity.PinViewActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.GWPActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.GWPActivity"
android:exported="false"
android:label="@string/title_activity_gwp"
android:screenOrientation="portrait"
@@ -190,7 +190,7 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.BAProfileActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.BAProfileActivity"
android:exported="false"
android:label="@string/title_activity_baprofile"
android:screenOrientation="portrait"
@@ -198,7 +198,7 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.VisibilityElimentsActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.VisibilityElimentsActivity"
android:exported="false"
android:label="@string/title_activity_visibility_eliments"
android:screenOrientation="portrait"
@@ -206,7 +206,7 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.CounterProfileActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.CounterProfileActivity"
android:exported="false"
android:label="@string/title_activity_visibility_eliments"
android:screenOrientation="portrait"
@@ -214,7 +214,7 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.StoreImageActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.StoreImageActivity"
android:exported="false"
android:label="@string/title_activity_store_image"
android:screenOrientation="portrait"
@@ -222,7 +222,7 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.SuggestedStockActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.SuggestedStockActivity"
android:exported="false"
android:label="@string/title_activity_suggested_stock"
android:screenOrientation="portrait"
@@ -230,7 +230,7 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.DamagedActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.DamagedActivity"
android:exported="false"
android:label="@string/title_activity_damaged"
android:screenOrientation="portrait"
@@ -238,7 +238,7 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.SampleStockActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.SampleStockActivity"
android:exported="false"
android:label="@string/title_activity_sample_stock"
android:screenOrientation="portrait"
@@ -246,7 +246,7 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.TesterStockActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.TesterStockActivity"
android:exported="false"
android:label="@string/title_activity_tester_stock"
android:screenOrientation="portrait"
@@ -254,14 +254,14 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.GroomedActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.GroomedActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.TabLoginActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.TabLoginActivity"
android:exported="false"
android:label="@string/title_activity_change_password"
android:screenOrientation="portrait"
@@ -269,7 +269,7 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".UserLoginActivity"
android:name="com.cpm.lorealbaMabeline.UserLoginActivity"
android:exported="false"
android:label="@string/title_activity_user_login"
android:screenOrientation="portrait"
@@ -278,7 +278,7 @@
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".password.MPinActivity"
android:name="com.cpm.lorealbaMabeline.password.MPinActivity"
android:exported="false"
android:label="@string/title_activity_mpin"
android:screenOrientation="portrait"
@@ -286,7 +286,7 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".password.ChangePasswordActivity"
android:name="com.cpm.lorealbaMabeline.password.ChangePasswordActivity"
android:exported="false"
android:label="@string/title_activity_change_password"
android:screenOrientation="portrait"
@@ -294,7 +294,7 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".AutoUpdateActivity"
android:name="com.cpm.lorealbaMabeline.AutoUpdateActivity"
android:exported="false"
android:label="@string/title_activity_auto_update"
android:screenOrientation="portrait"
@@ -302,21 +302,21 @@
android:windowSoftInputMode="stateHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".DealarBoardActivity"
android:name="com.cpm.lorealbaMabeline.DealarBoardActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.CounterImageActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.CounterImageActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".IMEILoginActivity"
android:name="com.cpm.lorealbaMabeline.IMEILoginActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
@@ -328,14 +328,14 @@
</intent-filter>
</activity>
<activity
android:name=".CounterLoginActivity"
android:name="com.cpm.lorealbaMabeline.CounterLoginActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".download.DownloadActivity"
android:name="com.cpm.lorealbaMabeline.download.DownloadActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
@@ -354,46 +354,46 @@
android:theme="@style/ThemeFullscreen"
tools:ignore="DiscouragedApi,LockedOrientationActivity" /> <!-- for custom camera -->
<activity
android:name=".dailyactivity.ServiceActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.ServiceActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.ConsumerReturnActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.ConsumerReturnActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.StockCheckActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.StockCheckActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.NotificationDetailActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.NotificationDetailActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.NotificationsActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.NotificationsActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.InWardStockActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.InWardStockActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.InwardStockDetailsActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.InwardStockDetailsActivity"
android:label="@string/title_activity_suggested_stock"
android:screenOrientation="portrait"
android:exported="false"
@@ -401,21 +401,21 @@
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".consumeractivity.InvoiceReportProformaActivity"
android:name="com.cpm.lorealbaMabeline.consumeractivity.InvoiceReportProformaActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".consumeractivity.ConsumerUserDetailsActivity"
android:name="com.cpm.lorealbaMabeline.consumeractivity.ConsumerUserDetailsActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".consumeractivity.ConsumerIntractionDetailActivity"
android:name="com.cpm.lorealbaMabeline.consumeractivity.ConsumerIntractionDetailActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
@@ -423,21 +423,21 @@
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".printer.PrinterActivity"
android:name="com.cpm.lorealbaMabeline.printer.PrinterActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".printer.DeviceListActivity"
android:name="com.cpm.lorealbaMabeline.printer.DeviceListActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.ManualInWardStockActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.ManualInWardStockActivity"
android:label="@string/title_activity_suggested_stock"
android:screenOrientation="portrait"
android:exported="false"
@@ -445,21 +445,21 @@
android:windowSoftInputMode="adjustPan|stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".leavemanagement.ApplyForLeaveActivity"
android:name="com.cpm.lorealbaMabeline.leavemanagement.ApplyForLeaveActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".leavemanagement.LeaveManagemntActivity"
android:name="com.cpm.lorealbaMabeline.leavemanagement.LeaveManagemntActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".breakmanagement.BreakManagementActivity"
android:name="com.cpm.lorealbaMabeline.breakmanagement.BreakManagementActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
@@ -467,84 +467,84 @@
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".consumeractivity.ConsumerReturnsHistoryActivity"
android:name="com.cpm.lorealbaMabeline.consumeractivity.ConsumerReturnsHistoryActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.MyLibraryActivity"
android:name="com.cpm.lorealbaMabeline.reports.MyLibraryActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.ReportsTop10Value"
android:name="com.cpm.lorealbaMabeline.reports.ReportsTop10Value"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.ReportsActivity"
android:name="com.cpm.lorealbaMabeline.reports.ReportsActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.ReportsInwordStock"
android:name="com.cpm.lorealbaMabeline.reports.ReportsInwordStock"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.ReportAttendanceSummaryActivity"
android:name="com.cpm.lorealbaMabeline.reports.ReportAttendanceSummaryActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.TesterReportActivity"
android:name="com.cpm.lorealbaMabeline.reports.TesterReportActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.KPITrackerActivity"
android:name="com.cpm.lorealbaMabeline.reports.KPITrackerActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.DashbordOffTakeReportActivity"
android:name="com.cpm.lorealbaMabeline.reports.DashbordOffTakeReportActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.dailyTva.DailyTVAActivity"
android:name="com.cpm.lorealbaMabeline.reports.dailyTva.DailyTVAActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.testerdetails.TesterUsageReportActivity"
android:name="com.cpm.lorealbaMabeline.reports.testerdetails.TesterUsageReportActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.countervaluevolume.CounterValueVolumeDetailActivity"
android:name="com.cpm.lorealbaMabeline.reports.countervaluevolume.CounterValueVolumeDetailActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
@@ -552,42 +552,42 @@
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.inwarddetails.CounterInwordDetailActivity"
android:name="com.cpm.lorealbaMabeline.reports.inwarddetails.CounterInwordDetailActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".forgotpassword.ForgotpasswordActity"
android:name="com.cpm.lorealbaMabeline.forgotpassword.ForgotpasswordActity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.ReportBaAvailability"
android:name="com.cpm.lorealbaMabeline.reports.ReportBaAvailability"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".makeupexpert.MakeoverDetailsActivity"
android:name="com.cpm.lorealbaMabeline.makeupexpert.MakeoverDetailsActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".makeupexpert.MakeoverActivity"
android:name="com.cpm.lorealbaMabeline.makeupexpert.MakeoverActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".makeupexpert.MEQuizActivity"
android:name="com.cpm.lorealbaMabeline.makeupexpert.MEQuizActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
@@ -601,33 +601,34 @@
tools:replace="screenOrientation" />
<activity
android:name=".notification.NotificationView"
android:name="com.cpm.lorealbaMabeline.notification.NotificationView"
android:label="Details of notification"
android:parentActivityName=".DealarBoardActivity"
android:parentActivityName="com.cpm.lorealbaMabeline.DealarBoardActivity"
android:screenOrientation="portrait"
android:exported="false"
tools:ignore="DiscouragedApi,LockedOrientationActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".DealarBoardActivity" />
android:value="com.cpm.lorealbaMabeline.DealarBoardActivity" />
</activity>
<activity
android:name=".dailyactivity.BASurveyActivity"
android:name="com.cpm.lorealbaMabeline.dailyactivity.BASurveyActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.BASurveyListActivity"
android:screenOrientation="portrait"
android:name="com.cpm.lorealbaMabeline.dailyactivity.BASurveyListActivity"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
android:screenOrientation="portrait"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".reports.DamagedStockHistory"
android:name="com.cpm.lorealbaMabeline.reports.DamagedStockHistory"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
@@ -635,7 +636,7 @@
tools:ignore="DiscouragedApi,LockedOrientationActivity"/>
<activity
android:name=".leavemanagement.LeaveCalenderViewActivity"
android:name="com.cpm.lorealbaMabeline.leavemanagement.LeaveCalenderViewActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
@@ -643,7 +644,7 @@
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".geotag.GeoTaggingActivity"
android:name="com.cpm.lorealbaMabeline.geotag.GeoTaggingActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
@@ -651,7 +652,15 @@
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".checkout.BaCheckoutActivity"
android:name="com.cpm.lorealbaMabeline.checkout.BaCheckoutActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity
android:name=".dailyactivity.BaAssessmentActivity"
android:screenOrientation="portrait"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar"
@@ -674,6 +683,7 @@
android:exported="false"
android:grantUriPermissions="true"
tools:replace="android:authorities">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"
@@ -681,14 +691,14 @@
</provider>
<service
android:name=".service.MyFirebaseMessagingService"
android:name="com.cpm.lorealbaMabeline.service.MyFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".download.Downloader"
android:name="com.cpm.lorealbaMabeline.download.Downloader"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
</application>
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation;
package com.cpm.lorealbaMabeline;
import android.annotation.SuppressLint;
import android.app.Activity;
@@ -14,12 +14,15 @@ import android.os.Build;
import android.os.Bundle;
import androidx.core.content.FileProvider;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Handler;
import android.os.Looper;
import android.view.Window;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonString;
import java.io.File;
import java.io.FileOutputStream;
@@ -151,18 +154,28 @@ public class AutoUpdateActivity extends AppCompatActivity {
Uri apkUri;
Intent intent;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
apkUri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".fileprovider", toInstall);
intent = new Intent(Intent.ACTION_INSTALL_PACKAGE);
intent.setData(apkUri);
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
apkUri = FileProvider.getUriForFile(context,
BuildConfig.APPLICATION_ID + ".fileprovider",
toInstall);
intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(apkUri, "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
context.startActivity(intent);
} else {
apkUri = Uri.fromFile(toInstall);
intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(apkUri, "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
startActivity(intent);
finish();
// Optional: close the updater activity gracefully
new Handler(Looper.getMainLooper()).postDelayed(() -> {
((Activity) context).finishAffinity();
}, 1000);
}
}
}
@@ -1,6 +1,6 @@
package com.cpm.lorealbaautomation;
package com.cpm.lorealbaMabeline;
import static com.cpm.lorealbaautomation.constant.CommonFunctions.checkincomplete_upload_data;
import static com.cpm.lorealbaMabeline.constant.CommonFunctions.checkincomplete_upload_data;
import android.Manifest;
import android.annotation.SuppressLint;
@@ -29,8 +29,9 @@ import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.location.LocationSettingsRequest;
import com.google.android.gms.location.Priority;
import com.google.android.gms.location.SettingsClient;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;
@@ -40,6 +41,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import android.os.Bundle;
import android.text.InputFilter;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
@@ -54,20 +56,20 @@ import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import com.google.gson.Gson;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.Get_IMEI_number.ImeiNumberClass;
import com.cpm.lorealbaautomation.adapter.LeaveDetailAdapter;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.dailyactivity.NotificationDetailActivity;
import com.cpm.lorealbaautomation.databinding.DialogApplyLeaveBinding;
import com.cpm.lorealbaautomation.gsonGetterSetter.CounterDeviceLoginGetterSetter;
import com.cpm.lorealbaautomation.retrofit.PostApi;
import com.cpm.lorealbaautomation.tbaleavemodel.Common;
import com.cpm.lorealbaautomation.tbaleavemodel.TBAMESearch;
import com.cpm.lorealbaautomation.upload.ManualUploadActivity;
import com.cpm.lorealbaautomation.utils.DrawableClickListener;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.Get_IMEI_number.ImeiNumberClass;
import com.cpm.lorealbaMabeline.adapter.LeaveDetailAdapter;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.dailyactivity.NotificationDetailActivity;
import com.cpm.lorealbaMabeline.databinding.DialogApplyLeaveBinding;
import com.cpm.lorealbaMabeline.gsonGetterSetter.CounterDeviceLoginGetterSetter;
import com.cpm.lorealbaMabeline.retrofit.PostApi;
import com.cpm.lorealbaMabeline.tbaleavemodel.Common;
import com.cpm.lorealbaMabeline.tbaleavemodel.TBAMESearch;
import com.cpm.lorealbaMabeline.upload.ManualUploadActivity;
import com.cpm.lorealbaMabeline.utils.DrawableClickListener;
import org.json.JSONException;
import org.json.JSONObject;
@@ -241,7 +243,6 @@ public class CounterLoginActivity extends AppCompatActivity implements View.OnCl
} catch (Exception e) {
e.fillInStackTrace(); //test("Location", "Lat: " + lat + ", Lng: " + lon);}
}
}
@Override
protected void onResume() {
@@ -265,11 +266,10 @@ public class CounterLoginActivity extends AppCompatActivity implements View.OnCl
}
}
}
private void enableLocationSettings() {
@SuppressLint("VisibleForTests") LocationRequest locationRequest = LocationRequest.create()
.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY) // new Priority constant
.setInterval(30 * 1000)
.setInterval(3 * 1000)
.setFastestInterval(5 * 1000);
LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder()
.addLocationRequest(locationRequest)
@@ -307,7 +307,7 @@ public class CounterLoginActivity extends AppCompatActivity implements View.OnCl
JSONObject jsonObject = new JSONObject();
jsonObject.put("Latitude", lat);
jsonObject.put("Longitude", lon);
jsonObject.put("Appversion", app_ver);
jsonObject.put("Appversion", app_ver +"T2");
jsonObject.put("Attmode", "0");
jsonObject.put("Networkstatus", "0");
jsonObject.put("Manufacturer", manufacturer);
@@ -327,7 +327,7 @@ public class CounterLoginActivity extends AppCompatActivity implements View.OnCl
}
String jsonString = jsonObject.toString();
//test("jsondata",jsonString);
Log.d("Location",jsonString);
try {
OkHttpClient okHttpClient = new OkHttpClient.Builder().readTimeout(CommonString.TIMEOUT, TimeUnit.SECONDS).writeTimeout(CommonString.TIMEOUT, TimeUnit.SECONDS).connectTimeout(CommonString.TIMEOUT, TimeUnit.SECONDS).build();
@@ -442,7 +442,7 @@ public class CounterLoginActivity extends AppCompatActivity implements View.OnCl
counter_id = (EditText) findViewById(R.id.counter_id);
db = new Lorealba_Database(this);
db.open();
leaveSpin = (com.cpm.lorealbaautomation.utils.Spinner) findViewById(R.id.leaveSpin);
leaveSpin = (com.cpm.lorealbaMabeline.utils.Spinner) findViewById(R.id.leaveSpin);
versioncode_txt = (TextView) findViewById(R.id.versioncode_txt);
rlMarkLeave = (LinearLayout) findViewById(R.id.rlMarkLeave);
btncontinue = (Button) findViewById(R.id.btncontinue);
@@ -502,7 +502,7 @@ public class CounterLoginActivity extends AppCompatActivity implements View.OnCl
try {
PackageInfo pInfo = context.getPackageManager().getPackageInfo(getPackageName(), 0);
String version = pInfo.versionName;
versioncode_txt.setText("Version : " + version);
versioncode_txt.setText("Version : " + version +"-T2");
} catch (PackageManager.NameNotFoundException e) {
e.fillInStackTrace();
versioncode_txt.setText("Version : 0.0");
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation;
package com.cpm.lorealbaMabeline;
import android.Manifest;
@@ -32,9 +32,9 @@ import android.os.Bundle;
import androidx.annotation.NonNull;
import com.cpm.lorealbaautomation.checkout.BaCheckoutActivity;
import com.cpm.lorealbaautomation.dailyactivity.ServiceActivity;
import com.cpm.lorealbaautomation.gsonGetterSetter.JourneyPlan;
import com.cpm.lorealbaMabeline.checkout.BaCheckoutActivity;
import com.cpm.lorealbaMabeline.dailyactivity.ServiceActivity;
import com.cpm.lorealbaMabeline.gsonGetterSetter.JourneyPlan;
import com.google.android.gms.common.api.ResolvableApiException;
import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.SettingsClient;
@@ -72,40 +72,40 @@ import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.location.LocationSettingsRequest;
import com.google.gson.Gson;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.adapter.LeaveDetailAdapter;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.dailyactivity.BAProfileActivity;
import com.cpm.lorealbaautomation.dailyactivity.CounterImageActivity;
import com.cpm.lorealbaautomation.dailyactivity.CounterProfileActivity;
import com.cpm.lorealbaautomation.dailyactivity.GroomedActivity;
import com.cpm.lorealbaautomation.dailyactivity.NotificationsActivity;
import com.cpm.lorealbaautomation.dailyactivity.RetailExcellenceActivity;
import com.cpm.lorealbaautomation.databinding.DialogApplyLeaveBinding;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.download.DownloadActivity;
import com.cpm.lorealbaautomation.download.Downloader;
import com.cpm.lorealbaautomation.gettersetter.LoginGetterSetter;
import com.cpm.lorealbaautomation.gsonGetterSetter.GroomingGetterSetter;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterProfile;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterProfileQuestionGetterSetter;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterPromoOffer;
import com.cpm.lorealbaautomation.gsonGetterSetter.ResponseResult;
import com.cpm.lorealbaautomation.leavemanagement.LeaveManagemntActivity;
import com.cpm.lorealbaautomation.password.ChangePasswordActivity;
import com.cpm.lorealbaautomation.pinviewactivity.PinViewActivity;
import com.cpm.lorealbaautomation.promooffer.PromoOffersActivity;
import com.cpm.lorealbaautomation.reports.MeSaleReport;
import com.cpm.lorealbaautomation.reports.PerformanceHistoryActivity;
import com.cpm.lorealbaautomation.reports.ReportsActivity;
import com.cpm.lorealbaautomation.retrofit.PostApi;
import com.cpm.lorealbaautomation.tbaleavemodel.Common;
import com.cpm.lorealbaautomation.tbaleavemodel.TBAMESearch;
import com.cpm.lorealbaautomation.upload.CommonUpload;
import com.cpm.lorealbaautomation.upload.UploadKeyData;
import com.cpm.lorealbaautomation.utils.DrawableClickListener;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.adapter.LeaveDetailAdapter;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.dailyactivity.BAProfileActivity;
import com.cpm.lorealbaMabeline.dailyactivity.CounterImageActivity;
import com.cpm.lorealbaMabeline.dailyactivity.CounterProfileActivity;
import com.cpm.lorealbaMabeline.dailyactivity.GroomedActivity;
import com.cpm.lorealbaMabeline.dailyactivity.NotificationsActivity;
import com.cpm.lorealbaMabeline.dailyactivity.RetailExcellenceActivity;
import com.cpm.lorealbaMabeline.databinding.DialogApplyLeaveBinding;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.download.DownloadActivity;
import com.cpm.lorealbaMabeline.download.Downloader;
import com.cpm.lorealbaMabeline.gettersetter.LoginGetterSetter;
import com.cpm.lorealbaMabeline.gsonGetterSetter.GroomingGetterSetter;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterProfile;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterProfileQuestionGetterSetter;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterPromoOffer;
import com.cpm.lorealbaMabeline.gsonGetterSetter.ResponseResult;
import com.cpm.lorealbaMabeline.leavemanagement.LeaveManagemntActivity;
import com.cpm.lorealbaMabeline.password.ChangePasswordActivity;
import com.cpm.lorealbaMabeline.pinviewactivity.PinViewActivity;
import com.cpm.lorealbaMabeline.promooffer.PromoOffersActivity;
import com.cpm.lorealbaMabeline.reports.MeSaleReport;
import com.cpm.lorealbaMabeline.reports.PerformanceHistoryActivity;
import com.cpm.lorealbaMabeline.reports.ReportsActivity;
import com.cpm.lorealbaMabeline.retrofit.PostApi;
import com.cpm.lorealbaMabeline.tbaleavemodel.Common;
import com.cpm.lorealbaMabeline.tbaleavemodel.TBAMESearch;
import com.cpm.lorealbaMabeline.upload.CommonUpload;
import com.cpm.lorealbaMabeline.upload.UploadKeyData;
import com.cpm.lorealbaMabeline.utils.DrawableClickListener;
import org.json.JSONObject;
@@ -133,10 +133,10 @@ import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import static com.cpm.lorealbaautomation.constant.CommonFunctions.checkincomplete_upload_data;
import static com.cpm.lorealbaautomation.constant.CommonFunctions.getCroppedBitmap;
import static com.cpm.lorealbaautomation.constant.CommonFunctions.getResizedBitmap;
import static com.cpm.lorealbaautomation.dailyactivity.StoreImageActivity.convertBitmap;
import static com.cpm.lorealbaMabeline.constant.CommonFunctions.checkincomplete_upload_data;
import static com.cpm.lorealbaMabeline.constant.CommonFunctions.getCroppedBitmap;
import static com.cpm.lorealbaMabeline.constant.CommonFunctions.getResizedBitmap;
import static com.cpm.lorealbaMabeline.dailyactivity.StoreImageActivity.convertBitmap;
public class DealarBoardActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, View.OnClickListener {
private SharedPreferences preferences = null;
@@ -807,7 +807,7 @@ public class DealarBoardActivity extends AppCompatActivity implements Navigation
finalList.add(getFileNames(Objects.requireNonNull(f.listFiles())).get(k));
}
}
Log.e("finalList", "DealerB"+finalList.toString() );
if (!finalList.isEmpty()) {
Intent intentu = new Intent(context, Downloader.class);
intentu.putExtra(CommonString.KEY_UPLOADIMAGE, "1");
@@ -818,7 +818,7 @@ public class DealarBoardActivity extends AppCompatActivity implements Navigation
try {
PackageInfo pInfo = context.getPackageManager().getPackageInfo(getPackageName(), 0);
String version = pInfo.versionName;
version_code.setText("Version : " + version);
version_code.setText("Version : " + version +"-T2");
} catch (PackageManager.NameNotFoundException e) {
e.fillInStackTrace();
version_code.setText("Version : 0.0");
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.Get_IMEI_number;
package com.cpm.lorealbaMabeline.Get_IMEI_number;
import android.content.Context;
import android.os.Build;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.Get_IMEI_number;
package com.cpm.lorealbaMabeline.Get_IMEI_number;
import android.content.Context;
import android.telephony.TelephonyManager;
@@ -1,6 +1,6 @@
package com.cpm.lorealbaautomation;
package com.cpm.lorealbaMabeline;
import static com.cpm.lorealbaautomation.constant.CommonFunctions.checkincomplete_upload_data;
import static com.cpm.lorealbaMabeline.constant.CommonFunctions.checkincomplete_upload_data;
import android.Manifest;
import android.annotation.SuppressLint;
@@ -49,15 +49,15 @@ import com.google.android.gms.location.LocationSettingsResult;
import com.google.android.gms.location.LocationSettingsStatusCodes;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.google.gson.Gson;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.Get_IMEI_number.ImeiNumberClass;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.dailyactivity.NotificationDetailActivity;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.gsonGetterSetter.CounterDeviceLoginGetterSetter;
import com.cpm.lorealbaautomation.retrofit.PostApi;
import com.cpm.lorealbaautomation.upload.ManualUploadActivity;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.Get_IMEI_number.ImeiNumberClass;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.dailyactivity.NotificationDetailActivity;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.gsonGetterSetter.CounterDeviceLoginGetterSetter;
import com.cpm.lorealbaMabeline.retrofit.PostApi;
import com.cpm.lorealbaMabeline.upload.ManualUploadActivity;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.File;
@@ -166,7 +166,7 @@ public class IMEILoginActivity extends AppCompatActivity implements GoogleApiCli
try {
PackageInfo pInfo = context.getPackageManager().getPackageInfo(getPackageName(), 0);
String version = pInfo.versionName;
versioncode_txt.setText("Version : " + version);
versioncode_txt.setText("Version : " + version+"-T2");
} catch (PackageManager.NameNotFoundException e) {
e.fillInStackTrace();
versioncode_txt.setText("Version : 0.0");
@@ -266,7 +266,6 @@ public class IMEILoginActivity extends AppCompatActivity implements GoogleApiCli
}
}
@SuppressLint("ObsoleteSdkInt")
private void AttempLogin() {
try {
@@ -0,0 +1,119 @@
package com.cpm.lorealbaMabeline;
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.location.Location;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;
import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.LocationCallback;
import com.google.android.gms.location.LocationResult;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.location.Priority;
public class LocationEngine {
public interface LocationResultListener {
void onLocationReady(Location location, float accuracy);
void onFailure(String msg);
}
private final Context context;
private final FusedLocationProviderClient fusedClient;
private LocationCallback locationCallback;
private Location bestLocation = null;
private float bestAccuracy = Float.MAX_VALUE;
private Handler handler = new Handler(Looper.getMainLooper());
public LocationEngine(Context context) {
this.context = context;
fusedClient = LocationServices.getFusedLocationProviderClient(context);
}
public void start(LocationResultListener listener) {
com.google.android.gms.location.LocationRequest request = new com.google.android.gms.location.LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, 2000L)
.setMinUpdateIntervalMillis(1000L)
.setMaxUpdateDelayMillis(3000L)
.setWaitForAccurateLocation(true) // Optional, improves first fix
.build();
/* LocationRequest request = new LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, 2000L) // 👈 IMPORTANT
.setMinUpdateIntervalMillis(1000L)
.setMaxUpdateDelayMillis(3000L)
.setWaitForAccurateLocation(true)
.build();*/
locationCallback = new LocationCallback() {
@Override
public void onLocationResult(@NonNull LocationResult result) {
for (Location location : result.getLocations()) {
if (location == null) continue;
float accuracy = location.getAccuracy();
// 🔥 Track best location always
if (accuracy < bestAccuracy) {
bestAccuracy = accuracy;
bestLocation = location;
}
Log.d("LocationEngine",
"Lat: " + location.getLatitude()
+ " Lng: " + location.getLongitude()
+ " Acc: " + accuracy);
// ✅ Accept good or stable location
if (accuracy <= 80) {
stop();
listener.onLocationReady(location, accuracy);
return;
}
}
}
};
if (ActivityCompat.checkSelfPermission(context,
Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
listener.onFailure("Permission not granted");
return;
}
fusedClient.requestLocationUpdates(request, locationCallback, Looper.getMainLooper());
// ⏱ Timeout fallback (VERY IMPORTANT)
handler.postDelayed(() -> {
if (bestLocation != null) {
Log.d("LocationEngine", "Using fallback location");
listener.onLocationReady(bestLocation, bestAccuracy);
} else {
listener.onFailure("Unable to fetch location");
}
stop();
}, 8000);
}
public void stop() {
if (locationCallback != null) {
fusedClient.removeLocationUpdates(locationCallback);
}
handler.removeCallbacksAndMessages(null);
}
}
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation;
package com.cpm.lorealbaMabeline;
import android.app.Application;
public class LorealBa extends Application {
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation;
package com.cpm.lorealbaMabeline;
import android.Manifest;
import android.annotation.SuppressLint;
@@ -13,10 +13,10 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.cpm.lorealbaautomation.gsonGetterSetter.JourneyPlan;
import com.cpm.lorealbaMabeline.gsonGetterSetter.JourneyPlan;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.firebase.messaging.FirebaseMessaging;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import android.util.Log;
import android.view.View;
@@ -35,20 +35,20 @@ import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import com.google.gson.Gson;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.dailyactivity.NotificationDetailActivity;
import com.cpm.lorealbaautomation.dailyactivity.TabLoginActivity;
import com.cpm.lorealbaautomation.gettersetter.LoginGetterSetter;
import com.cpm.lorealbaautomation.gsonGetterSetter.BaListGetterSetter;
import com.cpm.lorealbaautomation.gsonGetterSetter.JCPGetterSetter;
import com.cpm.lorealbaautomation.gsonGetterSetter.TableStructure;
import com.cpm.lorealbaautomation.gsonGetterSetter.TableStructureGetterSetter;
import com.cpm.lorealbaautomation.retrofit.DownloadAllDatawithRetro;
import com.cpm.lorealbaautomation.retrofit.PostApi;
import com.cpm.lorealbaautomation.retrofit.UploadDataWithRetrofit;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.dailyactivity.NotificationDetailActivity;
import com.cpm.lorealbaMabeline.dailyactivity.TabLoginActivity;
import com.cpm.lorealbaMabeline.gettersetter.LoginGetterSetter;
import com.cpm.lorealbaMabeline.gsonGetterSetter.BaListGetterSetter;
import com.cpm.lorealbaMabeline.gsonGetterSetter.JCPGetterSetter;
import com.cpm.lorealbaMabeline.gsonGetterSetter.TableStructure;
import com.cpm.lorealbaMabeline.gsonGetterSetter.TableStructureGetterSetter;
import com.cpm.lorealbaMabeline.retrofit.DownloadAllDatawithRetro;
import com.cpm.lorealbaMabeline.retrofit.PostApi;
import com.cpm.lorealbaMabeline.retrofit.UploadDataWithRetrofit;
import org.json.JSONException;
import org.json.JSONObject;
@@ -118,8 +118,6 @@ public class UserLoginActivity extends AppCompatActivity implements View.OnClick
showAlertForLogoutUser(false);
}
@SuppressLint("SetTextI18n")
void getViewId() {
context = this;
@@ -285,7 +283,7 @@ public class UserLoginActivity extends AppCompatActivity implements View.OnClick
try {
PackageInfo pInfo = context.getPackageManager().getPackageInfo(getPackageName(), 0);
String version = pInfo.versionName;
versioncode_txt.setText("Version : " + version);
versioncode_txt.setText("Version : " + version +"-T2");
} catch (PackageManager.NameNotFoundException e) {
e.fillInStackTrace();
versioncode_txt.setText("Version : 0.0");
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.adapter;
package com.cpm.lorealbaMabeline.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
@@ -10,9 +10,9 @@ import androidx.annotation.NonNull;
import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.gsonGetterSetter.leaves.TLeaveRequestDetail;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.gsonGetterSetter.leaves.TLeaveRequestDetail;
import java.util.List;
public class ApprovedLeaveAdapter extends RecyclerView.Adapter<ApprovedLeaveAdapter.MyViewHolder> {
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.adapter;
package com.cpm.lorealbaMabeline.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
@@ -8,8 +8,8 @@ import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterInvoiceType;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterInvoiceType;
import java.util.ArrayList;
import java.util.List;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.adapter;
package com.cpm.lorealbaMabeline.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
@@ -11,8 +11,8 @@ import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.gsonGetterSetter.inwordDetail.ReportCounterInwardStockDetail;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.gsonGetterSetter.inwordDetail.ReportCounterInwardStockDetail;
import java.util.List;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.adapter;
package com.cpm.lorealbaMabeline.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
@@ -12,9 +12,9 @@ import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.tbaleavemodel.TBAMELeaveHistory;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.tbaleavemodel.TBAMELeaveHistory;
import java.util.List;
@@ -41,7 +41,7 @@ public class LeaveDetailAdapter extends RecyclerView.Adapter<LeaveDetailAdapter.
if (position % 2 == 0) {
holder.rlLeaveDetail.setBackgroundColor(ContextCompat.getColor(inflator.getContext(), R.color.white));
} else {
holder.rlLeaveDetail.setBackgroundColor(ContextCompat.getColor(inflator.getContext(), R.color.gray));
holder.rlLeaveDetail.setBackgroundColor(ContextCompat.getColor(inflator.getContext(), com.androidbuts.multispinnerfilter.R.color.gray));
}
if (CommonFunctions.isTablet(inflator.getContext())) {
holder.tvDatefromTo.setText(current.getFromDate() + " - " + current.getToDate());
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.adapter;
package com.cpm.lorealbaMabeline.adapter;
import android.content.Context;
import android.content.Intent;
@@ -13,10 +13,10 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterPromoOffer;
import com.cpm.lorealbaautomation.promooffer.PromoOfferDetailsActivity;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterPromoOffer;
import com.cpm.lorealbaMabeline.promooffer.PromoOfferDetailsActivity;
import java.io.File;
import java.util.ArrayList;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.adapter;
package com.cpm.lorealbaMabeline.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
@@ -8,8 +8,8 @@ import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterNonStockReason;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterNonStockReason;
import java.util.ArrayList;
import java.util.List;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.adapter;
package com.cpm.lorealbaMabeline.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
@@ -11,10 +11,10 @@ import androidx.annotation.NonNull;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.gsonGetterSetter.ProductMaster;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.gsonGetterSetter.ProductMaster;
import java.util.List;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.adapter;
package com.cpm.lorealbaMabeline.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
@@ -11,8 +11,8 @@ import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.gsonGetterSetter.countervolune.ReportCounterVolumeDetail;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.gsonGetterSetter.countervolune.ReportCounterVolumeDetail;
import java.util.List;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.autoconnectblutooth;
package com.cpm.lorealbaMabeline.autoconnectblutooth;
import android.bluetooth.BluetoothA2dp;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothProfile;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.autoconnectblutooth;
package com.cpm.lorealbaMabeline.autoconnectblutooth;
import android.Manifest;
import android.annotation.SuppressLint;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.autoconnectblutooth;
package com.cpm.lorealbaMabeline.autoconnectblutooth;
import android.annotation.SuppressLint;
import android.bluetooth.BluetoothAdapter;
import android.content.BroadcastReceiver;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview;
package com.cpm.lorealbaMabeline.blurlockview;
import android.animation.ObjectAnimator;
import android.content.Context;
@@ -14,7 +14,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaMabeline.R;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview;
package com.cpm.lorealbaMabeline.blurlockview;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -19,10 +19,10 @@ import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.blurlockview.Directions.HideType;
import com.cpm.lorealbaautomation.blurlockview.Directions.ShowType;
import com.cpm.lorealbaautomation.blurlockview.Eases.EaseType;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.blurlockview.Directions.HideType;
import com.cpm.lorealbaMabeline.blurlockview.Directions.ShowType;
import com.cpm.lorealbaMabeline.blurlockview.Eases.EaseType;
import java.util.Stack;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview;
package com.cpm.lorealbaMabeline.blurlockview;
import android.content.Context;
import android.content.res.Resources;
@@ -14,7 +14,7 @@ import android.renderscript.ScriptIntrinsicBlur;
import android.util.AttributeSet;
import android.view.View;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaMabeline.R;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Directions;
package com.cpm.lorealbaMabeline.blurlockview.Directions;
/**
* Created by Weiping on 2016/3/17.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Directions;
package com.cpm.lorealbaMabeline.blurlockview.Directions;
/**
* Created by Weiping on 2016/3/17.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview;
package com.cpm.lorealbaMabeline.blurlockview;
import android.animation.ObjectAnimator;
import android.content.Context;
@@ -7,7 +7,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaMabeline.R;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
import android.graphics.PointF;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
*/
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
*/
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview.Eases;
package com.cpm.lorealbaMabeline.blurlockview.Eases;
/**
* Created by Weiping on 2016/3/3.
@@ -1,10 +1,10 @@
package com.cpm.lorealbaautomation.blurlockview;
package com.cpm.lorealbaMabeline.blurlockview;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaMabeline.R;
/**
@@ -1,8 +1,8 @@
package com.cpm.lorealbaautomation.blurlockview;
package com.cpm.lorealbaMabeline.blurlockview;
import android.view.animation.Interpolator;
import com.cpm.lorealbaautomation.blurlockview.Eases.EaseType;
import com.cpm.lorealbaMabeline.blurlockview.Eases.EaseType;
/**
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview;
package com.cpm.lorealbaMabeline.blurlockview;
/**
* Created by Weiping on 2016/3/17.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.blurlockview;
package com.cpm.lorealbaMabeline.blurlockview;
import android.animation.ObjectAnimator;
import android.content.Context;
@@ -14,7 +14,7 @@ import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaMabeline.R;
/**
* Created by Weiping on 2016/3/16.
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.breakmanagement;
package com.cpm.lorealbaMabeline.breakmanagement;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
@@ -27,14 +27,14 @@ import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.download.Downloader;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterBreak;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.download.Downloader;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterBreak;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -1,11 +1,11 @@
package com.cpm.lorealbaautomation.bulkInsert;
package com.cpm.lorealbaMabeline.bulkInsert;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.net.Uri;
import android.provider.BaseColumns;
import com.cpm.lorealbaautomation.BuildConfig;
import com.cpm.lorealbaMabeline.BuildConfig;
public class DBContract {
/*Content Authority its a name for the content provider, is convenient to use the
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.bulkInsert;
package com.cpm.lorealbaMabeline.bulkInsert;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.bulkInsert;
package com.cpm.lorealbaMabeline.bulkInsert;
import android.content.ContentProvider;
import android.content.ContentValues;
@@ -1,7 +1,7 @@
package com.cpm.lorealbaautomation.checkout;
package com.cpm.lorealbaMabeline.checkout;
import static com.cpm.lorealbaautomation.constant.CommonFunctions.getCurrentTime;
import static com.cpm.lorealbaautomation.dailyactivity.StoreImageActivity.convertBitmap;
import static com.cpm.lorealbaMabeline.constant.CommonFunctions.getCurrentTime;
import static com.cpm.lorealbaMabeline.dailyactivity.StoreImageActivity.convertBitmap;
import android.Manifest;
import android.annotation.SuppressLint;
@@ -39,22 +39,20 @@ import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.databinding.ActivityBacheckoutBinding;
import com.cpm.lorealbaautomation.databinding.ItemBacheckoutBinding;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.download.Downloader;
import com.cpm.lorealbaautomation.gsonGetterSetter.JourneyPlan;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterPosm;
import com.cpm.lorealbaautomation.retrofit.UploadDataWithRetrofit;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.databinding.ActivityBacheckoutBinding;
import com.cpm.lorealbaMabeline.databinding.ItemBacheckoutBinding;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.download.Downloader;
import com.cpm.lorealbaMabeline.gsonGetterSetter.JourneyPlan;
import com.cpm.lorealbaMabeline.retrofit.UploadDataWithRetrofit;
import com.google.android.gms.common.api.ResolvableApiException;
import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.LocationCallback;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.checkout;
package com.cpm.lorealbaMabeline.checkout;
import com.google.gson.annotations.SerializedName;
@@ -1,7 +1,7 @@
package com.cpm.lorealbaautomation.competitionoffer;
package com.cpm.lorealbaMabeline.competitionoffer;
import static com.cpm.lorealbaautomation.constant.CommonFunctions.getCurrentTime;
import static com.cpm.lorealbaautomation.dailyactivity.StoreImageActivity.convertBitmap;
import static com.cpm.lorealbaMabeline.constant.CommonFunctions.getCurrentTime;
import static com.cpm.lorealbaMabeline.dailyactivity.StoreImageActivity.convertBitmap;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
@@ -50,21 +50,21 @@ import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.gson.Gson;
import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.databinding.CompetitionOfferBaDetailBinding;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.gettersetter.BaTenureDetail;
import com.cpm.lorealbaautomation.gettersetter.MasterCompetitionOffer;
import com.cpm.lorealbaautomation.gettersetter.MasterCompetitionOfferSaleRange;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterCompetitionOfferGet;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterCompetitionOfferSet;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterCompetitionProductType;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterCompetitionPromoType;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterCompetitonBrandWiseNuance;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.databinding.CompetitionOfferBaDetailBinding;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.gettersetter.BaTenureDetail;
import com.cpm.lorealbaMabeline.gettersetter.MasterCompetitionOffer;
import com.cpm.lorealbaMabeline.gettersetter.MasterCompetitionOfferSaleRange;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterCompetitionOfferGet;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterCompetitionOfferSet;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterCompetitionProductType;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterCompetitionPromoType;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterCompetitonBrandWiseNuance;
import org.json.JSONArray;
import org.json.JSONException;
@@ -1423,7 +1423,7 @@ public class CompetitionOfferActivity extends AppCompatActivity implements View.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
com.cpm.lorealbaautomation.databinding.CompetitionOfferBaDetailBinding binding = CompetitionOfferBaDetailBinding.inflate(getLayoutInflater());
com.cpm.lorealbaMabeline.databinding.CompetitionOfferBaDetailBinding binding = CompetitionOfferBaDetailBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
Objects.requireNonNull(getWindow()).setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
binding.closeDialog.setOnClickListener(v -> dismiss());
@@ -1,11 +1,11 @@
package com.cpm.lorealbaautomation.constant;
package com.cpm.lorealbaMabeline.constant;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import com.google.android.material.snackbar.Snackbar;
import com.cpm.lorealbaautomation.download.DownloadActivity;
import com.cpm.lorealbaMabeline.download.DownloadActivity;
import android.content.Intent;
import android.widget.Toast;
@@ -101,12 +101,14 @@ public class AlertandMessages {
Snackbar.make(Objects.requireNonNull(((Activity) context).getCurrentFocus()), message, Snackbar.LENGTH_SHORT).show();
}
public void backpressedAlert(final Activity activity) {
public static void closeApp(final Activity activity, String str) {
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle("Alert");
builder.setMessage("Do you want to exit? Filled data will be lost").setCancelable(false)
.setPositiveButton("Ok", (dialog, id) -> activity.finish());
builder.setNegativeButton("Cancel", (dialog, which) -> dialog.dismiss());
builder.setMessage(str).setCancelable(false)
.setPositiveButton("Ok", (dialog, id) -> {
dialog.dismiss();
activity.finishAffinity();
});
AlertDialog alert = builder.create();
alert.show();
}
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.constant;
package com.cpm.lorealbaMabeline.constant;
import android.Manifest;
import android.annotation.SuppressLint;
@@ -40,12 +40,12 @@ import android.widget.ImageView;
import android.widget.TextView;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.gsonGetterSetter.ProductMaster;
import com.cpm.lorealbaautomation.retrofit.DownloadAllDatawithRetro;
import com.cpm.lorealbaautomation.upload.UploadKeyData;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.gsonGetterSetter.ProductMaster;
import com.cpm.lorealbaMabeline.retrofit.DownloadAllDatawithRetro;
import com.cpm.lorealbaMabeline.upload.UploadKeyData;
import org.json.JSONObject;
@@ -1,18 +1,19 @@
package com.cpm.lorealbaautomation.constant;
package com.cpm.lorealbaMabeline.constant;
import android.content.Context;
import com.cpm.lorealbaautomation.utils.AppUtils;
import com.cpm.lorealbaMabeline.utils.AppUtils;
/**
* Created by jeevanp on 14-12-2017.
*/
public class CommonString {
public static final String BACKUP_FOLDER_NAME = "LorealBa_Backup";
public static final String IMAGE_FOLDER_NAME = "LorealBa_Images";
public static final String PROFILE_FOLDER_NAME = "LorealProfile";
public static final String LorealPromo_Folder = "LorealPromoOffers";
public static final String LorealBaApkFolder = "LorealBaApkFolder";
public static final String BACKUP_FOLDER_NAME = "LorealBaMNY_Backup";
public static final String IMAGE_FOLDER_NAME = "LorealBaMNY_Images";
public static final String PROFILE_FOLDER_NAME = "LorealMNYProfile";
public static final String LorealPromo_Folder = "LorealMNYPromoOffers";
public static final String LorealBaApkFolder = "LorealBaMNYApkFolder";
public static String BA_ASSESSMENT_URL ="https://careaudit.parinaam.in?";
public static String getLorealBaApkFolder(Context context) {
return AppUtils.getInternalDirectory(context, LorealBaApkFolder).getAbsolutePath() + "/";
@@ -35,8 +36,8 @@ public class CommonString {
}
//preference
public static final String KEY_DB_NAME = "LorealBaNew";
public static final int KEY_DB_NAME_iD = 2;
public static final String KEY_DB_NAME = "LorealBaMaybeDb";
public static final int KEY_DB_NAME_iD = 3;
public static final String KEY_LOGIN_DATA = "login_data";
public static final String TAG_FROM = "FROM";
public static final int TIMEOUT = 180;
@@ -117,8 +118,10 @@ public class CommonString {
public static final String KEY_TYPE = "Message_Type";
public static final int PERMISSION_ALL = 99;
public static final String TABLE_COVERAGE_DATA = "COVERAGE_DATA";
public static final String KEY_LOCKOUT = "LOCKOUT";
public static final String Key_Download_Status = "Download_Status";
public static final String MESSAGE_CHANGED = "Invalid UserId Or Password / Password Has Been Changed.";
public static final String MESSAGE_LOCKED = "User ID is blocked. Please contact your supervisor";
public static final String MESSAGE_LOGIN_NO_DATA = "Data mapping error.";
public static final String Table_Sale_Tracking = "SALE_TRACKING_TABLE";
public static final String Table_Applyeid_Promotion = "APPLYED_PROMOTION_TABLE";
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.constant;
package com.cpm.lorealbaMabeline.constant;
import android.content.ContentUris;
import android.content.Context;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.constant;
package com.cpm.lorealbaMabeline.constant;
import android.content.Context;
import android.content.res.TypedArray;
@@ -11,7 +11,7 @@ import android.view.animation.Animation;
import android.view.animation.LinearInterpolator;
import android.view.animation.Transformation;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaMabeline.R;
public class HorizontalProgressBar extends View {
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.constant;
package com.cpm.lorealbaMabeline.constant;
import android.graphics.Bitmap;
import android.graphics.Canvas;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.constant;
package com.cpm.lorealbaMabeline.constant;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.constant;
package com.cpm.lorealbaMabeline.constant;
import android.annotation.SuppressLint;
import android.content.Context;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.consumeractivity;
package com.cpm.lorealbaMabeline.consumeractivity;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
@@ -21,13 +21,13 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.gsonGetterSetter.InvoiceGetterSetter;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.gsonGetterSetter.InvoiceGetterSetter;
import java.util.ArrayList;
import java.util.List;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.consumeractivity;
package com.cpm.lorealbaMabeline.consumeractivity;
import android.annotation.SuppressLint;
import android.app.Activity;
@@ -41,14 +41,14 @@ import android.widget.Toast;
import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.gsonGetterSetter.InvoiceGetterSetter;
import com.cpm.lorealbaautomation.gsonGetterSetter.ProductMaster;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.gsonGetterSetter.InvoiceGetterSetter;
import com.cpm.lorealbaMabeline.gsonGetterSetter.ProductMaster;
import java.util.ArrayList;
@@ -56,8 +56,8 @@ import java.util.List;
import java.util.Objects;
import static com.cpm.lorealbaautomation.constant.CommonFunctions.removeFirstChar;
import static com.cpm.lorealbaautomation.dailyactivity.ConsumerReturnActivity.replace_productList;
import static com.cpm.lorealbaMabeline.constant.CommonFunctions.removeFirstChar;
import static com.cpm.lorealbaMabeline.dailyactivity.ConsumerReturnActivity.replace_productList;
public class ConsumerReturnReplaceProductActivity extends AppCompatActivity implements View.OnClickListener {
@@ -873,8 +873,40 @@ public class ConsumerReturnReplaceProductActivity extends AppCompatActivity impl
dialog_sku_adapter.setDropDownViewResource(R.layout.spinner_custom_item);
}
public void setFilter(int filterType, Spinner dialog_spin) {
List<ProductMaster> filteredList = new ArrayList<>();
// Filter only once based on type
switch (filterType) {
case FILTER_FOR_BRAND:
filteredList = filterListForBrand(dialog_product_list, dialog_brand_Id);
break;
case FILTER_FOR_SUB_BRAND:
filteredList = filterListForSubBrand(dialog_product_list, dialog_sub_brand_Id, dialog_brand_Id);
break;
case FILTER_FOR_REFERENCE_NAME:
filteredList = filterListForReferencename(dialog_product_list, dialog_reference_Id, dialog_brand_Id, dialog_sub_brand_Id);
break;
default:
filteredList = dialog_product_list;
break;
}
// Prepare display strings
List<String> displayList = new ArrayList<>();
displayList.add("- Select Product -"); // default item
for (ProductMaster product : filteredList) {
displayList.add(product.getProductName() + " - (MRP-" + product.getMrp() + ")");
}
// Set adapter
dialog_sku_adapter = new ArrayAdapter<>(context, R.layout.spinner_custom_item);
dialog_sku_adapter.addAll(displayList);
dialog_sku_adapter.setDropDownViewResource(R.layout.spinner_custom_item);
dialog_spin.setAdapter(dialog_sku_adapter);
}
/*public void setFilter(int filterType, Spinner dialog_spin) {
if (filterType == FILTER_FOR_BRAND) {
dialog_sku_adapter = new ArrayAdapter<>(context, R.layout.spinner_custom_item);
dialog_sku_adapter.add("- Select Product -");
@@ -922,7 +954,7 @@ public class ConsumerReturnReplaceProductActivity extends AppCompatActivity impl
}
dialog_spin.invalidate();
}
}*/
final int CLEAR_FILTER = 0;
final int FILTER_FOR_BRAND = 1;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.consumeractivity;
package com.cpm.lorealbaMabeline.consumeractivity;
import android.content.Context;
import android.content.Intent;
@@ -21,13 +21,13 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.gsonGetterSetter.InvoiceGetterSetter;
import com.cpm.lorealbaautomation.printer.PrinterActivity;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.gsonGetterSetter.InvoiceGetterSetter;
import com.cpm.lorealbaMabeline.printer.PrinterActivity;
import java.util.ArrayList;
import java.util.Collections;
@@ -1,8 +1,8 @@
package com.cpm.lorealbaautomation.consumeractivity;
package com.cpm.lorealbaMabeline.consumeractivity;
import static com.cpm.lorealbaautomation.constant.CommonFunctions.getCurrentTime;
import static com.cpm.lorealbaautomation.constant.CommonFunctions.removeFirstChar;
import static com.cpm.lorealbaautomation.dailyactivity.StoreImageActivity.convertBitmap;
import static com.cpm.lorealbaMabeline.constant.CommonFunctions.getCurrentTime;
import static com.cpm.lorealbaMabeline.constant.CommonFunctions.removeFirstChar;
import static com.cpm.lorealbaMabeline.dailyactivity.StoreImageActivity.convertBitmap;
import android.annotation.SuppressLint;
import android.app.Activity;
@@ -16,6 +16,7 @@ import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.drawable.ColorDrawable;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
@@ -48,32 +49,35 @@ import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.cpm.lorealbaMabeline.gsonGetterSetter.PromotionMaster;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.google.gson.Gson;
import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.gsonGetterSetter.ConsumerSalesHistory;
import com.cpm.lorealbaautomation.gsonGetterSetter.ConsumerTermsConditionAccept;
import com.cpm.lorealbaautomation.gsonGetterSetter.InvoiceGetterSetter;
import com.cpm.lorealbaautomation.gsonGetterSetter.JourneyPlan;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterAgeLimit;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterBAProfileGetterSetter;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterPromotion;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterPromotionSetEntityItem;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterPromotionSetProductGroup;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterSkinType;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterSourcesOfSale;
import com.cpm.lorealbaautomation.gsonGetterSetter.ProductMaster;
import com.cpm.lorealbaautomation.retrofit.PostApi;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.gsonGetterSetter.ConsumerSalesHistory;
import com.cpm.lorealbaMabeline.gsonGetterSetter.ConsumerTermsConditionAccept;
import com.cpm.lorealbaMabeline.gsonGetterSetter.InvoiceGetterSetter;
import com.cpm.lorealbaMabeline.gsonGetterSetter.JourneyPlan;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterAgeLimit;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterBAProfileGetterSetter;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterPromotion;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterPromotionSetEntityItem;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterPromotionSetProductGroup;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterSkinType;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterSourcesOfSale;
import com.cpm.lorealbaMabeline.gsonGetterSetter.ProductMaster;
import com.cpm.lorealbaMabeline.retrofit.PostApi;
import org.json.JSONException;
import org.json.JSONObject;
@@ -96,6 +100,7 @@ import okhttp3.ResponseBody;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class ConsumerUserDetailsActivity extends AppCompatActivity implements View.OnClickListener, AdapterView.OnItemSelectedListener {
String dialog_invoiceType = "Saleable", dialog_brand_Id = "", dialog_sub_brand_Id = "", dialog_reference_Id = "", product_name = "",
product_Id = "0", product_mrp = "0", CounterId, visit_date,
@@ -266,7 +271,7 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
if (flag_for_consumer_Update != null && flag_for_consumer_Update.equals("1")) {
edt_mobile_no.setEnabled(false);
mobile_checkbox.setEnabled(false);
rl_term_condition.setTextColor(getResources().getColor(R.color.gray));
rl_term_condition.setTextColor(ContextCompat.getColor(context,R.color.gray));
rl_term_condition.setEnabled(false);
mobile_checkbox.setEnabled(false);
edt_email_address.setEnabled(false);
@@ -304,55 +309,55 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
//for demo perpose button
if (!selected_list.get(0).getDemo_given_str().isEmpty() && selected_list.get(0).getDemo_given_str().equalsIgnoreCase("Yes")) {
promotion_btn_first.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
promotion_btn_first.setTextColor(getResources().getColor(R.color.white));
promotion_btn_second.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
promotion_btn_second.setTextColor(getResources().getColor(R.color.grayfor_login));
promotion_btn_first.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
promotion_btn_first.setTextColor(ContextCompat.getColor(context,R.color.white));
promotion_btn_second.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
promotion_btn_second.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
demo_given_str = "Yes";
} else {
promotion_btn_second.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
promotion_btn_second.setTextColor(getResources().getColor(R.color.white));
promotion_btn_first.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
promotion_btn_first.setTextColor(getResources().getColor(R.color.grayfor_login));
promotion_btn_second.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
promotion_btn_second.setTextColor(ContextCompat.getColor(context,R.color.white));
promotion_btn_first.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
promotion_btn_first.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
demo_given_str = "No";
}
/////For Skin Genious
if (!selected_list.get(0).getSkin_genius_str().isEmpty() && selected_list.get(0).getSkin_genius_str().equalsIgnoreCase("Yes")) {
skingn_btn_yes.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
skingn_btn_yes.setTextColor(getResources().getColor(R.color.white));
skingn_btn_no.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
skingn_btn_no.setTextColor(getResources().getColor(R.color.grayfor_login));
skingn_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
skingn_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.white));
skingn_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
skingn_btn_no.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
skin_genius_str = "Yes";
} else {
skingn_btn_no.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
skingn_btn_no.setTextColor(getResources().getColor(R.color.white));
skingn_btn_yes.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
skingn_btn_yes.setTextColor(getResources().getColor(R.color.grayfor_login));
skingn_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
skingn_btn_no.setTextColor(ContextCompat.getColor(context,R.color.white));
skingn_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
skingn_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
skin_genius_str = "No";
}
/////For Maybelline VTO
if (!selected_list.get(0).getMaybelline_vto_str().isEmpty() && selected_list.get(0).getMaybelline_vto_str().equalsIgnoreCase("Yes")) {
maybelline_btn_yes.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
maybelline_btn_yes.setTextColor(getResources().getColor(R.color.white));
maybelline_btn_no.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
maybelline_btn_no.setTextColor(getResources().getColor(R.color.grayfor_login));
maybelline_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
maybelline_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.white));
maybelline_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
maybelline_btn_no.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
maybelline_vto = "Yes";
} else {
maybelline_btn_no.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
maybelline_btn_no.setTextColor(getResources().getColor(R.color.white));
maybelline_btn_yes.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
maybelline_btn_yes.setTextColor(getResources().getColor(R.color.grayfor_login));
maybelline_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
maybelline_btn_no.setTextColor(ContextCompat.getColor(context,R.color.white));
maybelline_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
maybelline_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
maybelline_vto = "No";
}
if (!selected_list.get(0).getProduct_sold_str().isEmpty() && selected_list.get(0).getProduct_sold_str().equalsIgnoreCase("Yes")) {
sale_btn_yes.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
sale_btn_yes.setTextColor(getResources().getColor(R.color.white));
sale_btn_no.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
sale_btn_no.setTextColor(getResources().getColor(R.color.grayfor_login));
sale_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
sale_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.white));
sale_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
sale_btn_no.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
card_layout_scan.setVisibility(View.VISIBLE);
card_layout_title.setVisibility(View.VISIBLE);
drawer_layout_recycle_store.setVisibility(View.VISIBLE);
@@ -361,10 +366,10 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
img_visble.setVisibility(View.VISIBLE);
text_user_nm.setText(selected_list.get(0).getCustomer_name() + " Customer - " + CommonFunctions.removed_special_char(edt_customer));
} else {
sale_btn_no.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
sale_btn_no.setTextColor(getResources().getColor(R.color.white));
sale_btn_yes.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
sale_btn_yes.setTextColor(getResources().getColor(R.color.grayfor_login));
sale_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
sale_btn_no.setTextColor(ContextCompat.getColor(context,R.color.white));
sale_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
sale_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
card_layout_scan.setVisibility(View.GONE);
card_layout_title.setVisibility(View.GONE);
drawer_layout_recycle_store.setVisibility(View.GONE);
@@ -407,27 +412,27 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
drawer_layout_recycle_store.setLayoutManager(new LinearLayoutManager(context));
} else {
selected_list = new ArrayList<>();
promotion_btn_second.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
promotion_btn_second.setTextColor(getResources().getColor(R.color.white));
promotion_btn_first.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
promotion_btn_first.setTextColor(getResources().getColor(R.color.grayfor_login));
promotion_btn_second.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
promotion_btn_second.setTextColor(ContextCompat.getColor(context,R.color.white));
promotion_btn_first.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
promotion_btn_first.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
sale_btn_no.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
sale_btn_no.setTextColor(getResources().getColor(R.color.white));
sale_btn_yes.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
sale_btn_yes.setTextColor(getResources().getColor(R.color.grayfor_login));
sale_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
sale_btn_no.setTextColor(ContextCompat.getColor(context,R.color.white));
sale_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
sale_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
///for Sale Genius
skingn_btn_no.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
skingn_btn_no.setTextColor(getResources().getColor(R.color.white));
skingn_btn_yes.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
skingn_btn_yes.setTextColor(getResources().getColor(R.color.grayfor_login));
skingn_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
skingn_btn_no.setTextColor(ContextCompat.getColor(context,R.color.white));
skingn_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
skingn_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
///for Maybelline VTO
maybelline_btn_no.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
maybelline_btn_no.setTextColor(getResources().getColor(R.color.white));
maybelline_btn_yes.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
maybelline_btn_yes.setTextColor(getResources().getColor(R.color.grayfor_login));
maybelline_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
maybelline_btn_no.setTextColor(ContextCompat.getColor(context,R.color.white));
maybelline_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
maybelline_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
maybelline_vto = "No";
skin_genius_str = "No";
@@ -508,7 +513,7 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
mobile_checkbox.setEnabled(false);
edt_email_address.setEnabled(false);
edt_email_address.setText("");
rl_term_condition.setTextColor(getResources().getColor(R.color.gray));
rl_term_condition.setTextColor(ContextCompat.getColor(context,R.color.gray));
rl_term_condition.setEnabled(false);
});
@@ -539,6 +544,7 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
return super.onOptionsItemSelected(item);
}
@SuppressLint("MissingSuperCall")
@Override
public void onBackPressed() {
if (clicked_flag) {
@@ -700,12 +706,12 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
edt_mobile_no.setText("0000000000");
rl_otp.setVisibility(View.GONE);
edt_mobile_no.setEnabled(false);
rl_term_condition.setTextColor(getResources().getColor(R.color.gray));
rl_term_condition.setTextColor(ContextCompat.getColor(context,R.color.gray));
} else {
edt_mobile_no.setText("");
no_mobile_no_flag = false;
edt_mobile_no.setEnabled(true);
rl_term_condition.setTextColor(getResources().getColor(R.color.blue));
rl_term_condition.setTextColor(ContextCompat.getColor(context,R.color.blue));
}
} else if (view.getId() == R.id.no_name_checkbox) {
@@ -836,6 +842,7 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else {
///--------Check Promotion--------------
// Toast.makeText(context,"Testpromo",Toast.LENGTH_SHORT).show();
db.open();
db.insert_temp_sales_data(visit_date, CounterId, selected_list);
if (check_isPromo() && !product_add_flag) {
@@ -912,10 +919,10 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else if (!edt_email_address.getText().toString().isEmpty() && !CommonFunctions.isValidEmail(edt_email_address.getText().toString())) {
AlertandMessages.showToastMsg(context, "Please Enter Valid Email Id ");
} else {
promotion_btn_first.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
promotion_btn_first.setTextColor(getResources().getColor(R.color.white));
promotion_btn_second.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
promotion_btn_second.setTextColor(getResources().getColor(R.color.grayfor_login));
promotion_btn_first.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
promotion_btn_first.setTextColor(ContextCompat.getColor(context,R.color.white));
promotion_btn_second.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
promotion_btn_second.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
demo_given_str = "Yes";
if (response_term_condition.equals("1")) {
rl_demo_img.setVisibility(View.VISIBLE);
@@ -940,10 +947,10 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else if (!edt_email_address.getText().toString().isEmpty() && !CommonFunctions.isValidEmail(edt_email_address.getText().toString())) {
AlertandMessages.showToastMsg(context, "Please Enter Valid Email Id ");
} else {
skingn_btn_yes.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
skingn_btn_yes.setTextColor(getResources().getColor(R.color.white));
skingn_btn_no.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
skingn_btn_no.setTextColor(getResources().getColor(R.color.grayfor_login));
skingn_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
skingn_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.white));
skingn_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
skingn_btn_no.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
skin_genius_str = "Yes";
}
@@ -960,10 +967,10 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else if (!edt_email_address.getText().toString().isEmpty() && !CommonFunctions.isValidEmail(edt_email_address.getText().toString())) {
AlertandMessages.showToastMsg(context, "Please Enter Valid Email Id ");
} else {
maybelline_btn_yes.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
maybelline_btn_yes.setTextColor(getResources().getColor(R.color.white));
maybelline_btn_no.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
maybelline_btn_no.setTextColor(getResources().getColor(R.color.grayfor_login));
maybelline_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
maybelline_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.white));
maybelline_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
maybelline_btn_no.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
maybelline_vto = "Yes";
}
@@ -977,10 +984,10 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else if (!edt_email_address.getText().toString().isEmpty() && !CommonFunctions.isValidEmail(edt_email_address.getText().toString())) {
AlertandMessages.showToastMsg(context, "Please Enter Valid Email Id ");
} else {
skingn_btn_no.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
skingn_btn_no.setTextColor(getResources().getColor(R.color.white));
skingn_btn_yes.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
skingn_btn_yes.setTextColor(getResources().getColor(R.color.grayfor_login));
skingn_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
skingn_btn_no.setTextColor(ContextCompat.getColor(context,R.color.white));
skingn_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
skingn_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
skin_genius_str = "No";
}
@@ -997,10 +1004,10 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else if (!edt_email_address.getText().toString().isEmpty() && !CommonFunctions.isValidEmail(edt_email_address.getText().toString())) {
AlertandMessages.showToastMsg(context, "Please Enter Valid Email Id ");
} else {
maybelline_btn_no.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
maybelline_btn_no.setTextColor(getResources().getColor(R.color.white));
maybelline_btn_yes.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
maybelline_btn_yes.setTextColor(getResources().getColor(R.color.grayfor_login));
maybelline_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
maybelline_btn_no.setTextColor(ContextCompat.getColor(context,R.color.white));
maybelline_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
maybelline_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
maybelline_vto = "No";
}
@@ -1014,15 +1021,15 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else if (!edt_email_address.getText().toString().isEmpty() && !CommonFunctions.isValidEmail(edt_email_address.getText().toString())) {
AlertandMessages.showToastMsg(context, "Please Enter Valid Email Id ");
} else {
promotion_btn_second.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
promotion_btn_second.setTextColor(getResources().getColor(R.color.white));
promotion_btn_first.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
promotion_btn_first.setTextColor(getResources().getColor(R.color.grayfor_login));
promotion_btn_second.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
promotion_btn_second.setTextColor(ContextCompat.getColor(context,R.color.white));
promotion_btn_first.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
promotion_btn_first.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
sale_btn_no.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
sale_btn_no.setTextColor(getResources().getColor(R.color.white));
sale_btn_yes.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
sale_btn_yes.setTextColor(getResources().getColor(R.color.grayfor_login));
sale_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
sale_btn_no.setTextColor(ContextCompat.getColor(context,R.color.white));
sale_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
sale_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
demo_given_str = "No";
str_img_demo_no_sale = "";
@@ -1040,10 +1047,10 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else if (!edt_email_address.getText().toString().isEmpty() && !CommonFunctions.isValidEmail(edt_email_address.getText().toString())) {
AlertandMessages.showToastMsg(context, "Please Enter Valid Email Id ");
} else {
sale_btn_no.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
sale_btn_no.setTextColor(getResources().getColor(R.color.white));
sale_btn_yes.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
sale_btn_yes.setTextColor(getResources().getColor(R.color.grayfor_login));
sale_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
sale_btn_no.setTextColor(ContextCompat.getColor(context,R.color.white));
sale_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
sale_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
card_layout_scan.setVisibility(View.GONE);
card_layout_title.setVisibility(View.GONE);
drawer_layout_recycle_store.setVisibility(View.GONE);
@@ -1068,10 +1075,10 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
}
}
}
sale_btn_yes.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
sale_btn_yes.setTextColor(getResources().getColor(R.color.white));
sale_btn_no.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
sale_btn_no.setTextColor(getResources().getColor(R.color.grayfor_login));
sale_btn_yes.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
sale_btn_yes.setTextColor(ContextCompat.getColor(context,R.color.white));
sale_btn_no.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
sale_btn_no.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
card_layout_scan.setVisibility(View.VISIBLE);
card_layout_title.setVisibility(View.VISIBLE);
drawer_layout_recycle_store.setVisibility(View.VISIBLE);
@@ -1552,7 +1559,7 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
if (_pathforcheck != null && !_pathforcheck.isEmpty()) {
if (new File(CommonString.getImagesFolder(context) + _pathforcheck).exists()) {
convertBitmap(CommonString.getImagesFolder(context) + _pathforcheck);
img_only_demo.setImageDrawable(getResources().getDrawable(R.mipmap.camera_bsd));
img_only_demo.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.camera_bsd));
str_img_demo_no_sale = _pathforcheck;
_pathforcheck = "";
}
@@ -2581,12 +2588,12 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
setProductSpinnerData(productList, dialog_product_spin);
db.open();
dialog_product_list = db.getproduct_masterlist("T_StockSummary", visit_date, CounterId, from);
btn_invoice_type_saleable.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
btn_invoice_type_saleable.setTextColor(getResources().getColor(R.color.white));
btn_invoice_type_sample.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
btn_invoice_type_sample.setTextColor(getResources().getColor(R.color.grayfor_login));
btn_invoice_type_gwp.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
btn_invoice_type_gwp.setTextColor(getResources().getColor(R.color.grayfor_login));
btn_invoice_type_saleable.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
btn_invoice_type_saleable.setTextColor(ContextCompat.getColor(context,R.color.white));
btn_invoice_type_sample.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
btn_invoice_type_sample.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
btn_invoice_type_gwp.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
btn_invoice_type_gwp.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
});
btn_invoice_type_sample.setOnClickListener(view -> {
@@ -2604,12 +2611,12 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
setSubBrandSpinnerData(subbrandList, dialog_sub_brand_spin);
setReferenceSpinnerData(referenceList, dialog_franchise_spin);
setProductSpinnerData(productList, dialog_product_spin);
btn_invoice_type_sample.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
btn_invoice_type_sample.setTextColor(getResources().getColor(R.color.white));
btn_invoice_type_saleable.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
btn_invoice_type_saleable.setTextColor(getResources().getColor(R.color.grayfor_login));
btn_invoice_type_gwp.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
btn_invoice_type_gwp.setTextColor(getResources().getColor(R.color.grayfor_login));
btn_invoice_type_sample.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
btn_invoice_type_sample.setTextColor(ContextCompat.getColor(context,R.color.white));
btn_invoice_type_saleable.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
btn_invoice_type_saleable.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
btn_invoice_type_gwp.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
btn_invoice_type_gwp.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
db.open();
dialog_product_list = db.getproduct_masterlist(dialog_invoiceType, visit_date, CounterId, from);
@@ -2630,12 +2637,12 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
setSubBrandSpinnerData(subbrandList, dialog_sub_brand_spin);
setReferenceSpinnerData(referenceList, dialog_franchise_spin);
setProductSpinnerData(productList, dialog_product_spin);
btn_invoice_type_gwp.setBackground(getResources().getDrawable(R.drawable.rouded_corner));
btn_invoice_type_gwp.setTextColor(getResources().getColor(R.color.white));
btn_invoice_type_saleable.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
btn_invoice_type_saleable.setTextColor(getResources().getColor(R.color.grayfor_login));
btn_invoice_type_sample.setBackground(getResources().getDrawable(R.drawable.round_btn_color_primary));
btn_invoice_type_sample.setTextColor(getResources().getColor(R.color.grayfor_login));
btn_invoice_type_gwp.setBackground(ContextCompat.getDrawable(context,R.drawable.rouded_corner));
btn_invoice_type_gwp.setTextColor(ContextCompat.getColor(context,R.color.white));
btn_invoice_type_saleable.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
btn_invoice_type_saleable.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
btn_invoice_type_sample.setBackground(ContextCompat.getDrawable(context,R.drawable.round_btn_color_primary));
btn_invoice_type_sample.setTextColor(ContextCompat.getColor(context,R.color.grayfor_login));
db.open();
dialog_product_list = db.getproduct_masterlist(dialog_invoiceType, visit_date, CounterId, from);
});
@@ -2903,7 +2910,6 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
dialog_sku_adapter.add(productList.get(i).getProductName() + " - (MRP-" + productList.get(i).getMrp().toString() + ")");
}
}
dialog_product_spin.setAdapter(dialog_sku_adapter);
dialog_sku_adapter.setDropDownViewResource(R.layout.spinner_custom_item);
} catch (Exception ignored) {
@@ -2911,6 +2917,51 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
}
public void setFilter(int filterType, Spinner dialog_spin) {
try {
List<ProductMaster> filteredList = new ArrayList<>();
// Filter once based on type
switch (filterType) {
case FILTER_FOR_BRAND:
filteredList = filterListForBrand(dialog_product_list, dialog_brand_Id);
break;
case FILTER_FOR_SUB_BRAND:
filteredList = filterListForSubBrand(dialog_product_list, dialog_sub_brand_Id, dialog_brand_Id);
break;
case FILTER_FOR_REFERENCE_NAME:
filteredList = filterListForReferencename(dialog_product_list, dialog_reference_Id, dialog_brand_Id, dialog_sub_brand_Id, dialog_invoiceType);
break;
default:
filteredList = dialog_product_list;
break;
}
// Prepare display strings
List<String> displayList = new ArrayList<>();
displayList.add("- Select Product -"); // default item
boolean isSampleOrGWP = dialog_invoiceType.equalsIgnoreCase("Sample") || dialog_invoiceType.equalsIgnoreCase("GWP");
for (ProductMaster product : filteredList) {
if (isSampleOrGWP) {
displayList.add(product.getProductName() + " - Type-" + dialog_invoiceType);
} else {
displayList.add(product.getProductName() + " - (MRP-" + product.getMrp() + ")");
}
}
// Set adapter efficiently
dialog_sku_adapter = new ArrayAdapter<>(context, R.layout.spinner_custom_item);
dialog_sku_adapter.addAll(displayList);
dialog_sku_adapter.setDropDownViewResource(R.layout.spinner_custom_item);
dialog_spin.setAdapter(dialog_sku_adapter);
dialog_spin.invalidate();
} catch (Exception e) {
e.printStackTrace();
}
}
/*public void setFilter(int filterType, Spinner dialog_spin) {
try {
if (filterType == FILTER_FOR_BRAND) {
dialog_sku_adapter = new ArrayAdapter<>(context, R.layout.spinner_custom_item);
@@ -2975,7 +3026,7 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} catch (Exception e) {
e.fillInStackTrace();
}
}
}*/
final int CLEAR_FILTER = 0;
final int FILTER_FOR_BRAND = 1;
@@ -3149,7 +3200,7 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
response_term_condition = "0";
}
} else {
rl_term_condition.setTextColor(getResources().getColor(R.color.blue));
rl_term_condition.setTextColor(ContextCompat.getColor(context,R.color.blue));
rl_term_condition.setEnabled(true);
}
}
@@ -3180,7 +3231,7 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
List<ConsumerTermsConditionAccept> dataresponce = reportbaAvailabilityGetterSetter.getConsumerTermsConditionAccept();
if (dataresponce.get(0).getTermsConditionAccept()) {
response_term_condition = "1";
rl_term_condition.setTextColor(getResources().getColor(R.color.gray));
rl_term_condition.setTextColor(ContextCompat.getColor(context,R.color.gray));
rl_term_condition.setEnabled(false);
} else {
@@ -3214,7 +3265,7 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
protected void onResume() {
super.onResume();
if (!response_term_condition.isEmpty() && !response_term_condition.equals("0")) {
rl_term_condition.setTextColor(getResources().getColor(R.color.gray));
rl_term_condition.setTextColor(ContextCompat.getColor(context,R.color.gray));
rl_term_condition.setEnabled(false);
}
@@ -3363,10 +3414,10 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
if (flag_worth) {
header_txt.setText("Applicable Worth Promotions");
rl_changes_color.setBackgroundColor(getResources().getColor(R.color.dashboard_less_ach));
rl_changes_color.setBackgroundColor(ContextCompat.getColor(context,R.color.dashboard_less_ach));
} else {
header_txt.setText("Applicable Product Promotions");
rl_changes_color.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
rl_changes_color.setBackgroundColor(ContextCompat.getColor(context,R.color.colorPrimary));
}
////show product selected
@@ -3374,7 +3425,6 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
recycl_promotion.setLayoutManager(new LinearLayoutManager(context));
cancet_btn.setOnClickListener(view -> {
purposeDialog.dismiss();
added_prmo_products.clear();
if (purposeDialog != null && purposeDialog.isShowing()) {
purposeDialog.dismiss();
@@ -3383,11 +3433,9 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
btn_add.setOnClickListener(view -> {
try {
purposeDialog.dismiss();
if (purposeDialog != null && purposeDialog.isShowing()) {
purposeDialog.dismiss();
}
if (flag_worth) {
if (!added_prmo_products.isEmpty()) {
selected_list.addAll(added_prmo_products);
@@ -3795,7 +3843,6 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
}
invoiceGetterSetter.setDiscounted_value_productwise(new DecimalFormat("##.##").format(calculate_per_productwise));
invoiceGetterSetter.setScan_ean_code_or_enterd_ean_code(qualified_products1.get(l).getScan_ean_code_or_enterd_ean_code());
applyeid_products.add(invoiceGetterSetter);
}
}
@@ -3895,7 +3942,6 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else {
calculate_per_productwise = (total_valueper_productwise * getentityValue) / 100;
}
//test("promodata", String.valueOf(calculate_per_productwise));
} catch (NumberFormatException e) {
e.fillInStackTrace();
}
@@ -4097,7 +4143,6 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
}
}
}
invoiceGetterSetter.setProduct(String.valueOf(tip_cal));
invoiceGetterSetter.setProduct_Id("0");
//////added applyied products in list
@@ -4276,20 +4321,23 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} catch (Exception e) {
e.fillInStackTrace();
}
return status;
}
protected void remove_added_promo_index() {
try {
if (!selected_list.isEmpty()) {
Iterator<InvoiceGetterSetter> it = selected_list.iterator();
while (it.hasNext()) {
InvoiceGetterSetter name = it.next();
if (name.isPromo_flag()) {
it.remove();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { // API 24+
selected_list.removeIf(InvoiceGetterSetter::isPromo_flag);
} else {
// Fallback for SDK 23 and below
Iterator<InvoiceGetterSetter> iterator = selected_list.iterator();
while (iterator.hasNext()) {
InvoiceGetterSetter item = iterator.next();
if (item.isPromo_flag()) {
iterator.remove();
}
}
// Do something
}
}
} catch (Exception e) {
@@ -4299,14 +4347,15 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
protected void remove_added_promo_fromtemp(String promoId) {
try {
if (!added_prmo_products.isEmpty()) {
Iterator<InvoiceGetterSetter> it = added_prmo_products.iterator();
while (it.hasNext()) {
InvoiceGetterSetter name = it.next();
if (promoId.equals(name.getPromotion_Id())) {
it.remove();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
added_prmo_products.removeIf(item -> promoId.equals(item.getPromotion_Id()));
} else {
Iterator<InvoiceGetterSetter> iterator = added_prmo_products.iterator();
while (iterator.hasNext()) {
InvoiceGetterSetter item = iterator.next();
if (promoId.equals(item.getPromotion_Id())) {
iterator.remove();
}
// Do something
}
}
} catch (Exception e) {
@@ -4362,7 +4411,6 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
}
close_white.setOnClickListener(view -> {
purposeDialog.dismiss();
if (purposeDialog != null && purposeDialog.isShowing()) {
purposeDialog.dismiss();
}
@@ -4458,7 +4506,6 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
class LoadTask extends AsyncTask<Boolean, Void, Void> {
boolean flag = false;
@Override
protected void onPreExecute() {
super.onPreExecute();
@@ -4473,11 +4520,27 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
@Override
protected Void doInBackground(Boolean... bool) {
try {
//Toast.makeText(context,"Promo Check",Toast.LENGTH_SHORT).show();
FirebaseCrashlytics.getInstance().log("LoadTask started");
flag = bool[0];
FirebaseCrashlytics.getInstance().log("Flag value: " + flag);
if (flag) {
FirebaseCrashlytics.getInstance().log("Step: added_check_promotion START");
added_check_promotion();
FirebaseCrashlytics.getInstance().log("Step: added_check_promotion END");
} else {
FirebaseCrashlytics.getInstance().log("Step: check_promotion_for_worth START");
check_promotion_for_worth();
FirebaseCrashlytics.getInstance().log("Step: check_promotion_for_worth END");
}
FirebaseCrashlytics.getInstance().log("LoadTask completed");
} catch (Throwable t) { // 👈 MUST BE Throwable
FirebaseCrashlytics.getInstance().log("Crash in doInBackground");
FirebaseCrashlytics.getInstance().recordException(t);
t.printStackTrace();
}
return null;
}
@@ -4485,11 +4548,26 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
dialog.dismiss();
//dialog.dismiss();
/* try {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
} catch (Exception e) {
e.printStackTrace();
}*/
try {
if (context instanceof Activity) {
Activity activity = (Activity) context;
if (!activity.isFinishing() && dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
}
} catch (Throwable t) { // 👈 use Throwable, not Exception
t.printStackTrace();
FirebaseCrashlytics.getInstance().recordException(t);
}
}
}
@@ -4514,8 +4592,6 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
////for product promotion
db.open();
ArrayList<MasterPromotion> promoMaster = db.getPromotionMaster(true);
// //test("promosize", String.valueOf(promoMaster.size()));
if (!promoMaster.isEmpty()) {
final ArrayList<MasterPromotion> validPromoList = new ArrayList<>();
for (int x = 0; x < promoMaster.size(); x++) {
@@ -4528,13 +4604,11 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
boolean flag_for_and = true;
for (int q = 0; q < promoAndList.size(); q++) {
db.open();
int product_countfor_and = db.getPromotiongetProductforAndPromo(promoAndList.get(q).getId(),
promoAndList.get(q).getPromoId().toString(), true, username, visit_date, CounterId);
int product_countfor_and = db.getPromotiongetProductforAndPromo(promoAndList.get(q).getId(), promoAndList.get(q).getPromoId().toString(), true, username, visit_date, CounterId);
////checking AND promo itemcount
if (product_countfor_and >= promoAndList.get(q).getItemCount()) {
db.open();
db.update_temp_promo_apply_definitionfor_andpromo(promoAndList.get(q).getId(), CounterId, username,
promoAndList.get(q).getPromoId(), visit_date);
db.update_temp_promo_apply_definitionfor_andpromo(promoAndList.get(q).getId(), CounterId, username, promoAndList.get(q).getPromoId(), visit_date);
} else {
db.open();
flag_for_and = false;
@@ -4542,7 +4616,6 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
break;
}
}
if (flag_for_and) {
//////--------insert all AND Promo data to Apply Definition.Table...-----------
db.open();
@@ -4553,9 +4626,14 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else {
db.open();
int product_count = db.getPromotiongetProductall(promoMaster.get(x), true, username, visit_date, CounterId);
//test("product_count", String.valueOf(product_count));
String promoSetEntityValues = promoMaster.get(x).getPromotionSetEntityValue();
if (product_count > 0) {
if (product_count >= Integer.parseInt(promoMaster.get(x).getPromotionSetEntityValue())) {
if (promoSetEntityValues.contains("|") && promoSetEntityValues.split("\\|").length == 2 && isCostInRange(promoSetEntityValues, product_count, promoMaster.get(x))) {
db.open();
db.update_temp_promo_apply_definition(CounterId, username, promoMaster.get(x).getPromoId().toString(), visit_date);
validPromoList.add(promoMaster.get(x));
} else {
if (!promoSetEntityValues.contains("|") && product_count >= Integer.parseInt(promoSetEntityValues)) {
db.open();
db.update_temp_promo_apply_definition(CounterId, username, promoMaster.get(x).getPromoId().toString(), visit_date);
validPromoList.add(promoMaster.get(x));
@@ -4563,19 +4641,43 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
}
}
}
}
if (!validPromoList.isEmpty()) {
runOnUiThread(() -> {
if (dialog != null && dialog.isShowing()) {
/* if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
show_promotion_skuwise_dialog(context, selected_list, validPromoList, false);
});
*/
try {
if (context instanceof Activity) {
Activity activity = (Activity) context;
if (!activity.isFinishing()) {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
show_promotion_skuwise_dialog(context, selected_list, validPromoList, false);
}
}
} catch (Throwable t) {
t.printStackTrace();
FirebaseCrashlytics.getInstance().recordException(t);
}
});
} else {
///finish
try{
checkPromoWorth(promoMaster);
}
catch(Throwable t){
t.printStackTrace();
FirebaseCrashlytics.getInstance().recordException(t);
}
}
} else {
////get promotion by jeevan
////for worth promotion
@@ -4606,7 +4708,6 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
break;
}
}
if (flag_for_and) {
//////--------insert all AND Promo data to Apply Definition.Table...-----------
db.open();
@@ -4617,12 +4718,19 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else {
db.open();
int product_count = db.getPromotiongetProductall(promoMaster.get(x), false, username, visit_date, CounterId);
//test("product_count", String.valueOf(product_count));
//Log.e("product_count", String.valueOf(product_count));
String promoSetEntityValues = promoMaster.get(x).getPromotionSetEntityValue();
if (product_count > 0) {
if (product_count >= Integer.parseInt(promoMaster.get(x).getPromotionSetEntityValue())) {
if (promoSetEntityValues.contains("|") && promoSetEntityValues.split("\\|").length == 2 && isCostInRange(promoSetEntityValues, product_count, promoMaster.get(x))) {
db.open();
db.update_temp_promo_apply_definition(CounterId, username, promoMaster.get(x).getPromoId().toString(), visit_date);
validPromoList.add(promoMaster.get(x));
} else {
if (!promoSetEntityValues.contains("|") && product_count >= Integer.parseInt(promoSetEntityValues)) {
db.open();
db.update_temp_promo_apply_definition(CounterId, username, promoMaster.get(x).getPromoId().toString(), visit_date);
validPromoList.add(promoMaster.get(x));
}
}
}
}
@@ -4674,12 +4782,14 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
}
}
} catch (NumberFormatException e) {
e.fillInStackTrace();
} catch (Throwable t) {
t.printStackTrace();
FirebaseCrashlytics.getInstance().recordException(t);
}
}
private void checkPromoWorth(ArrayList<MasterPromotion> promoMaster) {
try{
db.open();
promoMaster = db.getPromotionMaster(false);
if (!promoMaster.isEmpty()) {
@@ -4717,11 +4827,18 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else {
db.open();
int product_count = db.getPromotiongetProductall(promoMaster.get(x), false, username, visit_date, CounterId);
String promoSetEntityValues = promoMaster.get(x).getPromotionSetEntityValue();
if (product_count > 0) {
if (product_count >= Integer.parseInt(promoMaster.get(x).getPromotionSetEntityValue())) {
if (promoSetEntityValues.contains("|") && promoSetEntityValues.split("\\|").length == 2 && isCostInRange(promoSetEntityValues, product_count, promoMaster.get(x))) {
db.open();
db.update_temp_promo_apply_definition(CounterId, username, promoMaster.get(x).getPromoId().toString(), visit_date);
validPromoList.add(promoMaster.get(x));
} else {
if (!promoSetEntityValues.contains("|") && product_count >= Integer.parseInt(promoSetEntityValues)) {
db.open();
db.update_temp_promo_apply_definition(CounterId, username, promoMaster.get(x).getPromoId().toString(), visit_date);
validPromoList.add(promoMaster.get(x));
}
}
}
}
@@ -4771,6 +4888,11 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
added_prmo_products = new ArrayList<>();
});
}
} catch (Throwable t) {
t.printStackTrace();
FirebaseCrashlytics.getInstance().recordException(t);
}
}
private void check_promotion_for_worth() {
@@ -4813,12 +4935,18 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
} else {
db.open();
int product_count = db.getPromotiongetProductall(promoMaster.get(x), false, username, visit_date, CounterId);
//test("Productcount", String.valueOf(product_count));
String promoSetEntityValues = promoMaster.get(x).getPromotionSetEntityValue();
if (product_count > 0) {
if (product_count >= Integer.parseInt(promoMaster.get(x).getPromotionSetEntityValue())) {
if (promoSetEntityValues.contains("|") && promoSetEntityValues.split("\\|").length == 2 && isCostInRange(promoSetEntityValues, product_count, promoMaster.get(x))) {
db.open();
db.update_temp_promo_apply_definition(CounterId, username, promoMaster.get(x).getPromoId().toString(), visit_date);
validPromoList.add(promoMaster.get(x));
} else {
if (!promoSetEntityValues.contains("|") && product_count >= Integer.parseInt(promoSetEntityValues)) {
db.open();
db.update_temp_promo_apply_definition(CounterId, username, promoMaster.get(x).getPromoId().toString(), visit_date);
validPromoList.add(promoMaster.get(x));
}
}
}
}
@@ -4864,8 +4992,9 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
added_prmo_products = new ArrayList<>();
});
}
} catch (NumberFormatException e) {
e.fillInStackTrace();
} catch (Throwable t) {
t.printStackTrace();
FirebaseCrashlytics.getInstance().recordException(t);
}
}
@@ -4907,5 +5036,27 @@ public class ConsumerUserDetailsActivity extends AppCompatActivity implements Vi
return object;
}
private boolean isCostInRange(String range, int totalCost, MasterPromotion promo) {
if (range == null || range.trim().isEmpty()) {
return false; // No range provided
}
String[] parts = range.split("\\|");
if (parts.length != 2) {
return false; // Invalid format
}
try {
int min = Integer.parseInt(parts[0].trim());
int max = Integer.parseInt(parts[1].trim());
boolean flg = totalCost >= min && totalCost <= max;
Log.e("Testing------1", min + " -- " + max + "\n" + flg);
return flg;
} catch (NumberFormatException e) {
e.fillInStackTrace();
return false; // Invalid number format
}
}
}
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.consumeractivity;
package com.cpm.lorealbaMabeline.consumeractivity;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
@@ -32,15 +32,15 @@ import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.gsonGetterSetter.InvoiceGetterSetter;
import com.cpm.lorealbaautomation.gsonGetterSetter.JourneyPlan;
import com.cpm.lorealbaautomation.printer.PrinterActivity;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.gsonGetterSetter.InvoiceGetterSetter;
import com.cpm.lorealbaMabeline.gsonGetterSetter.JourneyPlan;
import com.cpm.lorealbaMabeline.printer.PrinterActivity;
import java.util.ArrayList;
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.dailyactivity;
package com.cpm.lorealbaMabeline.dailyactivity;
import android.annotation.SuppressLint;
import android.app.Activity;
@@ -11,7 +11,7 @@ import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import com.cpm.lorealbaautomation.utils.NonScrollExpandableListView;
import com.cpm.lorealbaMabeline.utils.NonScrollExpandableListView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import androidx.annotation.NonNull;
@@ -36,7 +36,6 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.BaseExpandableListAdapter;
import android.widget.EditText;
import android.widget.ExpandableListView;
import android.widget.ImageView;
import android.widget.RadioGroup;
import android.widget.RelativeLayout;
@@ -44,20 +43,20 @@ import android.widget.Spinner;
import android.widget.TextView;
import com.androidbuts.multispinnerfilter.KeyPairBoolData;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.constant.RoundedImageView;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.download.Downloader;
import com.cpm.lorealbaautomation.gettersetter.AuditDataGetterSetter;
import com.cpm.lorealbaautomation.gettersetter.BaProfileGetterSetter;
import com.cpm.lorealbaautomation.gsonGetterSetter.JourneyPlan;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterProfile;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterProfileQuestion;
import com.cpm.lorealbaautomation.makeupexpert.BaProfileMultiSelection;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.constant.RoundedImageView;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.download.Downloader;
import com.cpm.lorealbaMabeline.gettersetter.AuditDataGetterSetter;
import com.cpm.lorealbaMabeline.gettersetter.BaProfileGetterSetter;
import com.cpm.lorealbaMabeline.gsonGetterSetter.JourneyPlan;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterProfile;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterProfileQuestion;
import com.cpm.lorealbaMabeline.makeupexpert.BaProfileMultiSelection;
import com.squareup.picasso.NetworkPolicy;
import com.squareup.picasso.Picasso;
@@ -74,8 +73,8 @@ import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static com.cpm.lorealbaautomation.constant.CommonFunctions.getCurrentTime;
import static com.cpm.lorealbaautomation.dailyactivity.StoreImageActivity.convertBitmap;
import static com.cpm.lorealbaMabeline.constant.CommonFunctions.getCurrentTime;
import static com.cpm.lorealbaMabeline.dailyactivity.StoreImageActivity.convertBitmap;
public class BAProfileActivity extends AppCompatActivity implements View.OnClickListener {
EditText edt_employee_code, edt_full_name, supervisor_name, edt_address, edt_brand, edt_counter, edt_store_name, edt_location, edt_mobile_no, edt_email, edt_enstagram_address, edt_city, edt_current_bp;
@@ -216,7 +215,6 @@ public class BAProfileActivity extends AppCompatActivity implements View.OnClick
if (file != null) {
for (File value : file) arrayFiles.add(value.getName());
}
return arrayFiles;
}
@@ -313,7 +311,6 @@ public class BAProfileActivity extends AppCompatActivity implements View.OnClick
}
});
fab.setOnClickListener(view -> {
expandableListView.clearFocus();
expandableListView.invalidateViews();
@@ -656,7 +653,7 @@ public class BAProfileActivity extends AppCompatActivity implements View.OnClick
if (!checkflag) {
if (checkGroupArray.contains(groupPosition) && checkHeaderArray.contains(childPosition)) {
holder.card_view.setBackgroundColor(ContextCompat.getColor(_context, R.color.red));
holder.card_view.setBackgroundColor(ContextCompat.getColor(_context, io.github.memfis19.annca.R.color.red));
holder.card_view.setId(childPosition);
} else {
holder.card_view.setBackgroundColor(ContextCompat.getColor(_context, R.color.white));
@@ -710,7 +707,7 @@ public class BAProfileActivity extends AppCompatActivity implements View.OnClick
if (!checkflag) {
if (checkGroupArray.contains(groupPosition)) {
cardView.setBackgroundColor(ContextCompat.getColor(_context, R.color.red));
cardView.setBackgroundColor(ContextCompat.getColor(_context, io.github.memfis19.annca.R.color.red));
} else {
cardView.setBackgroundColor(ContextCompat.getColor(_context, R.color.colorPrimaryDark));
}
@@ -969,7 +966,6 @@ public class BAProfileActivity extends AppCompatActivity implements View.OnClick
AlertandMessages.showToastMsg(context, "Please Enter Valid Email Id ");
status = false;
}
return status;
}
@@ -1047,7 +1043,7 @@ public class BAProfileActivity extends AppCompatActivity implements View.OnClick
round_img_pic.setImageBitmap(bitmp);
}
} else if (!baProfileListData.isEmpty() && baProfileListData.get(0).getProfilePic() != null && !baProfileListData.get(0).getProfilePic().isEmpty()) {
Picasso.with(context).load(baProfileListData.get(0).getProfilePic()).networkPolicy(NetworkPolicy.NO_CACHE).into(round_img_pic);
Picasso.with(context).load(baProfileListData.get(0).getProfilePic()).networkPolicy(NetworkPolicy.NO_CACHE).placeholder(R.mipmap.profile_image).into(round_img_pic);
} else {
bitmp = BitmapFactory.decodeResource(getResources(), R.mipmap.profile_image);
round_img_pic.setImageBitmap(bitmp);
@@ -1,4 +1,4 @@
package com.cpm.lorealbaautomation.dailyactivity;
package com.cpm.lorealbaMabeline.dailyactivity;
import android.annotation.SuppressLint;
import android.app.Activity;
@@ -39,16 +39,16 @@ import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.TextView;
import com.cpm.lorealbaautomation.Database.Lorealba_Database;
import com.cpm.lorealbaautomation.R;
import com.cpm.lorealbaautomation.constant.AlertandMessages;
import com.cpm.lorealbaautomation.constant.CommonFunctions;
import com.cpm.lorealbaautomation.constant.CommonString;
import com.cpm.lorealbaautomation.delegates.PrefHelper;
import com.cpm.lorealbaautomation.gsonGetterSetter.BASurveyGetterSetter;
import com.cpm.lorealbaautomation.gsonGetterSetter.JourneyPlan;
import com.cpm.lorealbaautomation.gsonGetterSetter.MasterSurvey;
import com.cpm.lorealbaautomation.retrofit.PostApi;
import com.cpm.lorealbaMabeline.Database.Lorealba_Database;
import com.cpm.lorealbaMabeline.R;
import com.cpm.lorealbaMabeline.constant.AlertandMessages;
import com.cpm.lorealbaMabeline.constant.CommonFunctions;
import com.cpm.lorealbaMabeline.constant.CommonString;
import com.cpm.lorealbaMabeline.delegates.PrefHelper;
import com.cpm.lorealbaMabeline.gsonGetterSetter.BASurveyGetterSetter;
import com.cpm.lorealbaMabeline.gsonGetterSetter.JourneyPlan;
import com.cpm.lorealbaMabeline.gsonGetterSetter.MasterSurvey;
import com.cpm.lorealbaMabeline.retrofit.PostApi;
import org.json.JSONArray;
import org.json.JSONException;
@@ -71,7 +71,7 @@ import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import static com.cpm.lorealbaautomation.dailyactivity.StoreImageActivity.convertBitmap;
import static com.cpm.lorealbaMabeline.dailyactivity.StoreImageActivity.convertBitmap;
public class BASurveyActivity extends AppCompatActivity {
@@ -570,7 +570,7 @@ public class BASurveyActivity extends AppCompatActivity {
if (!checkflag) {
if (checkGroupArray.contains(groupPosition) && checkHeaderArray.contains(childPosition)) {
holder.card_view.setBackgroundColor(getResources().getColor(R.color.red));
holder.card_view.setBackgroundColor(getResources().getColor(io.github.memfis19.annca.R.color.red));
holder.card_view.setId(childPosition);
} else {
holder.card_view.setBackgroundColor(getResources().getColor(R.color.white));
@@ -629,7 +629,7 @@ public class BASurveyActivity extends AppCompatActivity {
if (!checkflag) {
if (checkGroupArray.contains(groupPosition)) {
cardView.setBackgroundColor(getResources().getColor(R.color.red));
cardView.setBackgroundColor(getResources().getColor(io.github.memfis19.annca.R.color.red));
} else {
cardView.setBackgroundColor(getResources().getColor(R.color.colorPrimaryDark));
}

Some files were not shown because too many files have changed in this diff Show More