how to detect accessibility settings on android is enabled/disabled

前端 未结 5 1316
清歌不尽
清歌不尽 2021-01-28 12:34

I\'m particularly interested in high contrast text, color correction, and magnification settings. I did some research online, couldn\'t fi

5条回答
  •  后悔当初
    2021-01-28 12:53

    use this for color correction:

    int color_correction_enabled = 0;

    try { color_correction_enabled = Settings.Secure.getInt(this.getContentResolver(), "accessibility_display_daltonizer_enabled");

    } catch (Exception e) {

    color_correction_enabled = 0; // means default false }

提交回复
热议问题