• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Delphi10.3实现AndroidApp的动态权限申请

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

Delphi 10.3 RIO发布近两个月,针对Google Play的要求,完美实现了对Android 8的支持,即对Android API Level 26的支持。这支持当中,最主要的得算是动态申请应用权限,现在我们来看看,如何在自己的app中动态申请权限?

下面的代码,是10.3封装的Android权限列表,这些权限,我们都可以动态申请。

    {class} property ACCESS_CHECKIN_PROPERTIES: JString read _GetACCESS_CHECKIN_PROPERTIES;
    {class} property ACCESS_COARSE_LOCATION: JString read _GetACCESS_COARSE_LOCATION;
    {class} property ACCESS_FINE_LOCATION: JString read _GetACCESS_FINE_LOCATION;
    {class} property ACCESS_LOCATION_EXTRA_COMMANDS: JString read _GetACCESS_LOCATION_EXTRA_COMMANDS;
    {class} property ACCESS_NETWORK_STATE: JString read _GetACCESS_NETWORK_STATE;
    {class} property ACCESS_NOTIFICATION_POLICY: JString read _GetACCESS_NOTIFICATION_POLICY;
    {class} property ACCESS_WIFI_STATE: JString read _GetACCESS_WIFI_STATE;
    {class} property ACCOUNT_MANAGER: JString read _GetACCOUNT_MANAGER;
    {class} property ADD_VOICEMAIL: JString read _GetADD_VOICEMAIL;
    {class} property ANSWER_PHONE_CALLS: JString read _GetANSWER_PHONE_CALLS;
    {class} property BATTERY_STATS: JString read _GetBATTERY_STATS;
    {class} property BIND_ACCESSIBILITY_SERVICE: JString read _GetBIND_ACCESSIBILITY_SERVICE;
    {class} property BIND_APPWIDGET: JString read _GetBIND_APPWIDGET;
    {class} property BIND_AUTOFILL_SERVICE: JString read _GetBIND_AUTOFILL_SERVICE;
    {class} property BIND_CARRIER_MESSAGING_SERVICE: JString read _GetBIND_CARRIER_MESSAGING_SERVICE;
    {class} property BIND_CARRIER_SERVICES: JString read _GetBIND_CARRIER_SERVICES;
    {class} property BIND_CHOOSER_TARGET_SERVICE: JString read _GetBIND_CHOOSER_TARGET_SERVICE;
    {class} property BIND_CONDITION_PROVIDER_SERVICE: JString read _GetBIND_CONDITION_PROVIDER_SERVICE;
    {class} property BIND_DEVICE_ADMIN: JString read _GetBIND_DEVICE_ADMIN;
    {class} property BIND_DREAM_SERVICE: JString read _GetBIND_DREAM_SERVICE;
    {class} property BIND_INCALL_SERVICE: JString read _GetBIND_INCALL_SERVICE;
    {class} property BIND_INPUT_METHOD: JString read _GetBIND_INPUT_METHOD;
    {class} property BIND_MIDI_DEVICE_SERVICE: JString read _GetBIND_MIDI_DEVICE_SERVICE;
    {class} property BIND_NFC_SERVICE: JString read _GetBIND_NFC_SERVICE;
    {class} property BIND_NOTIFICATION_LISTENER_SERVICE: JString read _GetBIND_NOTIFICATION_LISTENER_SERVICE;
    {class} property BIND_PRINT_SERVICE: JString read _GetBIND_PRINT_SERVICE;
    {class} property BIND_QUICK_SETTINGS_TILE: JString read _GetBIND_QUICK_SETTINGS_TILE;
    {class} property BIND_REMOTEVIEWS: JString read _GetBIND_REMOTEVIEWS;
    {class} property BIND_SCREENING_SERVICE: JString read _GetBIND_SCREENING_SERVICE;
    {class} property BIND_TELECOM_CONNECTION_SERVICE: JString read _GetBIND_TELECOM_CONNECTION_SERVICE;
    {class} property BIND_TEXT_SERVICE: JString read _GetBIND_TEXT_SERVICE;
    {class} property BIND_TV_INPUT: JString read _GetBIND_TV_INPUT;
    {class} property BIND_VISUAL_VOICEMAIL_SERVICE: JString read _GetBIND_VISUAL_VOICEMAIL_SERVICE;
    {class} property BIND_VOICE_INTERACTION: JString read _GetBIND_VOICE_INTERACTION;
    {class} property BIND_VPN_SERVICE: JString read _GetBIND_VPN_SERVICE;
    {class} property BIND_VR_LISTENER_SERVICE: JString read _GetBIND_VR_LISTENER_SERVICE;
    {class} property BIND_WALLPAPER: JString read _GetBIND_WALLPAPER;
    {class} property BLUETOOTH: JString read _GetBLUETOOTH;
    {class} property BLUETOOTH_ADMIN: JString read _GetBLUETOOTH_ADMIN;
    {class} property BLUETOOTH_PRIVILEGED: JString read _GetBLUETOOTH_PRIVILEGED;
    {class} property BODY_SENSORS: JString read _GetBODY_SENSORS;
    

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
用Delphi“遥控”按钮发布时间:2022-07-18
下一篇:
delphi调用windows自带语音功能发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap