pref: 修改自动备份文件
This commit is contained in:
parent
c634f8550b
commit
b6c4299398
|
|
@ -96,7 +96,7 @@ dependencies {
|
||||||
//AndroidX
|
//AndroidX
|
||||||
implementation "androidx.appcompat:appcompat:1.3.1"
|
implementation "androidx.appcompat:appcompat:1.3.1"
|
||||||
implementation "androidx.core:core-ktx:1.6.0"
|
implementation "androidx.core:core-ktx:1.6.0"
|
||||||
implementation "androidx.annotation:annotation:1.2.0"
|
implementation "androidx.annotation:annotation:1.3.0"
|
||||||
implementation "androidx.constraintlayout:constraintlayout:2.1.1"
|
implementation "androidx.constraintlayout:constraintlayout:2.1.1"
|
||||||
implementation "androidx.preference:preference-ktx:1.1.1"
|
implementation "androidx.preference:preference-ktx:1.1.1"
|
||||||
implementation "androidx.gridlayout:gridlayout:1.0.0"
|
implementation "androidx.gridlayout:gridlayout:1.0.0"
|
||||||
|
|
@ -138,7 +138,6 @@ dependencies {
|
||||||
implementation "com.zhihu.android:matisse:0.5.3-beta3"
|
implementation "com.zhihu.android:matisse:0.5.3-beta3"
|
||||||
implementation "com.yanzhenjie:permission:2.0.3"
|
implementation "com.yanzhenjie:permission:2.0.3"
|
||||||
implementation "com.gyf.immersionbar:immersionbar:3.0.0"
|
implementation "com.gyf.immersionbar:immersionbar:3.0.0"
|
||||||
api "com.flurry.android:analytics:13.0.0"
|
|
||||||
|
|
||||||
implementation "com.github.yalantis:ucrop:2.2.7"
|
implementation "com.github.yalantis:ucrop:2.2.7"
|
||||||
|
|
||||||
|
|
@ -150,4 +149,8 @@ dependencies {
|
||||||
implementation ("com.alibaba.android:vlayout:1.2.31@aar") {
|
implementation ("com.alibaba.android:vlayout:1.2.31@aar") {
|
||||||
transitive = true
|
transitive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def appCenterSdkVersion = '4.3.1'
|
||||||
|
implementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
|
||||||
|
implementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ import android.widget.TextView
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import com.flurry.android.FlurryAgent
|
|
||||||
import com.huanchengfly.tieba.post.activities.BaseActivity
|
import com.huanchengfly.tieba.post.activities.BaseActivity
|
||||||
import com.huanchengfly.tieba.post.api.interfaces.CommonCallback
|
import com.huanchengfly.tieba.post.api.interfaces.CommonCallback
|
||||||
import com.huanchengfly.tieba.post.components.dialogs.LoadingDialog
|
import com.huanchengfly.tieba.post.components.dialogs.LoadingDialog
|
||||||
|
|
@ -76,9 +75,6 @@ class BaseApplication : Application(), IApp {
|
||||||
ThemeUtils.init(ThemeDelegate)
|
ThemeUtils.init(ThemeDelegate)
|
||||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
|
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
|
||||||
LitePal.initialize(this)
|
LitePal.initialize(this)
|
||||||
FlurryAgent.Builder()
|
|
||||||
.withCaptureUncaughtExceptions(true)
|
|
||||||
.build(this, "ZMRX6W76WNF95ZHT857X")
|
|
||||||
registerActivityLifecycleCallbacks(object : ActivityLifecycleCallbacks {
|
registerActivityLifecycleCallbacks(object : ActivityLifecycleCallbacks {
|
||||||
private var clipBoardHash: Int = 0
|
private var clipBoardHash: Int = 0
|
||||||
private fun updateClipBoardHashCode() {
|
private fun updateClipBoardHashCode() {
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,9 @@ import com.huanchengfly.tieba.post.models.MyInfoBean
|
||||||
import com.huanchengfly.tieba.post.services.NotifyJobService
|
import com.huanchengfly.tieba.post.services.NotifyJobService
|
||||||
import com.huanchengfly.tieba.post.utils.*
|
import com.huanchengfly.tieba.post.utils.*
|
||||||
import com.huanchengfly.tieba.post.widgets.MyViewPager
|
import com.huanchengfly.tieba.post.widgets.MyViewPager
|
||||||
|
import com.microsoft.appcenter.AppCenter
|
||||||
|
import com.microsoft.appcenter.analytics.Analytics
|
||||||
|
import com.microsoft.appcenter.crashes.Crashes
|
||||||
|
|
||||||
open class MainActivity : BaseActivity(), BottomNavigationView.OnNavigationItemSelectedListener, OnNavigationItemReselectedListener {
|
open class MainActivity : BaseActivity(), BottomNavigationView.OnNavigationItemSelectedListener, OnNavigationItemReselectedListener {
|
||||||
var mAdapter: ViewPagerAdapter = ViewPagerAdapter(supportFragmentManager)
|
var mAdapter: ViewPagerAdapter = ViewPagerAdapter(supportFragmentManager)
|
||||||
|
|
@ -151,12 +154,23 @@ open class MainActivity : BaseActivity(), BottomNavigationView.OnNavigationItemS
|
||||||
findView()
|
findView()
|
||||||
initView()
|
initView()
|
||||||
initListener()
|
initListener()
|
||||||
if (!SharedPreferencesUtil.get(SharedPreferencesUtil.SP_APP_DATA).getBoolean("notice_dialog", false)) {
|
AppCenter.start(
|
||||||
|
getApplication(), "b56debcc-264b-4368-a2cd-8c20213f6433",
|
||||||
|
Analytics::class.java, Crashes::class.java
|
||||||
|
)
|
||||||
|
if (!SharedPreferencesUtil.get(SharedPreferencesUtil.SP_APP_DATA)
|
||||||
|
.getBoolean("notice_dialog", false)
|
||||||
|
) {
|
||||||
showDialog(DialogUtil.build(this)
|
showDialog(DialogUtil.build(this)
|
||||||
.setTitle(R.string.title_dialog_notice)
|
.setTitle(R.string.title_dialog_notice)
|
||||||
.setMessage(R.string.message_dialog_notice)
|
.setMessage(R.string.message_dialog_notice)
|
||||||
.setPositiveButton(R.string.button_sure_default) { _, _ ->
|
.setPositiveButton(R.string.button_sure_default) { _, _ ->
|
||||||
SharedPreferencesUtil.put(this, SharedPreferencesUtil.SP_APP_DATA, "notice_dialog", true)
|
SharedPreferencesUtil.put(
|
||||||
|
this,
|
||||||
|
SharedPreferencesUtil.SP_APP_DATA,
|
||||||
|
"notice_dialog",
|
||||||
|
true
|
||||||
|
)
|
||||||
}
|
}
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.create())
|
.create())
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,23 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<full-backup-content>
|
<full-backup-content xmlns:tools="http://schemas.android.com/tools">
|
||||||
<exclude
|
<exclude
|
||||||
domain="sharedpref"
|
domain="sharedpref"
|
||||||
path="crash.xml" />
|
path="crash.xml" />
|
||||||
|
<exclude
|
||||||
|
domain="sharedpref"
|
||||||
|
path="AppCenter.xml" />
|
||||||
|
<exclude
|
||||||
|
domain="database"
|
||||||
|
path="com.microsoft.appcenter.persistence" />
|
||||||
|
<exclude
|
||||||
|
domain="database"
|
||||||
|
path="com.microsoft.appcenter.persistence-journal" />
|
||||||
|
<exclude
|
||||||
|
domain="file"
|
||||||
|
path="error"
|
||||||
|
tools:ignore="FullBackupContent" />
|
||||||
|
<exclude
|
||||||
|
domain="file"
|
||||||
|
path="appcenter"
|
||||||
|
tools:ignore="FullBackupContent" />
|
||||||
</full-backup-content>
|
</full-backup-content>
|
||||||
Loading…
Reference in New Issue