自定义Android权限请求消息?

时间:2019-09-28 20:00:33

标签: firemonkey c++builder c++builder-10.3-rio

跟随Embarcadero Android Permission Model documentation,然后查看Camera cpp移动代码段示例,我现在可以成功请求用户权限。

但是,我不知道如何自定义请求消息。我只要求获得# Import pandas library import pandas as pd data = [['SunilNarine', 379.5], ['Shane Watson', 318.0], ['Virat Kohli', 543]] df = pd.DataFrame(data, columns = ['PLAYER', 'Pts']) # print the records print(df[df.PLAYER=='Virat Kohli']) print(df[df.PLAYER=='Shane Watson']) print(df[df.Pts== 379.5]) 的许可-我不希望收到有关照片等的消息。

enter image description here

我如何自定义此消息?

1 个答案:

答案 0 :(得分:3)

提示消息是由操作系统而不是应用程序控制的。消息文本是所要求的每个许可的通用名称。您无法自定义文字。

您能做的最好的事情就是在请求许可之前或在许可被拒绝之后(TPermissionsService.RequestPermissions()为此目的有一个可选的#include <stdio.h> int main(){ int choice = 0; printf("1- Finabocci sequence\n"); printf("2- Check valid date\n"); printf("3- Quit\n"); printf("Choose an operation: \n"); scanf("%d", &choice); switch(choice) { case 1: { int t1 = 0, t2 = 1, nextTerm = 0, n; printf("Enter a positive number: "); scanf("%d", &n); printf("Fibonacci Series: %d, %d, ", t1, t2); nextTerm = t2 + 1; while(nextTerm <= n) { printf("%d, ",nextTerm); t1 = t2; t2 = nextTerm; nextTerm = t1 + t2; } break; } case 2: { int validDate(int d,int m,int y) { if (m<1||m>12) return 0; else if (m==1||m==3||m==5||m==7||m==8||m==10||m==12) { if (d>=1&&d<=31) return 1; else return 0; } else if (m==4||m==6||m==9||m==11) { if (d>=1&&d<=30) return 1; else return 0; } else if (m==2) { if (y%400==0||(y%4==0&&y%100!=0)) { if (d>=1&&d<=29) return 1; else return 0; } else if (d>=1&&d<=28) return 1; else return 0; } } int d,m,y; printf ("Input day: "); scanf("%d",&d); printf ("Input month: "); scanf("%d",&m); printf ("Input year: "); scanf("%d",&y); if(validDate(d,m,y)!=0) printf("valid date\n"); else printf("invalid date \n"); break; } default: printf("exit?"); break; getchar(); } return 0; } 回调)向用户显示基本信息。可以向用户解释为什么需要许可。有关更多详细信息,请参见Android开发人员文档中的App permissions best practices,尤其是有关Explain why you need permissions的部分。

这是Android本身的限制,而不是Embarcadero的限制。