Commit 10663e97 authored by satya's avatar satya

add header "model"

parent 00f102af
......@@ -14,6 +14,17 @@
<option name="screenX" value="720" />
<option name="screenY" value="1280" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="OPPO" />
<option name="codename" value="OP573DL1" />
<option name="id" value="OP573DL1" />
<option name="manufacturer" value="OPPO" />
<option name="name" value="CPH2557" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="28" />
<option name="brand" value="DOCOMO" />
......@@ -58,6 +69,17 @@
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="motorola" />
<option name="codename" value="arcfox" />
<option name="id" value="arcfox" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="razr plus 2024" />
<option name="screenDensity" value="360" />
<option name="screenX" value="1080" />
<option name="screenY" value="1272" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
......@@ -113,6 +135,17 @@
<option name="screenX" value="2220" />
<option name="screenY" value="1080" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="dm2q" />
<option name="id" value="dm2q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="S23 Plus" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
......@@ -135,6 +168,28 @@
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="e3q" />
<option name="id" value="e3q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S24 Ultra" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1440" />
<option name="screenY" value="3120" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="eos" />
<option name="id" value="eos" />
<option name="manufacturer" value="Google" />
<option name="name" value="Eos" />
<option name="screenDensity" value="320" />
<option name="screenX" value="384" />
<option name="screenY" value="384" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
......@@ -168,6 +223,28 @@
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="motorola" />
<option name="codename" value="fogona" />
<option name="id" value="fogona" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="moto g play - 2024" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1600" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="g0q" />
<option name="id" value="g0q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="SM-S906U1" />
<option name="screenDensity" value="450" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
......@@ -223,6 +300,17 @@
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="motorola" />
<option name="codename" value="maui" />
<option name="id" value="maui" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="moto g play - 2023" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1600" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="31" />
<option name="brand" value="google" />
......
This diff is collapsed.
......@@ -26,8 +26,8 @@ android {
applicationId "com.seatel.mobilehall"
minSdk 23
targetSdk 34
versionCode 201907116
versionName "2.3.15"
versionCode 201907117
versionName "2.3.16"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.release
......@@ -35,6 +35,7 @@ android {
buildTypes {
release {
resValue "string", "app_name", "yes seatel"
buildConfigField 'String', 'CLIENT_ID', '"eyJhbGciOiJIUzI1NiJ9.c2VhdGVsLWFwaS1kZXY.NsFhP0C7pqeONbcGAf42lQLLe6AIgy1QdOUOrg0uqcI"'
buildConfigField 'String', 'BASE_URL', '"https://api.yes.com.kh/"'
//production version
......@@ -48,6 +49,7 @@ android {
}
debug {
resValue "string", "app_name", "yes dev"
buildConfigField 'String', 'CLIENT_ID', '"eyJhbGciOiJIUzI1NiJ9.c2VhdGVsLWFwaS1kZXY.NsFhP0C7pqeONbcGAf42lQLLe6AIgy1QdOUOrg0uqcI"'
buildConfigField 'String', 'BASE_URL', '"http://api-dev.yes.com.kh/"'
buildConfigField 'String', 'CLIENT_SECRET', '"MjExNzM0NWNiNTA3NDZmNzg4NmE0NTNlYjYyMWNkODk="'
......
......@@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 201907116,
"versionName": "2.3.15",
"versionCode": 201907117,
"versionName": "2.3.16",
"outputFile": "app-release.apk"
}
],
......
......@@ -29,11 +29,10 @@ object Devices {
}
fun getDeviceID(context: Context): String {
val mModel: String
mModel = Settings.Secure.getString(context.contentResolver, Settings.Secure.ANDROID_ID)
return mModel
return Settings.Secure.getString(context.contentResolver, Settings.Secure.ANDROID_ID)
}
fun getDeviceInfo(context: Context?) {
if (mMarketName == null) {
DeviceName.with(context)
......@@ -85,12 +84,13 @@ object Devices {
} else {
""
}
val deviceOSVersion: String
get() {
val mOSVersion: String
mOSVersion = Build.VERSION.RELEASE
return mOSVersion
}
fun getDeviceOSVersion(): String {
return Build.VERSION.RELEASE
}
val deviceSDKVersion: Int
get() {
val mSdkVersion: Int
......
......@@ -71,6 +71,7 @@ public abstract class SeatelSuperRequest<T> extends CoreRequest<T> {
header.put("X-Timestamp", getTimestamp());
header.put("X-Timezone", getLocalTimezone());
header.put("X-Platform", "android");
header.put("Model", Devices.INSTANCE.getDeviceModel());
header.put("X-OS-Version", Devices.INSTANCE.getDeviceOSVersion());
header.put("X-UDID", Devices.INSTANCE.getDeviceID(getContext()));
header.put("X-App-Signature", getAppSignatures());
......
......@@ -5,6 +5,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import coil.load
import com.seatel.mobilehall.R
import com.seatel.mobilehall.databinding.ItemHomeImageSliderBinding
import com.seatel.mobilehall.ui.home.model.BannersModel
import com.seatel.mobilehall.ui.login.activity.TermsAndConditionsActivity
......@@ -43,10 +44,19 @@ class HomeImageSliderAdapter(var context: Context) :
override fun onBindViewHolder(viewHolder: SliderAdapterVH, position: Int) {
val sliderItem = mSliderItems[position]
viewHolder.view.ivAutoImageSlider.load(sliderItem.getMobileUrl()) {
crossfade(true)
}
// viewHolder.view.titleBanner.text = sliderItem.getTitle()
if (sliderItem.getMobileUrl().isEmpty()) {
viewHolder.view.ivAutoImageSlider.load(sliderItem.getUrl()) {
crossfade(true)
placeholder(R.drawable.bg_button_primary)
error(R.drawable.bg_button_primary)
}
} else
viewHolder.view.ivAutoImageSlider.load(sliderItem.getMobileUrl()) {
crossfade(true)
placeholder(R.drawable.bg_round_gray_section)
error(R.drawable.bg_round_gray_section)
}
viewHolder.itemView.setOnClickListener(
View.OnClickListener {
if (sliderItem.getUrl().isNotBlank()) {
......
......@@ -333,7 +333,6 @@ class HomeFragment : BaseFragment(), View.OnClickListener, BannersInteractor.Vie
circleProfile.load(dataMainScreen.getProfilePicture()) {
crossfade(true)
transformations(CircleCropTransformation())
placeholder(R.drawable.ic_yes_profile)
}
imageBuyTopup.load(dataMainScreen.getBannerBuyTopup()) {
......
......@@ -3,8 +3,10 @@ package com.seatel.mobilehall.ui.login.fragment
import android.content.Context
import android.os.Bundle
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.widget.EditText
import com.android.volley.VolleyError
import com.seatel.mobilehall.R
......@@ -19,6 +21,8 @@ import com.seatel.mobilehall.util.SeatelUtils
import com.seatel.mobilehall.util.customview.CustomKeyboard
import com.seatel.mobilehall.util.customview.ErrorHandleView
import com.seatel.mobilehall.databinding.FragmentForgetPasswordBinding
import com.seatel.mobilehall.databinding.FragmentSignupBinding
import com.seatel.mobilehall.util.viewFragmentBinding
class ForgotPasswordFragment : MainFragment(), SignUpInteractor.View {
......@@ -31,8 +35,9 @@ class ForgotPasswordFragment : MainFragment(), SignUpInteractor.View {
private var keyboardView: CustomKeyboard? = null
private var _binding: FragmentForgetPasswordBinding? = null
private val binding get() = _binding!!
private val binding by viewFragmentBinding(
FragmentForgetPasswordBinding::inflate
)
fun setDataForAddNewPhone(mainPhone: String) {
this.mMainPhoneNumber = mainPhone
......@@ -60,14 +65,23 @@ class ForgotPasswordFragment : MainFragment(), SignUpInteractor.View {
// setFragmentLayout(R.layout.fragment_forget_password)
}
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
keyboardView = binding.keyboardView // Set up the keyboard view
init()
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
// Initialize ViewBinding
_binding = FragmentForgetPasswordBinding.bind(view)
// _binding = FragmentForgetPasswordBinding.bind(view)
keyboardView = binding.keyboardView // Set up the keyboard view
init()
}
private fun init() {
......@@ -173,7 +187,6 @@ class ForgotPasswordFragment : MainFragment(), SignUpInteractor.View {
override fun onDestroyView() {
super.onDestroyView()
_binding = null // Clean up binding
mSignUpPresenter.onDestroy()
}
......
......@@ -5,7 +5,9 @@ import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.android.volley.VolleyError
import com.seatel.mobilehall.R
......@@ -22,8 +24,10 @@ import com.seatel.mobilehall.util.SeatelAlertDialog
import com.seatel.mobilehall.util.SeatelUtils
import com.facebook.login.LoginManager
import com.seatel.mobilehall.data.network.SeatelSuperRequest
import com.seatel.mobilehall.databinding.FragmentHomeBinding
import com.seatel.mobilehall.util.customview.ErrorHandleView
import com.seatel.mobilehall.databinding.FragmentSignupBinding
import com.seatel.mobilehall.util.viewFragmentBinding
class SignUpFragment : MainFragment(), SignUpInteractor.View, LoginInteractor.View {
......@@ -35,7 +39,12 @@ class SignUpFragment : MainFragment(), SignUpInteractor.View, LoginInteractor.Vi
private lateinit var mSocialType: String
private var isRegisterSocail = false
private var typeSignUp = Constant.REGISTER
private lateinit var binding: FragmentSignupBinding // ViewBinding for this fragment
private val binding by viewFragmentBinding(
FragmentSignupBinding::inflate
)
// private lateinit var binding: FragmentSignupBinding // ViewBinding for this fragment
override fun onLoginSucceed(isNoneSeatel: Boolean, isPostPad: Boolean) {}
......@@ -96,11 +105,11 @@ class SignUpFragment : MainFragment(), SignUpInteractor.View, LoginInteractor.Vi
// setFragmentLayout(R.layout.fragment_signup)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding = FragmentSignupBinding.bind(view) // Initialize ViewBinding
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
mLoginPresenter = LoginPresenter(getmContext(), this)
if (!TextUtils.isEmpty(mUserId)) {
......@@ -115,9 +124,9 @@ class SignUpFragment : MainFragment(), SignUpInteractor.View, LoginInteractor.Vi
binding.ctvEmail.hint = binding.ctvEmail.hint
binding.ctvPassword.hint = binding.ctvPassword.hint
binding.ctvConfirmPassword.hint = binding.ctvConfirmPassword.hint
/* binding.termOfService.setOnClickListener {
TermsAndConditionsActivity.launch(getmContext())
}*/
/* binding.termOfService.setOnClickListener {
TermsAndConditionsActivity.launch(getmContext())
}*/
binding.textViewLogin.setOnClickListener {
getmMainFragmentPresenter()!!.addFragment(LoginFragment(), true)
......@@ -154,6 +163,15 @@ class SignUpFragment : MainFragment(), SignUpInteractor.View, LoginInteractor.Vi
binding.imageViewInstagram.setOnClickListener {
// Handle Instagram login
}
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
// binding = FragmentSignupBinding.bind(view) // Initialize ViewBinding
}
override fun onRequestCodeSucceed(resetPasswordModel: ResetPasswordModel) {
......
......@@ -66,18 +66,25 @@ class Roaming1Adapter(
holder.binding.tvMainTitle.text = appProductsDetail.valuePackSecTwoModel.title
holder.binding.tvRemindTitle.apply {
settings.javaScriptEnabled = true
loadDataWithBaseURL(
null,
appProductsDetail.valuePackSecTwoModel.subTitle,
"text/html",
"UTF-8",
null
)
settings.defaultFontSize = 12
isSpecialSim = SeatelSharePreferences.getInstance(mContext)?.isSpecialSimcard()!!
if (!isSpecialSim) {
holder.binding.tvRemindTitle.visibility = View.VISIBLE
holder.binding.tvRemindTitle.apply {
settings.javaScriptEnabled = true
loadDataWithBaseURL(
null,
appProductsDetail.valuePackSecTwoModel.subTitle,
"text/html",
"UTF-8",
null
)
settings.defaultFontSize = 12
}
} else holder.binding.tvRemindTitle.visibility = View.GONE
}
holder.binding.customTextView.apply {
settings.javaScriptEnabled = true
......@@ -91,8 +98,6 @@ class Roaming1Adapter(
settings.defaultFontSize = 12
}
holder.binding.swOnOff.isChecked =
SeatelSharePreferences.getInstance(mContext)?.isRoamingActivation()!!
......
......@@ -66,18 +66,23 @@ class RoamingAdapter(
holder.binding.tvMainTitle.text = appProductsDetail.valuePackSecTwoModel.title
holder.binding.tvRemindTitle.apply {
settings.javaScriptEnabled = true
loadDataWithBaseURL(
null,
appProductsDetail.valuePackSecTwoModel.subTitle,
"text/html",
"UTF-8",
null
)
settings.defaultFontSize = 12
isSpecialSim = SeatelSharePreferences.getInstance(mContext)?.isSpecialSimcard()!!
if (!isSpecialSim) {
holder.binding.tvRemindTitle.visibility = View.VISIBLE
holder.binding.tvRemindTitle.apply {
settings.javaScriptEnabled = true
loadDataWithBaseURL(
null,
appProductsDetail.valuePackSecTwoModel.subTitle,
"text/html",
"UTF-8",
null
)
settings.defaultFontSize = 12
}
}
} else holder.binding.tvRemindTitle.visibility = View.GONE
holder.binding.customTextView.apply {
settings.javaScriptEnabled = true
......
......@@ -250,6 +250,7 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>(), View.OnClickList
}
val currentVersions = Devices.getAppVersionName(this).split("\\.")
binding.tvAppVersion.text = "V ${currentVersions.joinToString()}"
// binding.tvAppVersion.text = "V ${Devices.getAppVersionName(this)}"
binding.tvCacheNum.text = analyseStorage(this)
binding.tvCacheNum.text = binding.tvCacheNum.text.toString().replace(",", ".")
......@@ -468,7 +469,7 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>(), View.OnClickList
binding.ctvLanguage.text = getString(R.string.language)
binding.ctvNotification.text = getString(R.string.notification)
binding.ctvClearCache.text = getString(R.string.clear_cache)
binding.tvAppVersion.text = getString(R.string.app_version)
// binding.tvAppVersion.text = getString(R.string.app_version)
// text_view_titleBar.text = getString(R.string.setting)
binding.ctvFingerprint.text = getString(R.string.enable_fingerprint)
binding.ivlogout.text = getString(R.string.log_out)
......
......@@ -82,10 +82,7 @@ class ProfilesFragment : BaseFragment(), RequestSlideAccountUserNameInteractor.V
AnalyticsHelper.Event.PROFILE_TAP_SETTING,
null
)
if (getMainPhoneLogin().isEmpty() || getPhoneLogin().isEmpty()) {
LoginActivity.lunch(requireContext())
} else
SettingActivity.lunch(getmContext())
SettingActivity.lunch(getmContext())
}
tvLoginSignUp.setOnClickListener {
......@@ -142,7 +139,9 @@ class ProfilesFragment : BaseFragment(), RequestSlideAccountUserNameInteractor.V
GetMainData(getmContext(), getPhoneLogin(), "") { it ->
if (it) {
dataMainScreen = Gson().fromJson(
context?.let { it1 -> SeatelSharePreferences.getInstance(it1)?.getMainScreenData() },
context?.let { it1 ->
SeatelSharePreferences.getInstance(it1)?.getMainScreenData()
},
MainDataModel::class.java
)
dataMainScreen?.let {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment