Language

AppOpsManager.ModeForeground フィールド

定義

注意事項

This constant will be removed in the future version. Use Android.App.AppOpsManagerMode enum directly instead of this field.

"アプリがフォアグラウンドにある場合にのみ許可する" ことを意味する特別なモード。

[Android.Runtime.Register("MODE_FOREGROUND", ApiSince=29)]
[System.Obsolete("This constant will be removed in the future version. Use Android.App.AppOpsManagerMode enum directly instead of this field.", true)]
public const Android.App.AppOpsManagerMode ModeForeground = 4;
[<Android.Runtime.Register("MODE_FOREGROUND", ApiSince=29)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.App.AppOpsManagerMode enum directly instead of this field.", true)>]
val mutable ModeForeground : Android.App.AppOpsManagerMode

フィールド値

Value = 4
属性

注釈

"アプリがフォアグラウンドの場合にのみ許可する" ことを意味する特別なモード。 unsafeCheckOp(String, int, String), noteOp(String, int, String), startOp(String, int, String) からは返されません。 代わりに、unsafeCheckOp(String, int, String) は常にMODE_ALLOWEDを返します (アプリのバックグラウンド状態に応じて、最終的に許可されることは常に可能であるため)。noteOp(String, int, String) と startOp(String, int, String) は、アプリが現在フォアグラウンドにある場合はMODE_ALLOWEDを返し、それ以外の場合はMODE_IGNORED。 通常、この値が表示される唯一の場所は unsafeCheckOpRaw(String, int, String) です。これは、opの実際の生モードを返します。 チェック対象のアプリの現在の状態を把握できないため (また、いつでも変更される可能性があるため)、ここでの結果は、アプリのバックグラウンド状態の変化に応じてMODE_ALLOWEDとMODE_IGNOREDの間で変化することを示すものとしてのみ扱うことができます。 したがって、op にアクセスするための実際のチェックを行うには、常に noteOp(String, int, String) または startOp(String, int, String) を使用する必要があります。

android.app.AppOpsManager.MODE_FOREGROUNDの Android リファレンス。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象