当前位置: 首页 > news >正文

做商城网站那个好wordpress图片缝隙

做商城网站那个好,wordpress图片缝隙,工信部icp备案是什么意思,重庆 网站备案目录 一、前提 1. unity打包android后#xff0c;链接USB摄像头#xff0c;需要USB权限。 二、流程 1.Unity导出android工程#xff0c;Player配置如图#xff1a; 2.导出android工程 3.在android工程中找到AndroidManifest.xml加入usb权限相关 ?xml version链接USB摄像头需要USB权限。 二、流程 1.Unity导出android工程Player配置如图 2.导出android工程 3.在android工程中找到AndroidManifest.xml加入usb权限相关 ?xml version1.0 encodingutf-8? manifest xmlns:androidhttp://schemas.android.com/apk/res/androidxmlns:toolshttp://schemas.android.com/toolsapplication android:extractNativeLibstrueactivity android:namecom.unity3d.player.UnityPlayerActivity android:themestyle/UnityThemeSelector android:screenOrientationfullSensor android:launchModesingleTask android:configChangesmcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density android:resizeableActivityfalse android:hardwareAcceleratedfalseintent-filteraction android:nameandroid.intent.action.MAIN /category android:nameandroid.intent.category.LAUNCHER ///此处action android:nameandroid.hardware.usb.action.USB_DEVICE_ATTACHED //intent-filtermeta-data android:nameunityplayer.UnityActivity android:valuetrue /meta-data android:nameandroid.notch_support android:valuetrue //activitymeta-data android:nameunity.splash-mode android:value0 /meta-data android:nameunity.splash-enable android:valueTrue /meta-data android:nameunity.launch-fullscreen android:valueTrue /meta-data android:nameunity.allow-resizable-window android:valueFalse /meta-data android:namenotch.config android:valueportrait|landscape //applicationuses-feature android:glEsVersion0x00020000 /uses-permission android:nameandroid.permission.INTERNET /uses-permission android:nameandroid.permission.CAMERA ///此处uses-feature android:nameandroid.hardware.usb.host ///此处uses-permission android:nameandroid.permission.USB_PERMISSION /uses-feature android:nameandroid.hardware.camera android:requiredfalse /uses-feature android:nameandroid.hardware.camera.autofocus android:requiredfalse /uses-feature android:nameandroid.hardware.camera.front android:requiredfalse /uses-feature android:nameandroid.hardware.touchscreen android:requiredfalse /uses-feature android:nameandroid.hardware.touchscreen.multitouch android:requiredfalse /uses-feature android:nameandroid.hardware.touchscreen.multitouch.distinct android:requiredfalse / /manifest 备注主要三行如下 action android:nameandroid.hardware.usb.action.USB_DEVICE_ATTACHED / uses-feature android:nameandroid.hardware.usb.host / uses-permission android:nameandroid.permission.USB_PERMISSION / 4.找到UnityPlayerActivity.java在unity启动onResume方法里面新增打开USB权限设置 private static final String TAG unity;private static final String ACTION_USB_PERMISSION com.android.usb.USB_PERMISSION;private UsbManager usbManager;private UsbDeviceConnection connection;private PendingIntent permissionIntent;private boolean permissionGranted false;private BroadcastReceiver usbReceiver new BroadcastReceiver() {Overridepublic void onReceive(Context context, Intent intent) {String action intent.getAction();Log.d(TAG, USB设备连接有变化,链接到:action);if (ACTION_USB_PERMISSION.equals(action)) {synchronized (this) {unregisterReceiver(usbReceiver);UsbDevice usbDevice intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);if (intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)) {if (usbDevice ! null) {// 用户已授权访问USB设备connectUsbDevice(usbDevice);}} else {Log.d(TAG, 用户未授权访问USB设备); // requestPermission(usbDevice);}}}}};// Resume UnityOverride protected void onResume(){super.onResume();if (MultiWindowSupport.getAllowResizableWindow(this))return;mUnityPlayer.resume();openUsbDevice();}private void openUsbDevice(){// //获取注册usbusbManager (UsbManager) getSystemService(Context.USB_SERVICE);IntentFilter filter new IntentFilter(ACTION_USB_PERMISSION);// 获取已连接的USB设备列表HashMapString, UsbDevice deviceList usbManager.getDeviceList();IteratorUsbDevice deviceIterator deviceList.values().iterator();if (deviceIterator.hasNext()) {UsbDevice device deviceIterator.next();permissionIntent PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);filter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED);filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED);Log.e(TAG, getDeviceList: device.getVendorId()device.getProductId());///注册广播registerReceiver(usbReceiver, filter);usbManager.requestPermission(device, permissionIntent);} else {Log.d(TAG, 没有找到已连接的USB设备);Toast.makeText(this, 没有找到已连接的USB设备, Toast.LENGTH_SHORT).show();}}private void connectUsbDevice(UsbDevice usbDevice) {if (usbDevice null) {return;}connection usbManager.openDevice(usbDevice);if (connection ! null) {// 在此处执行USB通信操作Log.d(TAG, USB设备已连接);Toast.makeText(this, USB设备已连接, Toast.LENGTH_SHORT).show();} else {Log.d(TAG, 无法打开USB设备连接);Toast.makeText(this, 无法打开USB设备连接, Toast.LENGTH_SHORT).show();}} 注意应用需要打开摄像机权限
http://www.hkea.cn/news/14430252/

相关文章:

  • 如何做网站内容管理有做网站动态效果软件
  • 申请域名之后如何做网站小企业网站建设制作平台
  • 英铭网站建设襄阳seo费用
  • 站酷logo设计商城网站建设策划方案
  • l临沂互助系统网站开发奎文营销型网站建设
  • 济南网站优化厂家支付行业的网站怎么做
  • 海南高端网站建设网站建设主机耗电量
  • 外贸网站建设的败笔怎样做个做外贸的网站
  • 设计网站公司搜索y湖南岚鸿知名南京网站建设知识
  • 请多记几个本站域名防止失联南宁网约车租赁公司
  • 厦门建设工程信息造价网站邢台网站改版开发
  • 网站推广服务好公司排名网站词库怎么做
  • 如何为企业做网站成都网站建设冠辰哪家强
  • 广州网站建设建设网站设计方案和技巧
  • 河南生产型企业网站建设肇东网页设计
  • 百石网怎么做网站做网站学好哪些软件
  • 韩国食品网站设计欣赏wordpress动静分离
  • 单页设计网站app网站平台建设方案
  • 网站怎么百度收录天津哪里能做网站
  • 邢台营销型网站建设济南市建设行政主管部门网站
  • jsp网站 值班功能惠州市seo上词
  • 廊坊网站关键词优化网站ui案例
  • 网站系统建设系广告经营者青岛城乡建设局网站首页
  • 网站建设人员潍坊做网站潍坊做网站
  • 济南网站建设推荐q479185700上快甘肃高端建设网站
  • 前端网站开发心得体会seo工程师招聘
  • 网站建设和梅州建站
  • 阳泉哪里做网站网站和公众号的区别是什么
  • 免费的ppt网站泰州企业建站系统
  • 网站建站网站626969自己做一个购物网站