chore: 添加 Firebase Crashlytics 配置并调整项目设置- 在项目中添加 Firebase Crashlytics 配置文件

-移除 misc.xml 中的 XML声明
- 在 StartJobService 中添加 onEvent 函数注释
This commit is contained in:
yjj38 2025-07-14 14:34:49 +08:00
parent 714b43f608
commit 321e19aa16
3 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AppInsightsSettings">
<option name="tabSettings">
<map>
<entry key="Firebase Crashlytics">
<value>
<InsightsFilterSettings>
<option name="connection">
<ConnectionSetting>
<option name="appId" value="PLACEHOLDER" />
<option name="mobileSdkAppId" value="" />
<option name="projectId" value="" />
<option name="projectNumber" value="" />
</ConnectionSetting>
</option>
<option name="signal" value="SIGNAL_UNSPECIFIED" />
<option name="timeIntervalDays" value="THIRTY_DAYS" />
<option name="visibilityType" value="ALL" />
</InsightsFilterSettings>
</value>
</entry>
</map>
</option>
</component>
</project>

View File

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration"> <component name="FrameworkDetectionExcludesConfiguration">

View File

@ -130,6 +130,12 @@ class StartJobService : JobIntentService() {
private var running = false private var running = false
/**
* onEvent 是一个函数接收 Context 参数
* 使用 enqueueWork 方法启动一个 StartJobService 类型的后台任务
* jobId 是任务的唯一标识符
* 创建了一个 Intent用于指定要启动的服务为 StartJobService
*/
fun onEvent(context: Context) { fun onEvent(context: Context) {
enqueueWork( enqueueWork(
context, context,