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

金华做网站报价上海最新发布

金华做网站报价,上海最新发布,40个超好玩的网页小游戏,最专业的网站建设公司一、 android34升级: 1、升级到安卓34(蓝牙、图片) 再蓝牙广播的地方加入Context.RECEIVER_EXPORTED 2、废弃了 BluetoothAdapter#enable() 和 BluetoothAdapter#disable(),需要修改 // 以前的蓝牙操作BluetoothManager bluetoo…

一、 android34升级:
1、升级到安卓34(蓝牙、图片)

再蓝牙广播的地方加入Context.RECEIVER_EXPORTED

2、废弃了 BluetoothAdapter#enable() 和 BluetoothAdapter#disable(),需要修改

// 以前的蓝牙操作BluetoothManager bluetoothManager = (BluetoothManager) this.getSystemService(Context.BLUETOOTH_SERVICE);BluetoothAdapter bluetoothAdapter = bluetoothManager.getAdapter();Log.i(TAG, "BluetoothAdapter isEnabled: " + bluetoothAdapter.isEnabled());if (!bluetoothAdapter.isEnabled()) {boolean enable = bluetoothAdapter.enable();Log.i(TAG, "BluetoothAdapter enable result: " + enable);
}
// 现在需要这样BluetoothManager bluetoothManager = (BluetoothManager) this.getSystemService(Context.BLUETOOTH_SERVICE);BluetoothAdapter bluetoothAdapter = bluetoothManager.getAdapter();Log.i(TAG, "BluetoothAdapter isEnabled: " + bluetoothAdapter.isEnabled());if (!bluetoothAdapter.isEnabled()) {ActivityResultLauncher<Intent> register = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(),new ActivityResultCallback<ActivityResult>() {@Overridepublic void onActivityResult(ActivityResult result) {if (result == null) {Log.i(TAG, "开启蓝牙失败:result 为 null");return;}int resultCode = result.getResultCode();if (resultCode != Activity.RESULT_OK) {Log.i(TAG, "开启蓝牙失败:resultCode 为 " + resultCode);return;}Log.i(TAG, "开启蓝牙成功:resultCode 为 " + resultCode);}});Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);register.launch(intent);
}

图片-头像-拍照:
androidmainfest 增加权限:      Manifest.permission.READ_MEDIA_IMAGES,
                        Manifest.permission.READ_MEDIA_VIDEO,
                        Manifest.permission.READ_MEDIA_VISUAL_USER_SELECTED,
                        

代码中动态请求:
                        Manifest.permission.READ_MEDIA_IMAGES,
                        Manifest.permission.READ_MEDIA_VIDEO,
                        Manifest.permission.READ_MEDIA_VISUAL_USER_SELECTED,

 

请求权限参考代码

            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU&& (ContextCompat.checkSelfPermission(this, READ_MEDIA_IMAGES) == PERMISSION_GRANTED|| ContextCompat.checkSelfPermission(this, READ_MEDIA_VIDEO) == PERMISSION_GRANTED)) {// Android 13及以上完整照片和视频访问权限} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE &&ContextCompat.checkSelfPermission(this, READ_MEDIA_VISUAL_USER_SELECTED) == PERMISSION_GRANTED) {// Android 14及以上部分照片和视频访问权限} else if (ContextCompat.checkSelfPermission(this, READ_EXTERNAL_STORAGE) == PERMISSION_GRANTED) {// Android 12及以下完整本地读写访问权限} else {// 无本地读写访问权限}

                        


======================================================================================
打aab包:
1、将项目中的\app\src\main\assets中的bin文件夹全部移动到base_assets文件夹
2、打包aab:build->Android App Bundle->选择签名,得到aab的包

===============================================
直接AS运行到手机上测试的:
1、需要将base_assets中的\base_assets\src\main\assets的bin文件,拷贝到\app\src\main\assets
2、移除base_assets文件夹

================================================

将aab转换为apks
1、将aab的包拷贝到AAB_TO_APK文件夹(名称默认为app-release.aab),
2、点击click.bat,出来小黑屏,等待apks的生成 (如果无响应的,重新下载bundletool-all-1.18.1的版本、检查jdk的版本)

下载链接:https://github.com/google/bundletool/releases


3、得到出来aa.apks,解压获得apk的文件包
4、安装到手机测试功能


文章转载自:

http://CYn1Wfqm.nrxsL.cn
http://hmb4roUn.nrxsL.cn
http://TfRcm1jv.nrxsL.cn
http://NJqR4V8X.nrxsL.cn
http://M9iTQcoq.nrxsL.cn
http://3P4gGEM7.nrxsL.cn
http://Wm9H85qu.nrxsL.cn
http://dWVCoa5H.nrxsL.cn
http://MgDXJYA7.nrxsL.cn
http://fdIJ9bv5.nrxsL.cn
http://zgB2fBwF.nrxsL.cn
http://By1k3Asu.nrxsL.cn
http://dhQT7qce.nrxsL.cn
http://jgWTcGjz.nrxsL.cn
http://iOB2j81V.nrxsL.cn
http://lzrhPexW.nrxsL.cn
http://CEDtPnRl.nrxsL.cn
http://emwfxdeD.nrxsL.cn
http://NrxHCCP8.nrxsL.cn
http://xxL7ToYi.nrxsL.cn
http://Pr1f5fpb.nrxsL.cn
http://fqUo9z7j.nrxsL.cn
http://6X8y0nSS.nrxsL.cn
http://ckFDxffa.nrxsL.cn
http://ihuOSs12.nrxsL.cn
http://SOjJiLlb.nrxsL.cn
http://D06J6sBu.nrxsL.cn
http://ZmYtDhKW.nrxsL.cn
http://rALYftnj.nrxsL.cn
http://XvJxNlbf.nrxsL.cn
http://www.dtcms.com/wzjs/681335.html

相关文章:

  • 宁波品牌网站公司排名专业网站制作公司排名
  • 鞍山 中企动力提供网站建设免费看黄金的软件
  • 湖南建设厅网站证书查询做个平台网站怎么做
  • 微企业网站模板免费申请域名需要多久
  • 青岛做网站建网站wordpress主题显示不
  • 德宏芒市建设局网站微网站首页
  • app商城需要手机网站吗河南红旗渠建设集团网站
  • 海口网站wordpress文章字符插件
  • 购物网站建设 费用三大门户网站
  • 做UI设计的网站辽宁网站建设学校
  • 建设网站公司选哪家好dz整站网站建设
  • 怎么做app网站ui原型做网站公司法人还要拍照吗
  • 万网怎样做网站调试网站建设的基本
  • 咸宁网站建设哪家专业衡水seo网站建设优化排名
  • 福建省城乡建设厅网站互联网保险的优势
  • 移动网站转码一个电子商务网站的用户购买行为监测报告文档格式怎么做?
  • 上海手机站网站建设国内网页做的好看的网站
  • 马鞍山网站建设与制作关键词文案生成器
  • 定手机网站建设手机首页
  • 呼和浩特企业网站排名优化博客网站大全
  • 宁波网站建设使用技巧分享卡盟网站开发
  • 用ps做网站首页顶部图片关键词优化ppt
  • apache新建网站潍坊企业宣传片制作公司
  • 网站建设和网站搭建哪个好网站建设网页设计培训学校
  • 代加工接订单网站如何建立公司网站?
  • 手表网站哪个最好知乎网站设计一般包括什么
  • 自己的网站如何优化禹州做网站的
  • dw做网站设计建设银行校园招聘网站
  • 东莞外贸公司网站建设免费网站软件制作
  • 中国门户网站排行域名cn是个什么网站