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

大网站建设浏览器有些网页打不开是什么原因

大网站建设,浏览器有些网页打不开是什么原因,4399老版网页,网易企业邮箱登录入口手机网页版目录 一、前提 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.laogonggong.com/news/110998.html

相关文章:

  • 那个做网站好网站推广的主要方法
  • 南川区 网站集约化建设方案百度网址安全检测
  • 宝安网站推广wordpress 短代码 if is single
  • 推荐几个手机能看的网站惠州网站模板建站
  • 三合一网站介绍房产网上查询
  • 网站建设的价滁州市建设工程管理处网站
  • wordpress精美网站在pc端预览手机网站
  • 建立一个公司自己的网站30岁转行做网站设计
  • 宁德东侨建设局网站苏州网站建设的公司
  • 徐州建站世界各国足球联赛排名
  • 华西医院网站开发旗舰店的网站怎么做
  • 制作网站品牌公司哪家好上海建站价格
  • 怎么做网站流量赚钱吗网页设计实训报告心得
  • wordpress 建站教程 下载福建省住房城乡和城乡建设厅网站
  • 精品网站源码资源程序下载docker wordpress安装
  • 农机网站建设目标wordpress必备文件组合
  • 企业网站备案材料中原彼得堡航空学院网站的建设
  • 宝钢建设工程有限公司网站个人公众号 可以用wordpress
  • 网站做电商销售需要注册吗wordpress function require
  • 网站托管公司室内装修设计软件用哪个好
  • 做馋嘴小栈官方网站做特卖网站
  • 特效炫酷的网站舞蹈培训网站模板
  • 网站视觉优化的意义想学网站建设选计算机应用技术还是计算机网络技术哪个专业啊
  • 无锡做网站选优易信公司文化墙创意设计
  • 把自己做的网站上传到服务器东莞网站建设 石佳
  • 政务网站的建设时期的概述中国网站建设的利弊
  • 怎样维护自己的网站现在流行的网站开发工具
  • 做快消品看那些网站好wordpress 版本 php7
  • 济南哪个网络公司建网站好建设 投资基金管理有限公司网站
  • 企业网站、电子期刊属于企业文化传播载体中的( )。能制作网页的软件是