初始提交:浩瑞(HaoRui)头条自动化工程
- app/:Kotlin 全部源码、AndroidManifest 与资源 - docs/:技术文档、UI 原型、回归清单 - img/:文档引用的对照规格截图 - scripts/:环境加载与回归统计脚本 - 构建配置:Gradle 入口脚本与属性 - 新增 .gitignore:排除工具链、构建缓存、临时产物与本机配置 Co-Authored-By: Claude Code <[email protected]>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
浩瑞无障碍服务配置
|
||||
对照原产品 res/xml/accessibility_service_config.xml
|
||||
-->
|
||||
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:accessibilityEventTypes="typeWindowStateChanged|typeWindowContentChanged|typeViewClicked"
|
||||
android:accessibilityFeedbackType="feedbackGeneric"
|
||||
android:accessibilityFlags="flagReportViewIds|flagIncludeNotImportantViews|flagRetrieveInteractiveWindows"
|
||||
android:canPerformGestures="true"
|
||||
android:canRetrieveWindowContent="true"
|
||||
android:canTakeScreenshot="true"
|
||||
android:description="@string/a11y_description"
|
||||
android:notificationTimeout="100"
|
||||
android:settingsActivity="com.haorui.app.MainActivity" />
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
浩瑞 · FileProvider 路径配置
|
||||
|
||||
用途:把下载的视频文件(file://)转成 content:// URI,
|
||||
供 ACTION_SEND 分享给头条发布器。
|
||||
|
||||
⚠️ Android 7+ 禁止跨应用传递 file:// URI(FileUriExposedException),
|
||||
必须走 FileProvider。对照原产品 ToutiaoAccessibilityService.p2():
|
||||
type.putExtra("android.intent.extra.STREAM", uri)
|
||||
其 mediaUri 为 content:// 形态。
|
||||
|
||||
路径对应 VideoDownloader.videoDir:
|
||||
context.getExternalFilesDir("videos") + "/videos/"
|
||||
= /storage/emulated/0/Android/data/com.haorui.app/files/videos/videos/
|
||||
-->
|
||||
<paths>
|
||||
<!-- 对应 context.getExternalFilesDir("videos"),其下含 videos/ 子目录 -->
|
||||
<external-files-path
|
||||
name="videos"
|
||||
path="videos/" />
|
||||
|
||||
<!-- 兜底:内部 files 目录(getExternalFilesDir 返回 null 时的回落位置) -->
|
||||
<files-path
|
||||
name="internal_videos"
|
||||
path="videos/" />
|
||||
|
||||
<!-- 日志导出(LogExporter.generateExportFile → cacheDir/export/) -->
|
||||
<cache-path
|
||||
name="export"
|
||||
path="export/" />
|
||||
</paths>
|
||||
Reference in New Issue
Block a user