如您所知,根据Google开发者政策,如果我们的应用程序核心功能不依赖SMS,则应删除RECEIVE_SMS android权限并尝试查找其他替代方法。
但是我的问题是我没有在清单或询问运行时中使用RECEIVE_SMS。不过,Google仍警告我使用RECEIVE_SMS权限。
虽然在Play商店中,但如果我在此应用中检查了所需的权限,则显示为RECEIVE_SMS权限。
如果我在错误的地方使用它,您可以在我的应用程序的一些屏幕快照中搜索此许可权。
但是我找不到它。
此清单中也有一个
如您所见,我不是在清单或运行时中请求该权限。
我正在使用Firebase Phone身份验证和PayUMoney付款集成。这两个可能引起问题吗?或他们正在内部请求此权限。
我不知道此权限来自何处。
如果有人可以帮助我解决这个问题,那将是一个很大的帮助。
有人遇到同样的问题吗?
答案 0 :(得分:11)
嗯,问题出在PayUMoney库上。因为Firebase电话验证不要求";WITH Dates as ("
+ " SELECT @FromDate as CalendarDate "
+ " UNION ALL "
+ " SELECT dateadd(MONTH, 1, CalendarDate) AS CalendarDate "
+ " FROM Dates "
+ " WHERE DATEADD(MONTH, 1, CalendarDate) < @ToDate )"
+ " ,cteMonthEnd AS ( "
+ " SELECT* , MonthEnd = DATEADD(s, -1, DATEADD(mm, DATEDIFF(m, 0, CalendarDate) + 1, 0)) "
+ " FROM Dates ) "
+ " SELECT CTE.CalendarDate, s.StrainId,GOH.CagePerDiem, "
+ " COUNT(CASE WHEN DATEDIFF(DAY, M.BirthDate, CTE.MonthEnd) >= 17 and M.DeathDate IS NULL THEN 1 END) TotalKeptMicesOver17Days,"
+ " COUNT(CASE WHEN AnimalUseCd = 2 and DATEDIFF(DAY, M.BirthDate, CTE.MonthEnd) >= 17 and DeathDate IS NULL THEN 1 END) BreedingKeptMices,"
+ " COUNT(CASE WHEN AnimalUseCd = 3 and DATEDIFF(DAY, M.BirthDate, CTE.MonthEnd) >= 17 and DeathDate IS NULL THEN 1 END) ExperimentKeptMices,"
+ " COUNT(CASE WHEN AnimalUseCd = 0 and DATEDIFF(DAY, M.BirthDate, CTE.MonthEnd) >= 17 and DeathDate IS NULL THEN 1 END) AvailableKeptMices,"
+ " COUNT(CASE WHEN AnimalUseCd = 2 and DATEDIFF(DAY, M.BirthDate, CTE.MonthEnd) >= 17 and GenderCd = 2 and DeathDate IS NULL THEN 1 END) BreedingKeptFemaleCount,"
+ " COUNT(CASE WHEN AnimalUseCd = 2 and DATEDIFF(DAY, M.BirthDate, CTE.MonthEnd) >= 17 and GenderCd = 1 and DeathDate IS NULL THEN 1 END) BreedingKeptMaleCount,"
+ " COUNT(CASE WHEN AnimalUseCd = 3 and DATEDIFF(DAY, M.BirthDate, CTE.MonthEnd) >= 17 and GenderCd = 2 and DeathDate IS NULL THEN 1 END) ExperimentKeptFemaleCount,"
+ " COUNT(CASE WHEN AnimalUseCd = 3 and DATEDIFF(DAY, M.BirthDate, CTE.MonthEnd) >= 17 and GenderCd = 1 and DeathDate IS NULL THEN 1 END) ExperimentKeptMaleCount"
+ " FROM cteMonthEnd CTE"
+ " CROSS JOIN Strains S"
+ " JOIN Mice M ON M.StrainId = S.StrainId"
+ " LEFT JOIN GroupOverhead GOH on S.GroupId = GOH.GroupId"
+ " WHERE S.GroupId in (Select GroupId from Groups where OrganizationId = @groupId)"
+ " GROUP BY S.StrainId, CalendarDate,GOH.CagePerDiem"
+ " order by CalendarDate asc";
权限。
您可以做的是,可以逐个删除该库,然后检查它是否仍在请求RECEIVE_SMS
权限。
如果您找到导致此问题的库,则可以在Android清单中编写此代码
RECEIVE_SMS
这将防止库在内部请求此权限。另外,在将此行添加到应用清单之后,请检查未经此许可的库是否正常运行。
对于您的特定问题,PayUMoney导致了此问题,而不是Firebase,因此您可以将此行添加到清单中。并检查PayuMoney是否正常工作。
答案 1 :(得分:-1)
Firebase Phone身份验证将需要使用SMS来对您进行身份验证。因此,需要您的许可。这就是为什么出现此错误的原因,这是一种简单的说法;请包括短信权限。
并且请您可以尝试使用此库来轻松地进行权限操纵;
implementation 'gun0912.ted:tedpermission:2.2.2
只要需要许可就行;
` 公共类GrantPermisions {
public static void givePermision(final Context context){
PermissionListener permissionlistener = new PermissionListener() {
@Override
public void onPermissionGranted() {
}
@Override
public void onPermissionDenied(List<String> deniedPermissions) {
}
};
TedPermission.with(context)
.setPermissionListener(permissionlistener)
.setDeniedMessage("If you reject permission,you can not use this service\n\nPlease turn on permissions at [Setting] > [Permission]")
.setPermissions(Manifest.permission.INTERNET,
Manifest.permission.READ_SMS,
Manifest.permission.READ_CALL_LOG)
.check();
}
}`
希望您能解决它。生产等待队友!!!