当前位置: 首页> 科技> 能源 > php站点搭建_安阳吧百度贴吧_东莞做网站排名优化推广_如何利用seo赚钱

php站点搭建_安阳吧百度贴吧_东莞做网站排名优化推广_如何利用seo赚钱

时间:2025/8/11 17:21:16来源:https://blog.csdn.net/Hhjian524/article/details/147637034 浏览次数:0次
php站点搭建_安阳吧百度贴吧_东莞做网站排名优化推广_如何利用seo赚钱
import 'package:device_info_plus/device_info_plus.dart';
import 'package:permission_handler/permission_handler.dart';Future<bool> storagePermission() async {final DeviceInfoPlugin info =DeviceInfoPlugin(); // import 'package:device_info_plus/device_info_plus.dart';final AndroidDeviceInfo androidInfo = await info.androidInfo;final int androidVersion = int.parse(androidInfo.version.release);bool havePermission = false;// Here you can use android api level// like android api level 33 = android 13// This way you can also find out how to request storage permissionif (androidVersion >= 13) {final request = await [// Permission.videos,// Permission.photos,Permission.audio,Permission.storage//..... as needed].request(); //import 'package:permission_handler/permission_handler.dart';havePermission =request.values.every((status) => status == PermissionStatus.granted);} else {final status = await Permission.storage.request();havePermission = status.isGranted;}if (!havePermission) {// if no permission then open app-settingawait openAppSettings();}return havePermission;
}

AndroidManifest.xml

    <!-- for below android 13--><uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage" /><uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /><!-- for above android 13--><uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /><uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /><uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />

关键字:php站点搭建_安阳吧百度贴吧_东莞做网站排名优化推广_如何利用seo赚钱

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: