代码拉取完成,页面将自动刷新
小米设备互联NFC助手
本应用仅在Xiaomi HyperOS下测试通过,仅支持安卓10及以上
音频接力
内容流转
一碰妙享
工具
为了能实现与其他App之间的相互调用,简化二次开发的难度,本应用提供了快捷接口Intent:
Action: tool.xfy9326.milink.nfc.action.screen_mirror
Extra: 注:不填写某个参数则使用默认值
键 | 值类型 | 默认值 | 解释 |
---|---|---|---|
device |
int | 1 |
模拟的设备类型 |
action |
int | 1 |
触发方式 |
btMac |
String | 空字符串 | 蓝牙MAC地址 |
lyra |
boolean | true |
是否启用Lyra |
模拟设备类型的可用值:
值 | 解释 |
---|---|
0 |
TV |
1 |
PC |
2 |
CAR |
3 |
PAD |
触发方式的可用值
值 | 解释 |
---|---|
0 |
虚拟NFC标签 |
1 |
互联通信服务 |
这个Intent会快速启动一个透明的一次性Activity用于模拟一碰秒享的操作
在App中使用Intent:
val intent = Intent("tool.xfy9326.milink.nfc.action.screen_mirror").apply {
putExtra("device", 1)
putExtra("action", 1)
putExtra("btMac", "00:00:00:00:00:00")
putExtra("lyra", true)
}
startActivity(intent)
使用ADB或者Shell可以用以下命令触发:
am start -a tool.xfy9326.milink.nfc.action.screen_mirror --es btMac "00:00:00:00:00:00"
如果完整填入所有需要的参数则可以是:
am start -a tool.xfy9326.milink.nfc.action.screen_mirror --ei device 1 --ei action 1 --es btMac "00:00:00:00:00:00" --ez lyra true
注:对于beta或者debug版本,Action会有一些区别。
NFC写入界面有写入字节大小的提示,请测试后根据自己的需求选择不同大小的NTAG。
目前至少使用NTAG213可以支持部分功能,如果希望通用建议使用NTAG215。
ipconfig /all
,找到描述为Bluetooth Device
的项目的MAC地址即为真实蓝牙MAC地址本应用不保证小米一碰妙享NFC标签触发稳定性,如遇到任何问题可以尝试重启设备,重启小米电脑助手或升级互联互通等相关服务。
所有NFC标签的解析建立在对Xiaomi HyperOS中提取出的APP上,并在小米电脑管家4.2.0.1036
上通过测试。
名称 | 包名 | 版本 |
---|---|---|
小米互联通信服务 | com.xiaomi.mi_connect_service |
3.1.874.10 |
互联互通服务 | com.milink.service |
15.0.6.4.d4e3948.3002415 |
跨屏协同服务 | com.xiaomi.mirror |
15.01.11.d |
文件管理 | com.android.fileexplorer |
5.0.3.2 |
相册 | com.miui.gallery |
3.7.1.2 |
你可以在Issue中提出问题,或者在Discussion中讨论
你也可以加入QQ群以获得更多信息
群号:879055158
MIT License
Copyright (c) 2024 XFY9326
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。