10 Commits
1.0 ... master

11 changed files with 179 additions and 144 deletions
Unified View
  1. +19
    -6
      app/build.gradle
  2. +2
    -2
      app/src/main/java/com/nivesh/production/bajajfd/adapter/SectionsPagerAdapter.kt
  3. +1
    -0
      app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/StepTwoBajajFDFragment.kt
  4. +1
    -0
      app/src/main/java/com/nivesh/production/bajajfd/ui/providerfactory/FDModelProviderFactory.kt
  5. +1
    -0
      app/src/main/java/com/nivesh/production/bajajfd/util/Common.kt
  6. +7
    -7
      app/src/main/java/com/nivesh/production/bajajfd/util/EncryptionDecryption.kt
  7. +108
    -108
      app/src/main/java/com/nivesh/production/bajajfd/util/Utility.kt
  8. +0
    -21
      app/src/main/java/com/nivesh/production/bajajfd/util/Utils_Functions.kt
  9. +0
    -0
      consumer-rules.pro
  10. +2
    -0
      gradle.properties
  11. +38
    -0
      proguard-rules.pro

+ 19
- 6
app/build.gradle View File

@ -9,16 +9,34 @@ publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
groupId = 'com.nivesh.production.bajajfd.Manoj.Singh' groupId = 'com.nivesh.production.bajajfd.Manoj.Singh'
artifactId = 'library'
artifactId = 'LibPubMain'
version = '1.0' version = '1.0'
} }
} }
} }
afterEvaluate {
publishing {
publications{
release(MavenPublication) {
// from components.release
groupId = 'com.nivesh.production.bajajfd.Manoj.Singh'
artifactId = 'LibPubMain'
version = '1.0'
}
}
}
}
android { android {
namespace 'com.nivesh.production.bajajfd' namespace 'com.nivesh.production.bajajfd'
compileSdk 33 compileSdk 33
lintOptions{
disable 'Deprecated','deprecated','unused','never used'
abortOnError false
}
defaultConfig { defaultConfig {
applicationId "com.nivesh.production.bajajfd" applicationId "com.nivesh.production.bajajfd"
minSdk 21 minSdk 21
@ -49,11 +67,6 @@ android {
} }
} }
ext{
roomVersion="2.4.3"
glideVersion="4.11.0"
}
dependencies { dependencies {
implementation 'androidx.core:core-ktx:1.9.0' implementation 'androidx.core:core-ktx:1.9.0'


+ 2
- 2
app/src/main/java/com/nivesh/production/bajajfd/adapter/SectionsPagerAdapter.kt View File

@ -4,7 +4,7 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter import androidx.fragment.app.FragmentPagerAdapter
@Suppress("Deprecation")
class SectionsPagerAdapter(manager: FragmentManager,private val fragments: Array<Fragment>) : FragmentPagerAdapter(manager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) { class SectionsPagerAdapter(manager: FragmentManager,private val fragments: Array<Fragment>) : FragmentPagerAdapter(manager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
private val titles = ArrayList<String>() private val titles = ArrayList<String>()
@ -15,4 +15,4 @@ class SectionsPagerAdapter(manager: FragmentManager,private val fragments: Array
override fun getPageTitle(position: Int): CharSequence = titles[position] override fun getPageTitle(position: Int): CharSequence = titles[position]
}
}

+ 1
- 0
app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/StepTwoBajajFDFragment.kt View File

@ -987,6 +987,7 @@ class StepTwoBajajFDFragment : Fragment() {
} }
} }
@Suppress("Deprecation")
private fun setUpRecyclerView( private fun setUpRecyclerView(
bankList: List<ClientBanklist>?, bankList: List<ClientBanklist>?,
selectedAccount: String? = null selectedAccount: String? = null


+ 1
- 0
app/src/main/java/com/nivesh/production/bajajfd/ui/providerfactory/FDModelProviderFactory.kt View File

@ -5,6 +5,7 @@ import androidx.lifecycle.ViewModelProvider
import com.nivesh.production.bajajfd.repositories.MainRepository import com.nivesh.production.bajajfd.repositories.MainRepository
import com.nivesh.production.bajajfd.viewModel.BajajFDViewModel import com.nivesh.production.bajajfd.viewModel.BajajFDViewModel
@Suppress("UNCHECKED_CAST")
class FDModelProviderFactory(private val mainRepository: MainRepository) : class FDModelProviderFactory(private val mainRepository: MainRepository) :
ViewModelProvider.Factory { ViewModelProvider.Factory {


+ 1
- 0
app/src/main/java/com/nivesh/production/bajajfd/util/Common.kt View File

@ -47,6 +47,7 @@ class Common {
val connectivityManager = getApplication<NewsApplication>().getSystemService(.... val connectivityManager = getApplication<NewsApplication>().getSystemService(....
**/ **/
//internet check //internet check
@Suppress("Deprecation")
fun isNetworkAvailable(activity: Activity): Boolean { fun isNetworkAvailable(activity: Activity): Boolean {
val connectivityManager = activity.getSystemService( val connectivityManager = activity.getSystemService(
Context.CONNECTIVITY_SERVICE Context.CONNECTIVITY_SERVICE


+ 7
- 7
app/src/main/java/com/nivesh/production/bajajfd/util/EncryptionDecryption.kt View File

@ -49,13 +49,13 @@ class EncryptionDecryption {
ivParameterSpec = IvParameterSpec(rawSecretKey) ivParameterSpec = IvParameterSpec(rawSecretKey)
} }
fun encryptAsBase64(dataToEncrypt: String): String? {
var dataToEncrypt = dataToEncrypt
val dateFormat = SimpleDateFormat("SSS", Locale.US)
dataToEncrypt = dataToEncrypt + dateFormat.format(Date())
val encryptedData = encrypt(dataToEncrypt.toByteArray())
return Base64.encodeToString(encryptedData, Base64.DEFAULT)
}
// fun encryptAsBase64(dataToEncrypt: String): String? {
// var dataToEncrypt = dataToEncrypt
// val dateFormat = SimpleDateFormat("SSS", Locale.US)
// dataToEncrypt = dataToEncrypt + dateFormat.format(Date())
// val encryptedData = encrypt(dataToEncrypt.toByteArray())
// return Base64.encodeToString(encryptedData, Base64.DEFAULT)
// }
// public String decrypt(String textToDecrypt) throws Exception { // public String decrypt(String textToDecrypt) throws Exception {
// //


+ 108
- 108
app/src/main/java/com/nivesh/production/bajajfd/util/Utility.kt View File

@ -57,113 +57,113 @@ class Utility {
} }
} }
@SuppressLint("HardwareIds")
fun getDeviceInfo(mContext: Context): DeviceInfo {
val deviceInfo = DeviceInfo()
var device_id: String? = ""
try {
val telephonyManager =
mContext.getSystemService(Context.TELEPHONY_SERVICE) n class="k">as TelephonyManager
deviceInfo.app_version = (
SharedPrefrenceDataMethods.getVersionCode(
Constants.KEY_VERSION_CODE,
mContext
)
)
deviceInfo.device_model = (if (TextUtils.isEmpty(Build.DEVICE)) "" else Build.DEVICE)
deviceInfo.device_os_version = (if (TextUtils.isEmpty(Build.VERSION.RELEASE)) "" else Build.VERSION.RELEASE)
deviceInfo.device_name = (if (TextUtils.isEmpty(Build.PRODUCT)) "" else Build.PRODUCT)
deviceInfo.device_token = (
if (TextUtils.isEmpty(
SharedPrefrenceDataMethods.getGcmAppId(
Constants.KEY_GCM_APP_ID,
mContext
)
)
) "" else SharedPrefrenceDataMethods.getGcmAppId(
Constants.KEY_GCM_APP_ID,
mContext
)
)
deviceInfo.device_type = ("Android")
// Hemant Code Added start 28-10-2020
if (ActivityCompat.checkSelfPermission(
mContext,
Manifest.permission.READ_PHONE_STATE
) != PackageManager.PERMISSION_GRANTED
) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
device_id = telephonyManager.imei
if (device_id == null) {
device_id =
if (TextUtils.isEmpty(Build.getSerial())) "" else Build.getSerial()
}
} else {
device_id = telephonyManager.deviceId
if (device_id == null) {
device_id =
if (TextUtils.isEmpty(Build.SERIAL)) "" else Build.SERIAL
}
}
} else {
device_id = telephonyManager.deviceId
if (device_id == null) {
device_id = if (TextUtils.isEmpty(Build.SERIAL)) "" else Build.SERIAL
}
}
if (device_id == null || device_id.isEmpty() || device_id.equals(
"unknown",
ignoreCase = true
)
) {
device_id = if (TextUtils.isEmpty(
Settings.Secure.getString(
mContext.contentResolver,
Settings.Secure.ANDROID_ID
)
)
) "" else Settings.Secure.getString(
mContext.contentResolver,
Settings.Secure.ANDROID_ID
)
}
Log.e("device_id", "-> $device_id")
// Hemant changes 07-11-2019 start commented and Added 12-12-2019
// deviceInfo.device_id = (device_id + "#" + com.nivesh.production.util.Utility.getFlavor())
// Hemant changes 07-11-2019 end commented and Added 12-12-2019
// Hemant changes 07-11-2019 start added and commented 12-12-2019
deviceInfo.device_id_for_UMSId = (device_id)
// deviceInfo.setDeviceId(device_id);
// Hemant changes 07-11-2019 end added and commented 12-12-2019
} catch (e: java.lang.Exception) {
e.printStackTrace()
// Hemant changes 07-11-2019 start Added 28-10-2020
if (device_id == null || device_id.isEmpty() || device_id.equals(
"unknown",
ignoreCase = true
)
) {
device_id = if (TextUtils.isEmpty(
Settings.Secure.getString(
mContext.contentResolver,
Settings.Secure.ANDROID_ID
)
)
) "" else Settings.Secure.getString(
mContext.contentResolver,
Settings.Secure.ANDROID_ID
)
}
Log.e("device_id", "-> $device_id")
// deviceInfo.setDeviceId(device_id + "#" + com.nivesh.production.util.Utility.getFlavor())
deviceInfo.device_id_for_UMSId = (device_id)
// Hemant changes 07-11-2019 end Added 28-10-2020
}
return deviceInfo
}
// @SuppressLint("HardwareIds")
// fun getDeviceInfo(mContext: Context): DeviceInfo {
// val deviceInfo = DeviceInfo()
// var device_id: String? = ""
// try {
// val telephonyManager =
// mContext.getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
// deviceInfo.app_version = (
// SharedPrefrenceDataMethods.getVersionCode(
// Constants.KEY_VERSION_CODE,
// mContext
// )
// )
//
// deviceInfo.device_model = (if (TextUtils.isEmpty(Build.DEVICE)) "" else Build.DEVICE)
// deviceInfo.device_os_version = (if (TextUtils.isEmpty(Build.VERSION.RELEASE)) "" else Build.VERSION.RELEASE)
// deviceInfo.device_name = (if (TextUtils.isEmpty(Build.PRODUCT)) "" else Build.PRODUCT)
// deviceInfo.device_token = (
// if (TextUtils.isEmpty(
// SharedPrefrenceDataMethods.getGcmAppId(
// Constants.KEY_GCM_APP_ID,
// mContext
// )
// )
// ) "" else SharedPrefrenceDataMethods.getGcmAppId(
// Constants.KEY_GCM_APP_ID,
// mContext
// )
// )
// deviceInfo.device_type = ("Android")
//
// // Hemant Code Added start 28-10-2020
// if (ActivityCompat.checkSelfPermission(
// mContext,
// Manifest.permission.READ_PHONE_STATE
// ) != PackageManager.PERMISSION_GRANTED
// ) {
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// device_id = telephonyManager.imei
// if (device_id == null) {
// device_id =
// if (TextUtils.isEmpty(Build.getSerial())) "" else Build.getSerial()
// }
// } else {
// device_id = telephonyManager.deviceId
// if (device_id == null) {
// device_id =
// if (TextUtils.isEmpty(Build.SERIAL)) "" else Build.SERIAL
// }
// }
// } else {
// device_id = telephonyManager.deviceId
// if (device_id == null) {
// device_id = if (TextUtils.isEmpty(Build.SERIAL)) "" else Build.SERIAL
// }
// }
// if (device_id == null || device_id.isEmpty() || device_id.equals(
// "unknown",
// ignoreCase = true
// )
// ) {
// device_id = if (TextUtils.isEmpty(
// Settings.Secure.getString(
// mContext.contentResolver,
// Settings.Secure.ANDROID_ID
// )
// )
// ) "" else Settings.Secure.getString(
// mContext.contentResolver,
// Settings.Secure.ANDROID_ID
// )
// }
// Log.e("device_id", "-> $device_id")
// // Hemant changes 07-11-2019 start commented and Added 12-12-2019
//// deviceInfo.device_id = (device_id + "#" + com.nivesh.production.util.Utility.getFlavor())
// // Hemant changes 07-11-2019 end commented and Added 12-12-2019
//
//
// // Hemant changes 07-11-2019 start added and commented 12-12-2019
// deviceInfo.device_id_for_UMSId = (device_id)
// // deviceInfo.setDeviceId(device_id);
// // Hemant changes 07-11-2019 end added and commented 12-12-2019
// } catch (e: java.lang.Exception) {
// e.printStackTrace()
// // Hemant changes 07-11-2019 start Added 28-10-2020
// if (device_id == null || device_id.isEmpty() || device_id.equals(
// "unknown",
// ignoreCase = true
// )
// ) {
// device_id = if (TextUtils.isEmpty(
// Settings.Secure.getString(
// mContext.contentResolver,
// Settings.Secure.ANDROID_ID
// )
// )
// ) "" else Settings.Secure.getString(
// mContext.contentResolver,
// Settings.Secure.ANDROID_ID
// )
// }
// Log.e("device_id", "-> $device_id")
//// deviceInfo.setDeviceId(device_id + "#" + com.nivesh.production.util.Utility.getFlavor())
// deviceInfo.device_id_for_UMSId = (device_id)
// // Hemant changes 07-11-2019 end Added 28-10-2020
// }
// return deviceInfo
// }
} }
} }

+ 0
- 21
app/src/main/java/com/nivesh/production/bajajfd/util/Utils_Functions.kt View File

@ -1,21 +0,0 @@
package com.nivesh.production.bajajfd.util
import android.annotation.SuppressLint
import java.text.SimpleDateFormat
import java.util.*
class Utils_Functions {
companion object{
fun getCurrentDateStamp(): String? {
val d = Date()
@SuppressLint("SimpleDateFormat") val simpleDateFormat =
SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
val dateStr = simpleDateFormat.format(d)
val output = d.time / 1000L
val str = java.lang.Long.toString(output)
return d.time.toString()
}
}
}

+ 0
- 0
consumer-rules.pro View File


+ 2
- 0
gradle.properties View File

@ -20,5 +20,7 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the # Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies, # resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library # thereby reducing the size of the R class for that library
org.gradle.parallel=true
android.nonTransitiveRClass=true android.nonTransitiveRClass=true
android.disableAutomaticComponentCreation=true
authToken=jp_95r28qqgll1ie1qf4r64vs6hua authToken=jp_95r28qqgll1ie1qf4r64vs6hua

+ 38
- 0
proguard-rules.pro View File

@ -0,0 +1,38 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-keep class com.example.** { *; }
-keepclassmembers class * {
@android.webkit.JavascriptInterface <methods>;
}
-keepattributes JavascriptInterface
-keepattributes *Annotation*
-dontwarn com.razorpay.**
-keep class com.razorpay.** {*;}
-optimizations !method/inlining/*
-keepclasseswithmembers class * {
public void onPayment*(...);
}

Loading…
Cancel
Save

Powered by TurnKey Linux.