小米上架遇到的隐私协议问题

1. 找到【APP权限设置】,点击详情,一一对照,删除没用的,新增小米商家必须要有的内容

 2. APP 存在未经用户同意读取“OAID”的行为

uniapp官方文档对应内容处

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
小米的miio协议是基于UDP协议的,以下是一个基于C#的miio协议示例代码: ```csharp using System; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; namespace miio { class Program { static UdpClient udpClient; static IPEndPoint endPoint; static byte[] receiveBuffer; static void Main(string[] args) { udpClient = new UdpClient(); udpClient.Client.Bind(new IPEndPoint(IPAddress.Any, 54321)); // 绑定端口 endPoint = new IPEndPoint(IPAddress.Parse("192.168.1.100"), 54321); // miio设备的IP和端口 receiveBuffer = new byte[1024]; // 发送指令 Send("{\"id\":1,\"method\":\"get_prop\",\"params\":[\"power\",\"bright\"]}"); // 接收响应 while (true) { var result = udpClient.BeginReceive(null, null); var success = result.AsyncWaitHandle.WaitOne(TimeSpan.FromSeconds(1)); if (!success) { Console.WriteLine("Timeout"); break; } var remoteEP = new IPEndPoint(IPAddress.Any, 0); var receiveBytes = udpClient.EndReceive(result, ref remoteEP); var receiveText = Encoding.ASCII.GetString(receiveBytes); Console.WriteLine($"Receive: {receiveText}"); } Console.ReadKey(); } static void Send(string command) { var sendBytes = Encoding.ASCII.GetBytes(command); udpClient.Send(sendBytes, sendBytes.Length, endPoint); Console.WriteLine($"Send: {command}"); } } } ``` 这个示例程序可以向miio设备发送指令,然后从设备接收响应。你需要将`endPoint`设为你自己设备的IP和端口,并根据你的设备类型修改发送的指令。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值