iB86/app/src/main/res/raw/README.md

36 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 音频资源说明
## 目录结构
```
res/raw/
├── battery_low_notification.wav # 电量低提示音
├── default_notification.wav # 默认提示音
├── network_config_notification.wav # 网络配置提示音
└── network_lost_notification.wav # 网络断开提示音
```
## 使用说明
### 1. 应用内嵌音效
将音频文件放在`res/raw/`目录下构建系统会自动将其编译到APK中。
- 文件名应使用小写字母和下划线
- 支持的格式MP3, WAV, OGG等
### 2. 自定义音效
支持从外部存储加载自定义音效文件:
- 路径格式:`/sdcard/your_sound.wav`
- 需要相应的存储权限
### 3. 默认音效映射
每种通知类型都有对应的默认音效:
- NETWORK_LOST → network_lost_notification.wav
- NETWORK_CONFIG → network_config_notification.wav
- BATTERY_LOW → battery_low_notification.wav
- OTHER → default_notification.wav
## 注意事项
1. 音频文件应尽量小以减少APK体积
2. 建议使用WAV格式以获得较好的兼容性
3. 音频文件命名应遵循Android资源命名规范小写字母、数字、下划线