Код: Выделить всё
Set grantedPermissions = null;
try {
grantedPermissions = BuildersKt.runBlocking(
EmptyCoroutineContext.INSTANCE,
(s, c) -> HealthConnect.getInstance(context).mHealthConnectClient.
getPermissionController().getGrantedPermissions(c)
);
} catch (Exception e) {
return false;
}
(Android 13)
Подробнее здесь: https://stackoverflow.com/questions/790 ... d-infinite
Мобильная версия