saki4510t / UVCCamera

library and sample to access to UVC web camera on non-rooted Android device
2.96k stars 1.19k forks source link

USBMonitor的问题还是抽时间改下吧 #674

Open annaijinwind opened 1 year ago

annaijinwind commented 1 year ago

mPermissionIntent = PendingIntent.getBroadcast(context, 0, new Intent(ACTION_USB_PERMISSION), PendingIntent.FLAG_IMMUTABLE); 就这行,之前有老哥反应把PendingIntent.FLAG_MUTABLE改为PendingIntent.FLAG_MUTABLE,我试了下确实可以,在ap31以上的机器,如果用原来的写法,会出现第一次启动获取权限失败并且需要反复拔插重启后才能使用的问题,你可以改下试试 https://github.com/jiangdongguo/AndroidUSBCamera/issues/434#issuecomment-1250231199

l376571926 commented 1 year ago

mPermissionIntent = PendingIntent.getBroadcast(context, 0, new Intent(ACTION_USB_PERMISSION), PendingIntent.FLAG_IMMUTABLE); 就这行,之前有老哥反应把PendingIntent.FLAG_MUTABLE改为PendingIntent.FLAG_MUTABLE,我试了下确实可以,在ap31以上的机器,如果用原来的写法,会出现第一次启动获取权限失败并且需要反复拔插重启后才能使用的问题,你可以改下试试 https://github.com/jiangdongguo/AndroidUSBCamera/issues/434#issuecomment-1250231199

这人是日本人,你说中文他怕是看不懂