获取用户颜色偏好

Get users colour preference

我检查用户是否有 light/dark/warm/cold 主壁纸颜色。并以此为用户提供良好的个性化体验。

但是我正在将我的应用程序转换为即时应用程序,我无法再检索壁纸(我猜是因为缺少 read_external_data?)

知道是否有办法检索主背景色吗? 或者用另一种方法来检查用户的颜色偏好是什么? (是否可以获取主屏幕状态栏的颜色之类的?)

您无法检索壁纸,因为“READ_EXTERNAL_STORAGE”权限不适用于免安装应用程序。

In order for your app bundle to be instant-compatible, it can only use permissions from the following list:

  • ACCESS_COARSE_LOCATION

  • ACCESS_FINE_LOCATION

  • ACCESS_NETWORK_STATE

  • BILLING – Deprecated as of Play Billing Library 1.0.

  • CAMERA

  • INSTANT_APP_FOREGROUND_SERVICE – Only in Android 8.0 (API level 26) and higher.

  • INTERNET

  • READ_PHONE_NUMBERS – Only in Android 8.0 (API level 26) and higher.

  • RECORD_AUDIO

  • VIBRATE

https://developer.android.com/topic/google-play-instant/getting-started/instant-enabled-app-bundle#check-permissions

资料来源:Google 的免安装应用常见问题解答(请参阅 https://developer.android.com/topic/google-play-instant/faqs

@gbaccetta 来自这个遮阳棚:

@adamk 来自这个遮阳棚: