如何在应用程序中访问com.android.internal.R.bool?

Ant*_*ony 10 android android-wifi

我想访问以获取此参数

com.android.internal.R.bool.config_wifi_background_scan_support 但它给出了com.android.internal.R无法解决的错误?

我正试图用这种方式: this.getResources().getSystem().getIdentifier("config_wifi_background_scan_support","id", "android")

但我一无所获.

任何人都知道如何获取信息com.android.internal.R.bool

yon*_*joy 19

你几乎是对的.

Resources.getSystem().getIdentifier("config_wifi_background_scan_support","bool", "android");
Run Code Online (Sandbox Code Playgroud)

为您提供正确的ID.