Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Samsung Galaxy S2、S3、または S4 デバイスの運転モードの有効/無効状態をプログラムで検出したいのですが、それを行う方法がわかりません。
PS: つまり、[設定] > [言語と入力] > [テキスト読み上げの出力] > [運転モード] です。
助けてください。
boolean isEnabled = Settings.System.getInt(getContentResolver(), "driving_mode_on", 0) == 1;
運転モードが有効な場合、isEnabled は true になります