Commit 7b35ced3 authored by wanglei's avatar wanglei

Merge remote-tracking branch 'origin/master'

parents da667537 93ded986
......@@ -242,7 +242,8 @@
android:launchMode="singleTop"
android:screenOrientation="portrait"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<activity android:name=".activity.junkclean.ScanJunk2Activity"
android:screenOrientation="portrait"/>
<meta-data
android:name="com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION"
android:value="true" />
......
......@@ -42,6 +42,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
override fun setListener() {
binding.flScan.setOnClickListener {
val jumpJunkFirstAd = AppPreferences.getInstance().getString("isjunkPlayAd", "0").toInt()
if(jumpJunkFirstAd==1){
startActivity(Intent(requireContext(), ScanJunk2Activity::class.java))
}else{
......@@ -51,11 +52,23 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
// sendNotification(requireContext(), ConstObject.ID_JUNK_CLEAN_PUSH)
}
binding.tvClean.setOnClickListener {
val jumpJunkFirstAd = AppPreferences.getInstance().getString("isjunkPlayAd", "0").toInt()
if(jumpJunkFirstAd==1){
startActivity(Intent(requireContext(), ScanJunk2Activity::class.java))
}else{
startActivity(Intent(requireContext(), ScanJunkActivity::class.java))
}
}
binding.cardCleanJunk.setOnClickListener {
val jumpJunkFirstAd = AppPreferences.getInstance().getString("isjunkPlayAd", "0").toInt()
if(jumpJunkFirstAd==1){
startActivity(Intent(requireContext(), ScanJunk2Activity::class.java))
}else{
startActivity(Intent(requireContext(), ScanJunkActivity::class.java))
}
}
binding.cardWhatsApp.setOnClickListener {
startActivity(Intent(requireContext(), WhatsAppCleanerAnimationActivity::class.java))
}
......
......@@ -17,6 +17,7 @@ import org.json.JSONObject
*/
object InstallHelps {
private val TAG = "InstallHelps"
@RequiresApi(Build.VERSION_CODES.O)
fun init() {
//InstallReferrer not empty
......@@ -33,6 +34,7 @@ object InstallHelps {
//InstallReferrer empty
val referrerClient = InstallReferrerClient.newBuilder(BaseApplication.context).build()
referrerClient.startConnection(object : InstallReferrerStateListener {
@RequiresApi(Build.VERSION_CODES.O)
override fun onInstallReferrerSetupFinished(responseCode: Int) {
LogEx.logDebug(TAG, "responseCode=$responseCode")
try {
......@@ -89,9 +91,9 @@ object InstallHelps {
AdmobMaxHelper.initAdmobMaxAd()
}
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE){
val notificationSwitch=AppPreferences.getInstance().getString("isjunkPlayAd", "0").toInt()
if(notificationSwitch==1){
val notificationTimeInterval=AppPreferences.getInstance().getString("notificationTimeInterval", "0").toInt()
val notificationSwitch=AppPreferences.getInstance().getString("notificationSwitch", "0").toInt()
if(notificationSwitch==0){
val notificationTimeInterval=AppPreferences.getInstance().getString("notificationTimeInterval", "60").toInt()
NotificationTimerManager.getInstance()
.startTimer(
( notificationTimeInterval * 1000).toLong(),
......
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