diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 00000000..70a7013e
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,13 @@
+## 未发布
+
+### 新增
+
+- 基于 Android MVVM 架构重构项目
+- 新增「发生故障」标识,方便判断无障碍是否发生故障
+- 新增「布局检查」功能
+- 新增「自定义配置」功能 [#188](https://github.com/GuoXiCheng/SKIP/issues/188) [#237](https://github.com/GuoXiCheng/SKIP/issues/237)
+- 新的可配置项:`activityName`、`click`
+- 新增「后台隐藏」选项 [#196](https://github.com/GuoXiCheng/SKIP/issues/196)
+- 应用保活新增常驻通知栏功能
+- 新增「严格模式」启用开关
+- 页面右上角新增「功能介绍」入口
diff --git a/README.md b/README.md
index 3967fa97..6841efb8 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ SKIP 是一款免费开源的安卓应用,旨在利用 Android 无障碍服务
## 主界面预览
-
+
## 使用说明
@@ -26,4 +26,4 @@ SKIP 是一款免费开源的安卓应用,旨在利用 Android 无障碍服务
## 许可证
-[GNU AFFERO GENERAL PUBLIC LICENSE Version 3](https://github.com/GuoXiCheng/SKIP/blob/main/LICENSE)
+[AGPL-3.0 license](https://github.com/GuoXiCheng/SKIP/blob/main/LICENSE)
diff --git a/app/src/main/java/com/android/skip/MyApp.kt b/app/src/main/java/com/android/skip/MyApp.kt
index 60566a39..6acbe614 100644
--- a/app/src/main/java/com/android/skip/MyApp.kt
+++ b/app/src/main/java/com/android/skip/MyApp.kt
@@ -26,7 +26,7 @@ class MyApp : Application(), Configuration.Provider {
Utils.init(this)
LogUtils.getConfig()
- .setLogSwitch(true) // 是否输出日志开关
+ .setLogSwitch(false) // 是否输出日志开关
.setConsoleSwitch(true) // 是否在控制台输出日志开关
.setGlobalTag("SKIP_APP") // 全局标签
.setLog2FileSwitch(true) // 是否写入日志文件开关
diff --git a/app/src/main/java/com/android/skip/ui/main/MainActivity.kt b/app/src/main/java/com/android/skip/ui/main/MainActivity.kt
index 8771cac3..a5c39bea 100644
--- a/app/src/main/java/com/android/skip/ui/main/MainActivity.kt
+++ b/app/src/main/java/com/android/skip/ui/main/MainActivity.kt
@@ -31,10 +31,14 @@ import com.android.skip.ui.components.RowContent
import com.android.skip.ui.inspect.InspectActivity
import com.android.skip.ui.main.start.StartAccessibilityViewModel
import com.android.skip.ui.main.start.StartButton
+import com.android.skip.ui.main.tutorial.TutorialDialog
+import com.android.skip.ui.main.tutorial.TutorialViewModel
import com.android.skip.ui.settings.SettingsActivity
import com.android.skip.ui.settings.theme.SwitchThemeViewModel
import com.android.skip.ui.theme.AppTheme
+import com.android.skip.ui.webview.WebViewActivity
import com.android.skip.ui.whitelist.WhiteListActivity
+import com.android.skip.util.DataStoreUtils
import dagger.hilt.android.AndroidEntryPoint
@AndroidEntryPoint
@@ -47,6 +51,8 @@ class MainActivity : AppCompatActivity() {
private val apkVersionViewModel by viewModels()
+ private val tutorialViewModel by viewModels()
+
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
@@ -60,7 +66,15 @@ class MainActivity : AppCompatActivity() {
) {
AppTitle()
StartButton(startAccessibilityViewModel = startAccessibilityViewModel) {
- startActivity(Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS))
+ if (DataStoreUtils.getSyncData(
+ getString(R.string.store_show_tutorial),
+ true
+ )
+ ) {
+ tutorialViewModel.changeDialogState(true)
+ } else {
+ startActivity(Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS))
+ }
}
KeepAliveButton {
startActivity(Intent(MyApp.context, AliveActivity::class.java))
@@ -78,6 +92,17 @@ class MainActivity : AppCompatActivity() {
startActivity(Intent(MyApp.context, AboutActivity::class.java))
}
}
+ TutorialDialog(tutorialViewModel, {
+ tutorialViewModel.changeDialogState(false)
+ DataStoreUtils.putSyncData(getString(R.string.store_show_tutorial), false)
+ startActivity(Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS))
+ }, {
+ tutorialViewModel.changeDialogState(false)
+ val intent = Intent(MyApp.context, WebViewActivity::class.java).apply {
+ putExtra("url", R.string.tutorial_url)
+ }
+ startActivity(intent)
+ })
}
}
diff --git a/app/src/main/java/com/android/skip/ui/main/tutorial/TutorialDialog.kt b/app/src/main/java/com/android/skip/ui/main/tutorial/TutorialDialog.kt
new file mode 100644
index 00000000..85f48871
--- /dev/null
+++ b/app/src/main/java/com/android/skip/ui/main/tutorial/TutorialDialog.kt
@@ -0,0 +1,46 @@
+package com.android.skip.ui.main.tutorial
+
+import androidx.compose.material3.AlertDialog
+import androidx.compose.material3.Button
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.material3.TextButton
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.livedata.observeAsState
+import androidx.compose.ui.res.stringResource
+import com.android.skip.R
+
+@Composable
+fun TutorialDialog(
+ tutorialViewModel: TutorialViewModel,
+ onDismiss: () -> Unit,
+ onConfirm: () -> Unit
+) {
+ val isShowDialog = tutorialViewModel.isShowDialog.observeAsState()
+ if (isShowDialog.value == true) {
+ AlertDialog(
+ containerColor = MaterialTheme.colorScheme.background,
+ title = {
+ Text(text = stringResource(id = R.string.dialog_get_started))
+ },
+ text = {
+ Text(text = stringResource(id = R.string.dialog_get_started_content))
+ },
+ onDismissRequest = {},
+ confirmButton = {
+ Button(
+ onClick = onConfirm
+ ) {
+ Text(stringResource(id = R.string.dialog_go_at_once))
+ }
+ },
+ dismissButton = {
+ TextButton(
+ onClick = onDismiss
+ ) {
+ Text(stringResource(id = R.string.dialog_no_more_reminders))
+ }
+ }
+ )
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/android/skip/ui/main/tutorial/TutorialViewModel.kt b/app/src/main/java/com/android/skip/ui/main/tutorial/TutorialViewModel.kt
new file mode 100644
index 00000000..d6b7154f
--- /dev/null
+++ b/app/src/main/java/com/android/skip/ui/main/tutorial/TutorialViewModel.kt
@@ -0,0 +1,17 @@
+package com.android.skip.ui.main.tutorial
+
+import androidx.lifecycle.LiveData
+import androidx.lifecycle.MutableLiveData
+import androidx.lifecycle.ViewModel
+import dagger.hilt.android.lifecycle.HiltViewModel
+import javax.inject.Inject
+
+@HiltViewModel
+class TutorialViewModel @Inject constructor() : ViewModel() {
+ private val _isShowDialog = MutableLiveData()
+ val isShowDialog: LiveData = _isShowDialog
+
+ fun changeDialogState(showDialog: Boolean) {
+ _isShowDialog.postValue(showDialog)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 011cad88..38dcc3ec 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -2,6 +2,7 @@
SKIP
SKIP 可以帮您自动跳过应用开屏广告
MySyncWorker
+ https://skip.guoxicheng.top/guide/intro/getting-started
布局检查
是否启用布局检查
@@ -65,7 +66,6 @@
https://skip.guoxicheng.top/guide/intro/what-is-skip
应用版本号
配置版本号
- 检查中…
未检测到有效的配置
功能介绍
https://skip.guoxicheng.top/guide/about/intro
@@ -95,6 +95,10 @@
新版本已发布
更新应用: v%1$s 至 v%2$s
下载中: %1$s%%
+ 提示
+ 是否需要前往查看「开始使用」教程
+ 立即前往
+ 不再提醒
CUSTOM_CONFIG
https://skip.guoxicheng.top/skip_config_v3.yaml
@@ -105,9 +109,11 @@
AUTO_UPDATE
CURRENT_THEME
NOT_UPDATE
+ SHOW_TUTORIAL
无障碍服务运行中
布局检查服务运行中
加载中…
+ 检查中…
\ No newline at end of file
diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts
index 3b9b956a..56f7bc35 100644
--- a/docs/.vitepress/config.mts
+++ b/docs/.vitepress/config.mts
@@ -33,6 +33,10 @@ export default defineConfig(
text: "下载 APP",
link: "/guide/intro/download-app",
},
+ {
+ text: "开始使用",
+ link: "/guide/intro/getting-started",
+ },
],
},
{
diff --git a/docs/guide/intro/getting-started.md b/docs/guide/intro/getting-started.md
new file mode 100644
index 00000000..52905a65
--- /dev/null
+++ b/docs/guide/intro/getting-started.md
@@ -0,0 +1,9 @@
+# 开始使用
+
+## 1. 点击屏幕中央按钮
+
+![](/click-button-on-the-screen-dark.png)
+
+## 2. 点击「使用“SKIP”」
+
+![](/use-accessibility-dark.png)
diff --git a/docs/guide/intro/what-is-skip.md b/docs/guide/intro/what-is-skip.md
index 00da8cff..a345670b 100644
--- a/docs/guide/intro/what-is-skip.md
+++ b/docs/guide/intro/what-is-skip.md
@@ -6,4 +6,4 @@ SKIP 是一款免费开源的安卓应用,旨在利用 Android 无障碍服务
## 主界面预览
-![主界面预览](/main-interface-dark.png)
+![主界面预览](/images/main-interface-light.png)
diff --git a/docs/public/images/main-interface-light.png b/docs/public/images/main-interface-light.png
new file mode 100644
index 00000000..99439cf7
Binary files /dev/null and b/docs/public/images/main-interface-light.png differ