MockContext クラス

定義

モック android.content.Context クラス。

[Android.Runtime.Register("android/test/mock/MockContext", DoNotGenerateAcw=true)]
public class MockContext : Android.Content.Context
[<Android.Runtime.Register("android/test/mock/MockContext", DoNotGenerateAcw=true)>]
type MockContext = class
    inherit Context
継承
MockContext
属性

注釈

モック android.content.Context クラス。 すべてのメソッドは非機能であり、 をスローします java.lang.UnsupportedOperationException。 これを使用して、テストするクラスに他の依存関係、モック、またはモニターを挿入できます。

の Java ドキュメント android.test.mock.MockContext

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

コンストラクター

MockContext()
MockContext(IntPtr, JniHandleOwnership)

JNI オブジェクトのマネージド表現を作成するときに使用されるコンストラクター。ランタイムによって呼び出されます。

フィールド

AccessibilityService

#getSystemService(String) 使用して、登録されたイベント リスナーを android.view.accessibility.AccessibilityManager 介して UI イベントのユーザー フィードバックを提供するための を取得します。

(継承元 Context)
AccountService

#getSystemService(String) 使用して、 android.accounts.AccountManager 選択した時点で意図を受信するための を取得します。

(継承元 Context)
ActivityService

グローバル システム状態と #getSystemService(String) 対話するための を android.app.ActivityManager 取得するには、 と を使用します。

(継承元 Context)
AlarmService

#getSystemService(String) 使用して、 android.app.AlarmManager 選択した時点で意図を受信するための を取得します。

(継承元 Context)
AppOpsService

#getSystemService(String) 使用して、デバイス上のアプリケーション操作を android.app.AppOpsManager 追跡するための を取得します。

(継承元 Context)
AppSearchService

#getSystemService(String) 使用して、 android.app.appsearch.AppSearchManager システムによって管理されるアプリ データのインデックス作成とクエリを行うために を取得します。

(継承元 Context)
AppwidgetService

AppWidgets にアクセスするための をandroid.appwidget.AppWidgetManager取得するには、 と #getSystemService(String) を使用します。

(継承元 Context)
AudioService

ボリューム、呼び出し音モード、オーディオ ルーティングの管理を処理するための をandroid.media.AudioManager取得するには、 と #getSystemService(String) を使用します。

(継承元 Context)
BatteryService

と を #getSystemService(String) 使用して、 android.os.BatteryManager バッテリの状態を管理するための を取得します。

(継承元 Context)
BindAllowActivityStarts
古い.

フラグ: #bindService表示されているアプリからのバインドの場合、バインドされたサービスはバックグラウンドからアクティビティを開始できます。

(継承元 Context)
BindExternalServiceLong

と同じように #BIND_EXTERNAL_SERVICE動作しますが、 として定義されています (

(継承元 Context)
BindNotPerceptible
古い.

フラグ: #bindService表示可能またはユーザーが認識できるアプリからのバインドの場合は、ターゲット サービスの重要度を受け入れ可能なレベル未満に下げます。

(継承元 Context)
BindSharedIsolatedProcess
古い.

フラグ: #bindIsolatedServiceサービスを共有分離プロセスにバインドします。

(継承元 Context)
BiometricService

#getSystemService(String)と を使用して、生体認証と PIN/パターン/パスワード認証を処理するための を取得android.hardware.biometrics.BiometricManagerします。

(継承元 Context)
BlobStoreService

#getSystemService(String) 使用して、 android.app.blob.BlobStoreManager システムによって管理されている BLOB ストアからデータ BLOB に貢献してアクセスするための を取得します。

(継承元 Context)
BluetoothService

と を #getSystemService(String) 使用して、Bluetooth を使用するための を android.bluetooth.BluetoothManager 取得します。

(継承元 Context)
BugreportService

バグレポートをキャプチャするサービス。

(継承元 Context)
CameraService

#getSystemService(String) を使用して、カメラ デバイスと対話するための を取得 android.hardware.camera2.CameraManager します。

(継承元 Context)
CaptioningService

#getSystemService(String) を使用して、キャプションプロパティを取得し、キャプション設定の変更をリッスンするために を取得 android.view.accessibility.CaptioningManager します。

(継承元 Context)
CarrierConfigService

#getSystemService(String) を使用して、通信事業者の構成値を読み取るための を android.telephony.CarrierConfigManager 取得します。

(継承元 Context)
ClipboardService

#getSystemService(String) 使用して、 android.content.ClipboardManager グローバル クリップボードの内容にアクセスして変更するための を取得します。

(継承元 Context)
CompanionDeviceService

と を #getSystemService(String) 使用して、コンパニオン デバイスを管理するための を取得 android.companion.CompanionDeviceManager します

(継承元 Context)
ConnectivityDiagnosticsService

#getSystemService(String)使用して、android.net.ConnectivityDiagnosticsManagerネットワーク接続診断を実行するための を取得し、システムからネットワーク接続情報を受信します。

(継承元 Context)
ConnectivityService

ネットワーク接続の管理を処理するための をandroid.net.ConnectivityManager取得するには、 と #getSystemService(String) を使用します。

(継承元 Context)
ConsumerIrService

#getSystemService(String) 使用して、 android.hardware.ConsumerIrManager デバイスから赤外線信号を送信するための を取得します。

(継承元 Context)
CredentialService

#getSystemService(String) 使用して を android.credentials.CredentialManager 取得し、アプリに対してユーザーを認証します。

(継承元 Context)
CrossProfileAppsService

クロス プロファイル操作の を取得するには、 android.content.pm.CrossProfileApps と を#getSystemService(String)使用します。

(継承元 Context)
DeviceIdDefault

既定のデバイス ID。これはプライマリ (非仮想) デバイスの ID です。

(継承元 Context)
DeviceIdInvalid

デバイス ID が無効です。

(継承元 Context)
DeviceLockService

#getSystemService(String) 使用して を取得します android.devicelock.DeviceLockManager

(継承元 Context)
DevicePolicyService

#getSystemService(String)グローバル デバイス ポリシー管理を操作するための をandroid.app.admin.DevicePolicyManager取得するには、 と を使用します。

(継承元 Context)
DisplayHashService

にアクセスandroid.view.displayhash.DisplayHashManagerして表示ハッシュを処理するには、 と #getSystemService(String) を使用します。

(継承元 Context)
DisplayService

#getSystemService(String) を使用して、 android.hardware.display.DisplayManager ディスプレイ デバイスと対話するための を取得します。

(継承元 Context)
DomainVerificationService

にアクセスandroid.content.pm.verify.domain.DomainVerificationManagerするには、 を#getSystemService(String)使用して、宣言された Web ドメインの承認とユーザーの状態を取得します。

(継承元 Context)
DownloadService

と を #getSystemService(String) 使用して、 android.app.DownloadManager HTTP ダウンロードを要求するための を取得します。

(継承元 Context)
DropboxService

診断ログを記録するためのインスタンスを取得するには、 android.os.DropBoxManager と を#getSystemService(String)使用します。

(継承元 Context)
EuiccService

#getSystemService(String) 使用して を android.telephony.euicc.EuiccManager 取得し、デバイス eUICC (埋め込み SIM) を管理します。

(継承元 Context)
FileIntegrityService

#getSystemService(String) 使用して を取得します android.security.FileIntegrityManager

(継承元 Context)
FingerprintService

#getSystemService(String)と を使用して、指紋の管理を処理するための をandroid.hardware.fingerprint.FingerprintManager取得します。

(継承元 Context)
GameService

#getSystemService(String) 使用して を取得します GameManager

(継承元 Context)
GrammaticalInflectionService

#getSystemService(String) 使用して を取得します GrammaticalInflectionManager

(継承元 Context)
HardwarePropertiesService

ハードウェア プロパティ サービスにアクセスするための をandroid.os.HardwarePropertiesManager取得するには、 と #getSystemService(String) を使用します。

(継承元 Context)
HealthconnectService

#getSystemService(String) 使用して を取得します android.health.connect.HealthConnectManager

(継承元 Context)
InputMethodService

と を #getSystemService(String) 使用して、入力メソッドにアクセスするための を取得 android.view.inputmethod.InputMethodManager します。

(継承元 Context)
InputService

#getSystemService(String) を使用して、入力デバイスと対話するための を取得 android.hardware.input.InputManager します。

(継承元 Context)
IpsecService

#getSystemService(String) 使用して、 android.net.IpSecManager IPSec を使用してソケットまたはネットワークを暗号化するための を取得します。

(継承元 Context)
JobSchedulerService

と を #getSystemService(String) 使用して、時折の android.app.job.JobScheduler バックグラウンド タスクを管理するためのインスタンスを取得します。

(継承元 Context)
KeyguardService

キーガードを制御するための を取得するには、 android.app.KeyguardManager#getSystemService(String) を使用します。

(継承元 Context)
LauncherAppsService

#getSystemService(String) 使用して、 android.content.pm.LauncherApps ユーザーのプロファイル全体で起動可能なアプリのクエリを実行および監視するための を取得します。

(継承元 Context)
LayoutInflaterService

#getSystemService(String) 使用して、 android.view.LayoutInflater このコンテキストでレイアウト リソースを拡張するための を取得します。

(継承元 Context)
LocaleService

#getSystemService(String) 使用して を取得します android.app.LocaleManager

(継承元 Context)
LocationService

#getSystemService(String) 使用して、場所の android.location.LocationManager 更新を制御するための を取得します。

(継承元 Context)
MediaCommunicationService

#getSystemService(String) 使用して を取得します。android.media.MediaCommunicationManager を管理します android.media.MediaSession2

(継承元 Context)
MediaMetricsService

#getSystemService(String) 使用して、 android.media.metrics.MediaMetricsManager デバイス上のメディア メトリックを操作するための を取得します。

(継承元 Context)
MediaProjectionService

メディア プロジェクション セッションを管理するためのインスタンスをandroid.media.projection.MediaProjectionManager取得するには、 と を#getSystemService(String)使用します。

(継承元 Context)
MediaRouterService

メディアのルーティングを制御および管理するための をandroid.media.MediaRouter取得するには、 と #getSystemService を使用します。

(継承元 Context)
MediaSessionService

メディア セッションを管理するための をandroid.media.session.MediaSessionManager取得するには、 と #getSystemService(String) を使用します。

(継承元 Context)
MidiService

と を #getSystemService(String) 使用して、 android.media.midi.MidiManager MIDI サービスにアクセスするための を取得します。

(継承元 Context)
NetworkStatsService

と を #getSystemService(String) 使用して、 android.app.usage.NetworkStatsManager ネットワーク使用状況の統計に対するクエリを実行するための を取得します。

(継承元 Context)
NfcService

NFC を使用するための を取得するには、 android.nfc.NfcManager#getSystemService(String) を使用します。

(継承元 Context)
NotificationService

#getSystemService(String)を使用して、android.app.NotificationManagerユーザーにバックグラウンド イベントを通知するための を取得します。

(継承元 Context)
NsdService

#getSystemService(String) を使用して、ネットワーク サービス検出の管理を処理するための を android.net.nsd.NsdManager 取得します。

(継承元 Context)
OverlayService

と を #getSystemService(String) 使用して、オーバーレイ パッケージを管理するための を取得 android.content.om.OverlayManager します。

(継承元 Context)
PeopleService

#getSystemService(String) 使用して、 PeopleManager にアクセスし、公開された会話と対話します。

(継承元 Context)
PerformanceHintService

パフォーマンス ヒント サービスにアクセスするための をandroid.os.PerformanceHintManager取得するには、 と #getSystemService(String) を使用します。

(継承元 Context)
PowerService

#getSystemService(String)を使用して、"ウェイク ロック" を含む電源管理を制御するための を取得android.os.PowerManagerします。これにより、長いタスクを実行している間もデバイスをオンのままにできます。

(継承元 Context)
PrintService

android.print.PrintManager プリンターと印刷タスクの印刷と管理に使用できます。

(継承元 Context)
ReceiverExported
古い.

フラグ: #registerReceiver受信者は他のアプリからブロードキャストを受信できます。

(継承元 Context)
ReceiverNotExported
古い.

フラグ: #registerReceiver受信者は他のアプリからブロードキャストを受信できません。

(継承元 Context)
ReceiverVisibleToInstantApps
古い.

フラグ: #registerReceiver受信者はインスタント アプリからブロードキャストを受信できます。

(継承元 Context)
RestrictionsService

#getSystemService(String) を使用して、アプリケーションの制限を取得し、制限付き操作のアクセス許可を要求するための を取得 android.content.RestrictionsManager します。

(継承元 Context)
RoleService

ロールを管理するための を取得するには、 android.app.role.RoleManager#getSystemService(String) を使用します。

(継承元 Context)
SearchService

と を #getSystemService(String) 使用して、検索を処理するための を android.app.SearchManager 取得します。

(継承元 Context)
SensorService

と を #getSystemService(String) 使用して、センサーにアクセスするための を android.hardware.SensorManager 取得します。

(継承元 Context)
ShortcutService

ランチャー ショートカット サービスにアクセスするための をandroid.content.pm.ShortcutManager取得するには、 と #getSystemService(String) を使用します。

(継承元 Context)
StatusBarService

#getSystemService(String) を使用して、 android.app.StatusBarManager ステータス バーとクイック設定を操作するための を取得します。

(継承元 Context)
StorageService

#getSystemService(String) 使用して、システム ストレージ関数にアクセスするための を取得 android.os.storage.StorageManager します。

(継承元 Context)
StorageStatsService

#getSystemService(String) 使用して、システム ストレージ統計にアクセスするための を取得 android.app.usage.StorageStatsManager します。

(継承元 Context)
SystemHealthService

#getSystemService(String) 使用して、システムの正常性 (バッテリー、電源、メモリなど) メトリックにアクセスするための を取得 android.os.health.SystemHealthManager します。

(継承元 Context)
TelecomService

#getSystemService(String) 使用して を android.telecom.TelecomManager 取得し、デバイスの通信関連機能を管理します。

(継承元 Context)
TelephonyImsService

#getSystemService(String) 使用して を取得します android.telephony.ims.ImsManager

(継承元 Context)
TelephonyService

#getSystemService(String) 使用して、 android.telephony.TelephonyManager デバイスのテレフォニー機能を管理するための を取得します。

(継承元 Context)
TelephonySubscriptionService

#getSystemService(String) 使用して、 android.telephony.SubscriptionManager デバイスのテレフォニー サブスクリプションの管理を処理するための を取得します。

(継承元 Context)
TextClassificationService

テキスト分類サービスの を取得するには、 TextClassificationManager と を#getSystemService(String)使用します。

(継承元 Context)
TextServicesManagerService

#getSystemService(String) 使用して、テキスト サービスにアクセスするための を android.view.textservice.TextServicesManager 取得します。

(継承元 Context)
TvInputService

#getSystemService(String) 使用して、デバイス上の android.media.tv.TvInputManager テレビ入力と対話するための を取得します。

(継承元 Context)
TvInteractiveAppService

#getSystemService(String) 使用して、デバイス上の android.media.tv.interactive.TvInteractiveAppManager テレビ対話型アプリケーションと対話するための を取得します。

(継承元 Context)
UiModeService

と を #getSystemService(String) 使用して、 android.app.UiModeManager UI モードを制御するための を取得します。

(継承元 Context)
UsageStatsService

と を #getSystemService(String) 使用して、 android.app.usage.UsageStatsManager デバイスの使用状況統計のクエリを実行するための を取得します。

(継承元 Context)
UsbService

#getSystemService(String) 使用して、USB デバイス (USB ホストとして) にアクセスしたり、USB デバイスとしてのこのデバイスの動作を制御したりするために を取得 android.hardware.usb.UsbManager します。

(継承元 Context)
UserService

#getSystemService(String) 使用して、 android.os.UserManager 複数のユーザーをサポートするデバイスでユーザーを管理するための を取得します。

(継承元 Context)
VibratorManagerService

#getSystemService(String)を使用して、デバイスのバイブレータにアクセスするための を取得android.os.VibratorManagerし、個々のバイブレータと対話し、複数のバイブレータに対して同期効果を再生します。

(継承元 Context)
VibratorService

#getSystemService(String) を使用して、 android.os.Vibrator 振動ハードウェアと対話するための を取得します。

(継承元 Context)
VirtualDeviceService

#getSystemService(String) 使用して、仮想デバイスを管理するための を取得 android.companion.virtual.VirtualDeviceManager します。

(継承元 Context)
VpnManagementService

プラットフォームの組み込み VPN のプロファイルを管理する を取得android.net.VpnManagerするには、 と #getSystemService(String) を使用します。

(継承元 Context)
WallpaperService

と を #getSystemService(String) 使用して com を取得します。

(継承元 Context)
WifiAwareService

#getSystemService(String) 使用して、 を取得し、 android.net.wifi.aware.WifiAwareManager Wi-Fi Aware の管理を処理します。

(継承元 Context)
WifiP2pService

#getSystemService(String) 使用して、 を取得 android.net.wifi.p2p.WifiP2pManager し、Wi-Fi ピア ツー ピア接続の管理を処理します。

(継承元 Context)
WifiRttRangingService

#getSystemService(String)と を使用して、android.net.wifi.rtt.WifiRttManagerWiFi を使用してデバイスの範囲を指定するための を取得します。

(継承元 Context)
WifiService

#getSystemService(String)を使用して、android.net.wifi.WifiManagerWi-Fi アクセスの管理を処理するための を取得します。

(継承元 Context)
WindowService

#getSystemService(String) 使用して、システムのウィンドウ マネージャーにアクセスするための を取得 android.view.WindowManager します。

(継承元 Context)

プロパティ

ApplicationContext

現在のプロセスの単一のグローバル Application オブジェクトのコンテキストを返します。

ApplicationInfo

このコンテキストのパッケージの完全なアプリケーション情報を返します。

Assets

アプリケーションのパッケージの AssetManager インスタンスを返します。

AttributionSource

モック android.content.Context クラス。

(継承元 Context)
AttributionTag

属性は、複雑なアプリで使用して、アプリの一部を論理的に分離できます。

(継承元 Context)
CacheDir

ファイルシステム上のアプリケーション固有のキャッシュ ディレクトリへの絶対パスを返します。

Class

この Objectのランタイム クラスを返します。

(継承元 Object)
ClassLoader

このパッケージ内のクラスを取得するために使用できるクラス ローダーを返します。

CodeCacheDir

キャッシュされたコードを格納するために設計されたファイルシステム上のアプリケーション固有のキャッシュ ディレクトリへの絶対パスを返します。

ContentResolver

アプリケーションのパッケージの ContentResolver インスタンスを返します。

DataDir

モック android.content.Context クラス。

DeviceId

このコンテキストが関連付けられているデバイス ID を取得します。

(継承元 Context)
Display

このコンテキストが関連付けられている表示を取得します。

(継承元 Context)
ExternalCacheDir

プライマリ外部ファイルシステム (アプリケーションが所有するキャッシュ ファイルを配置できる場所) の ExternalStorageDirectory ディレクトリへの絶対パスを返します。

FilesDir

で作成されたファイルが格納されているファイル システム上のディレクトリへの絶対パスを OpenFileOutput(String, FileCreationMode) 返します。

Handle

基になる Android インスタンスへのハンドル。

(継承元 Object)
IsDeviceProtectedStorage

モック android.content.Context クラス。

IsRestricted

このコンテキストが制限されているかどうかを示します。

(継承元 Context)
IsUiContext

trueコンテキストが、、 android.app.WallpaperManager WallpaperManagerなどの WindowManagerandroid.view.LayoutInflater LayoutInflater UI コンポーネントにアクセスできる UI コンテキストである場合は を返します。

(継承元 Context)
JniIdentityHashCode

モック android.content.Context クラス。

(継承元 Object)
JniPeerMembers

モック android.content.Context クラス。

MainExecutor

このコンテキストにExecutor関連付けられているメイン スレッドでエンキューされたタスクを実行する を返します。

(継承元 Context)
MainLooper

現在のプロセスのメイン スレッドの Looper を返します。

NoBackupFilesDir

のようなファイルシステム上のディレクトリへの絶対パスを FilesDir返します。

ObbDir

このアプリケーションの OBB ファイル (存在する場合) が見つかるプライマリ外部ストレージ ディレクトリを返します。

OpPackageName

このコンテキストからの呼び出しに android.app.AppOpsManager 使用するパッケージ名を返します。これにより、アプリ運用マネージャーの uid 検証が名前で機能します。

(継承元 Context)
PackageCodePath

このコンテキストのプライマリ Android パッケージへの完全なパスを返します。

PackageManager

PackageManager インスタンスを返して、グローバル パッケージ情報を検索します。

PackageName

このアプリケーションのパッケージの名前を返します。

PackageResourcePath

このコンテキストのプライマリ Android パッケージへの完全なパスを返します。

Params

このコンテキストが を介して作成された場合は、 で作成されたパラメーターのセットを #createContext(ContextParams)返します。

(継承元 Context)
PeerReference

モック android.content.Context クラス。

(継承元 Object)
Resources

アプリケーションのパッケージの Resources インスタンスを返します。

Theme

このコンテキストに関連付けられている Theme オブジェクトを返します。

ThresholdClass

この API は Android 用 Mono インフラストラクチャをサポートしており、コードから直接使用することを意図したものではありません。

ThresholdType

この API は Android 用 Mono インフラストラクチャをサポートしており、コードから直接使用することを意図したものではありません。

Wallpaper
WallpaperDesiredMinimumHeight
WallpaperDesiredMinimumWidth

メソッド

BindService(Intent, Bind, IExecutor, IServiceConnection)

#bindService(Intent, ServiceConnection, int) bindService(Intent, ServiceConnection, int) ServiceConnection コールバックを制御する Executor と同じです。

(継承元 Context)
BindService(Intent, Context+BindServiceFlags, IExecutor, IServiceConnection)

モック android.content.Context クラス。

(継承元 Context)
BindService(Intent, IServiceConnection, Bind)

アプリケーション サービスに接続し、必要に応じて作成します。

BindService(Intent, IServiceConnection, Context+BindServiceFlags)

モック android.content.Context クラス。

(継承元 Context)
BindServiceAsUser(Intent, IServiceConnection, Context+BindServiceFlags, UserHandle)

モック android.content.Context クラス。

(継承元 Context)
BindServiceAsUser(Intent, IServiceConnection, Int32, UserHandle)

と同じ方法#bindServiceで、 user のサービスにバインドします。

(継承元 Context)
CheckCallingOrSelfPermission(String)

IPC の呼び出しプロセス 、特定のアクセス許可が付与されているかどうかを判断します。

CheckCallingOrSelfUriPermission(Uri, ActivityFlags)

IPC の呼び出しプロセス 、特定の URI にアクセスするためのアクセス許可が付与されているかどうかを判断します。

CheckCallingOrSelfUriPermissions(IList<Uri>, Int32)

IPC <em>または you</em> の呼び出しプロセスに URI の一覧へのアクセス許可が付与されているかどうかを確認します。

(継承元 Context)
CheckCallingPermission(String)

処理している IPC の呼び出しプロセスに特定のアクセス許可が付与されているかどうかを確認します。

CheckCallingUriPermission(Uri, ActivityFlags)

呼び出し元のプロセスとユーザー ID に、特定の URI にアクセスするためのアクセス許可が付与されているかどうかを確認します。

CheckCallingUriPermissions(IList<Uri>, Int32)

呼び出し元のプロセスとユーザー ID に URI の一覧にアクセスするためのアクセス許可が付与されているかどうかを確認します。

(継承元 Context)
CheckPermission(String, Int32, Int32)

システムで実行されている特定のプロセスとユーザー ID に対して、指定されたアクセス許可が許可されているかどうかを判断します。

CheckSelfPermission(String)

モック android.content.Context クラス。

CheckUriPermission(Uri, Int32, Int32, ActivityFlags)

特定のプロセスとユーザー ID に、特定の URI にアクセスするためのアクセス許可が付与されているかどうかを判断します。

CheckUriPermission(Uri, String, String, Int32, Int32, ActivityFlags)

Uri と通常のアクセス許可の両方を確認します。

CheckUriPermissions(IList<Uri>, Int32, Int32, Int32)

URI の一覧にアクセスするためのアクセス許可が特定のプロセスとユーザー ID に付与されているかどうかを判断します。

(継承元 Context)
ClearWallpaper()
Clone()

このオブジェクトのコピーを作成して返します。

(継承元 Object)
CreateAttributionContext(String)

現在の Context の新しい Context オブジェクトを返しますが、属性は別のタグに返します。

(継承元 Context)
CreateConfigurationContext(Configuration)

現在の Context の新しい Context オブジェクトを返しますが、そのリソースは特定の構成に合わせて調整されます。

CreateContext(ContextParams)

特定のプロパティと動作を持つコンテキストを作成します。

(継承元 Context)
CreateContextForSplit(String)

モック android.content.Context クラス。

CreateDeviceContext(Int32)

現在のコンテキストから新しい Context オブジェクトを返しますが、 によって指定されたデバイスの関連付けを使用します deviceId

(継承元 Context)
CreateDeviceProtectedStorageContext()

モック android.content.Context クラス。

CreateDisplayContext(Display)

現在の Context の新しい Context オブジェクトを返しますが、そのリソースは指定された Display のメトリックに合わせて調整されます。

CreatePackageContext(String, PackageContextFlags)

指定したアプリケーション名の新しい Context オブジェクトを返します。

CreateWindowContext(Display, Int32, Bundle)

Context指定Displayした に非android.app.Activity activityウィンドウの を作成します。

(継承元 Context)
CreateWindowContext(Int32, Bundle)

非アクティビティ ウィンドウのコンテキストを作成します。

(継承元 Context)
DatabaseList()

このコンテキストのアプリケーション パッケージに関連付けられているプライベート データベースに名前を付ける文字列の配列を返します。

DeleteDatabase(String)

このコンテキストのアプリケーション パッケージに関連付けられている既存のプライベート SQLiteDatabase を削除します。

DeleteFile(String)

このコンテキストのアプリケーション パッケージに関連付けられている特定のプライベート ファイルを削除します。

DeleteSharedPreferences(String)

モック android.content.Context クラス。

Dispose()

モック android.content.Context クラス。

(継承元 Object)
Dispose(Boolean)

モック android.content.Context クラス。

(継承元 Object)
EnforceCallingOrSelfPermission(String, String)

自分も、処理している IPC の呼び出しプロセスにも特定のアクセス許可が付与されていない場合は、 を SecurityExceptionスローします。

EnforceCallingOrSelfUriPermission(Uri, ActivityFlags, String)

IPC の呼び出しプロセス 、または 特定の URI にアクセスするためのアクセス許可が付与されていない場合は、 をスローします SecurityException

EnforceCallingPermission(String, String)

処理している IPC の呼び出しプロセスに特定のアクセス許可が付与されていない場合は、 をスローします SecurityException

EnforceCallingUriPermission(Uri, ActivityFlags, String)

呼び出し元のプロセスとユーザー ID に特定の URI にアクセスするためのアクセス許可が付与されていない場合は、 をスローします SecurityException

EnforcePermission(String, Int32, Int32, String)

システムで実行されている特定のプロセスとユーザー ID に対して、指定されたアクセス許可が許可されていない場合は、 を SecurityExceptionスローします。

EnforceUriPermission(Uri, Int32, Int32, ActivityFlags, String)

特定のプロセスとユーザー ID に特定の URI にアクセスするためのアクセス許可が付与されていない場合は、 をスローします SecurityException

EnforceUriPermission(Uri, String, String, Int32, Int32, ActivityFlags, String)

Uri と通常のアクセス許可の両方を適用します。

Equals(Object)

他のオブジェクトがこのオブジェクトと "等しい" かどうかを示します。

(継承元 Object)
FileList()

このコンテキストのアプリケーション パッケージに関連付けられているプライベート ファイルに名前を付ける文字列の配列を返します。

GetColor(Int32)

特定のリソース ID に関連付けられている色を返し、現在のテーマのスタイルを設定します。

(継承元 Context)
GetColorStateList(Int32)

特定のリソース ID に関連付け、現在のテーマのスタイルが設定された色の状態リストを返します。

(継承元 Context)
GetDatabasePath(String)

モック android.content.Context クラス。

GetDir(String, FileCreationMode)

アプリケーションが独自のカスタム データ ファイルを配置できる新しいディレクトリを取得し、必要に応じて作成します。

GetDrawable(Int32)

特定のリソース ID に関連付けられている描画可能なオブジェクトを返し、現在のテーマのスタイルを設定します。

(継承元 Context)
GetExternalCacheDirs()

アプリケーションが所有するキャッシュ ファイルを配置できるすべての外部ストレージ デバイス上のアプリケーション固有のディレクトリへの絶対パスを返します。

GetExternalFilesDir(String)

アプリケーションが所有する永続ファイルを配置できるプライマリ外部ファイルシステム (上のどこか) の ExternalStorageDirectoryディレクトリへの絶対パスを返します。

GetExternalFilesDirs(String)

アプリケーションが所有する永続ファイルを配置できるすべての外部ストレージ デバイス上のアプリケーション固有のディレクトリへの絶対パスを返します。

GetExternalMediaDirs()
古い.

アプリケーションがメディア ファイルを配置できるすべての外部ストレージ デバイス上のアプリケーション固有のディレクトリへの絶対パスを返します。

GetFileStreamPath(String)

で作成されたファイルが格納されているファイルシステムの絶対パスを OpenFileOutput(String, FileCreationMode) 返します。

GetHashCode()

オブジェクトのハッシュ コード値を返します。

(継承元 Object)
GetObbDirs()

アプリケーションの OBB ファイル (存在する場合) が見つかるすべての外部ストレージ デバイス上のアプリケーション固有のディレクトリへの絶対パスを返します。

GetSharedPreferences(String, FileCreationMode)

基本設定ファイル 'name' の内容を取得して保持し、値を取得および変更できる SharedPreferences を返します。

GetString(Int32)

アプリケーションのパッケージの既定の文字列テーブルからローカライズされた文字列を返します。

(継承元 Context)
GetString(Int32, Object[])

アプリケーションのパッケージの既定の文字列テーブルからローカライズされた文字列を返します。

(継承元 Context)
GetSystemService(Class)

クラスによってシステム レベルのサービスにハンドルを返します。

(継承元 Context)
GetSystemService(String)

名前でシステム レベルのサービスにハンドルを返します。

GetSystemServiceName(Class)

モック android.content.Context クラス。

GetText(Int32)

アプリケーションのパッケージの既定の文字列テーブルから、ローカライズされたスタイルの CharSequence を返します。

(継承元 Context)
GetTextFormatted(Int32)

アプリケーションのパッケージの既定の文字列テーブルから、ローカライズされたスタイルの CharSequence を返します。

(継承元 Context)
GrantUriPermission(String, Uri, ActivityFlags)

そのパッケージに URI のコンテンツ プロバイダーにアクセスするための一般的なアクセス許可があるかどうかに関係なく、特定の Uri にアクセスするアクセス許可を別のパッケージに付与します。

JavaFinalize()

ガベージ コレクションがオブジェクトへの参照がなくなったと判断したときに、オブジェクトのガベージ コレクターによって呼び出されます。

(継承元 Object)
MoveDatabaseFrom(Context, String)

モック android.content.Context クラス。

MoveSharedPreferencesFrom(Context, String)

モック android.content.Context クラス。

Notify()

このオブジェクトのモニターで待機している 1 つのスレッドをウェイクアップします。

(継承元 Object)
NotifyAll()

このオブジェクトのモニターで待機しているすべてのスレッドをウェイクアップします。

(継承元 Object)
ObtainStyledAttributes(IAttributeSet, Int32[])

このコンテキストのテーマでスタイル設定された属性情報を取得します。

(継承元 Context)
ObtainStyledAttributes(IAttributeSet, Int32[], Int32, Int32)

このコンテキストのテーマでスタイル設定された属性情報を取得します。

(継承元 Context)
ObtainStyledAttributes(Int32, Int32[])

このコンテキストのテーマでスタイル設定された属性情報を取得します。

(継承元 Context)
ObtainStyledAttributes(Int32[])

このコンテキストのテーマでスタイル設定された属性情報を取得します。

(継承元 Context)
OpenFileInput(String)

読み取りのために、このコンテキストのアプリケーション パッケージに関連付けられているプライベート ファイルを開きます。

OpenFileOutput(String, FileCreationMode)

このコンテキストのアプリケーション パッケージに関連付けられているプライベート ファイルを開いて書き込みます。

OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory)

このコンテキストのアプリケーション パッケージに関連付けられている新しいプライベート SQLiteDatabase を開きます。

OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory, IDatabaseErrorHandler)

このコンテキストのアプリケーション パッケージに関連付けられている新しいプライベート SQLiteDatabase を開きます。

PeekWallpaper()
RegisterComponentCallbacks(IComponentCallbacks)

Context の基本アプリケーションに新しい ComponentCallbacks を追加します。これは、アクティビティの ComponentCallbacks メソッドと同時に呼び出され、他のコンポーネントが呼び出されます。

(継承元 Context)
RegisterDeviceIdChangeListener(IExecutor, IIntConsumer)

新しいデバイス ID 変更リスナーを に Context追加します。これは、デバイスの関連付けがシステムによって変更されたときに呼び出されます。

(継承元 Context)
RegisterReceiver(BroadcastReceiver, IntentFilter)

メイン アクティビティ スレッドで実行する BroadcastReceiver を登録します。

RegisterReceiver(BroadcastReceiver, IntentFilter, ActivityFlags)
古い.

モック android.content.Context クラス。

RegisterReceiver(BroadcastReceiver, IntentFilter, ReceiverFlags)

モック android.content.Context クラス。

(継承元 Context)
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler)

スケジューラのコンテキストで実行するインテント ブロードキャストを受信するために登録します。

RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ActivityFlags)
古い.

モック android.content.Context クラス。

RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ReceiverFlags)

モック android.content.Context クラス。

(継承元 Context)
RemoveStickyBroadcast(Intent)
RemoveStickyBroadcastAsUser(Intent, UserHandle)
RevokeSelfPermissionOnKill(String)

ランタイム アクセス許可の非同期失効をトリガーします。

(継承元 Context)
RevokeSelfPermissionsOnKill(ICollection<String>)

呼び出し元パッケージに対する 1 つ以上のアクセス許可の失効をトリガーします。

(継承元 Context)
RevokeUriPermission(String, Uri, ActivityFlags)

モック android.content.Context クラス。

RevokeUriPermission(Uri, ActivityFlags)

System.String,Android.Net.Uri,Android.Net.Uri)で追加された特定のコンテンツ プロバイダー URI にアクセスするためのすべてのアクセス許可を削除します。

SendBroadcast(Intent)

特定の意図を関心のあるすべての BroadcastReceiver にブロードキャストします。

SendBroadcast(Intent, String)

特定の意図を関心のあるすべての BroadcastReceiver にブロードキャストし、必要なアクセス許可をオプションで適用できるようにします。

SendBroadcast(Intent, String, Bundle)

特定の意図を関心のあるすべての BroadcastReceiver にブロードキャストし、必要なアクセス許可をオプションで適用できるようにします。

(継承元 Context)
SendBroadcastAsUser(Intent, UserHandle)

ブロードキャストの SendBroadcast(Intent) 送信先のユーザーを指定できる のバージョン。

SendBroadcastAsUser(Intent, UserHandle, String)

ブロードキャストの SendBroadcast(Intent, String) 送信先のユーザーを指定できる のバージョン。

SendBroadcastWithMultiplePermissions(Intent, String[])

必要なすべての BroadcastReceivers に指定された意図をブロードキャストし、必要なアクセス許可の配列を適用できるようにします。

(継承元 Context)
SendOrderedBroadcast(Intent, String)

モック android.content.Context クラス。

SendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, Result, String, Bundle)

SendBroadcast(Intent)のバージョンでは、ブロードキャストからデータを受信できます。

SendOrderedBroadcast(Intent, String, Bundle)

特定の意図を関心のあるすべての BroadcastReceiver にブロードキャストし、一度に 1 つずつ配信して、より優先する受信者が優先されていない受信者に配信される前にブロードキャストを使用できるようにします。

(継承元 Context)
SendOrderedBroadcast(Intent, String, Bundle, BroadcastReceiver, Handler, Result, String, Bundle)

#sendBroadcast(Intent)ブロードキャストからデータを受信できる のバージョン。

(継承元 Context)
SendOrderedBroadcast(Intent, String, String, BroadcastReceiver, Handler, Result, String, Bundle)

#sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)のバージョンを使用すると、ブロードキャストの送信先の受信者に制限を適用する App Op を指定できます。

(継承元 Context)
SendOrderedBroadcastAsUser(Intent, UserHandle, String, BroadcastReceiver, Handler, Result, String, Bundle)

モック android.content.Context クラス。

SendStickyBroadcast(Intent)
SendStickyBroadcast(Intent, Bundle)

#sendBroadcast(Intent)"固定" である を実行します。つまり、ブロードキャストが完了した後も送信する意図が維持されるため、他のユーザーは の#registerReceiver(BroadcastReceiver, IntentFilter)戻り値を使用してそのデータをすばやく取得できます。

(継承元 Context)
SendStickyBroadcastAsUser(Intent, UserHandle)
SendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, Result, String, Bundle)
SendStickyOrderedBroadcastAsUser(Intent, UserHandle, BroadcastReceiver, Handler, Result, String, Bundle)
SetHandle(IntPtr, JniHandleOwnership)

Handle プロパティを設定します。

(継承元 Object)
SetTheme(Int32)

このコンテキストの基本テーマを設定します。

SetWallpaper(Bitmap)
SetWallpaper(Stream)
StartActivities(Intent[])

StartActivities(Intent[], Bundle)オプションが指定されていない場合と同じです。

StartActivities(Intent[], Bundle)

複数の新しいアクティビティを起動します。

StartActivity(Intent)

StartActivity(Intent, Bundle)オプションが指定されていない場合と同じです。

StartActivity(Intent, Bundle)

新しいアクティビティを起動します。

StartActivity(Type)

モック android.content.Context クラス。

(継承元 Context)
StartForegroundService(Intent)

モック android.content.Context クラス。

StartInstrumentation(ComponentName, String, Bundle)

クラスの実行を開始します Instrumentation

StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32)

モック android.content.Context クラス。

StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32, Bundle)

と同様 StartActivity(Intent, Bundle)ですが、IntentSender を使用して開始します。

StartService(Intent)

特定のアプリケーション サービスを開始することを要求します。

StopService(Intent)

特定のアプリケーション サービスを停止することを要求します。

ToArray<T>()

モック android.content.Context クラス。

(継承元 Object)
ToString()

オブジェクトの文字列形式を返します。

(継承元 Object)
UnbindService(IServiceConnection)

アプリケーション サービスから切断します。

UnregisterComponentCallbacks(IComponentCallbacks)

以前に ComponentCallbacks に登録されていた オブジェクトを #registerComponentCallbacks(ComponentCallbacks)削除します。

(継承元 Context)
UnregisterDeviceIdChangeListener(IIntConsumer)

コンテキストからデバイス ID 変更リスナーを削除します。

(継承元 Context)
UnregisterFromRuntime()

モック android.content.Context クラス。

(継承元 Object)
UnregisterReceiver(BroadcastReceiver)

以前に登録した BroadcastReceiver の登録を解除します。

UpdateServiceGroup(IServiceConnection, Int32, Int32)

以前に または 関連するメソッドで #bindService バインドされたサービスの場合は、他のプロセスに関連してそのサービスのプロセスをシステムが管理する方法を変更します。

(継承元 Context)
Wait()

現在のスレッドが起動するまで待機します。通常<>は、通知</em> または <em>割り込み</em によって待機します>。

(継承元 Object)
Wait(Int64)

現在のスレッドが起動するまで待機します。通常<>は、通知</em> または>< em 割り込み</em>、または一定のリアルタイムが経過するまで待機します。

(継承元 Object)
Wait(Int64, Int32)

現在のスレッドが起動するまで待機します。通常<>は、通知</em> または>< em 割り込み</em>、または一定のリアルタイムが経過するまで待機します。

(継承元 Object)

明示的なインターフェイスの実装

IJavaPeerable.Disposed()

モック android.content.Context クラス。

(継承元 Object)
IJavaPeerable.DisposeUnlessReferenced()

モック android.content.Context クラス。

(継承元 Object)
IJavaPeerable.Finalized()

モック android.content.Context クラス。

(継承元 Object)
IJavaPeerable.JniManagedPeerState

モック android.content.Context クラス。

(継承元 Object)
IJavaPeerable.SetJniIdentityHashCode(Int32)

モック android.content.Context クラス。

(継承元 Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)

モック android.content.Context クラス。

(継承元 Object)
IJavaPeerable.SetPeerReference(JniObjectReference)

モック android.content.Context クラス。

(継承元 Object)

拡張メソッド

JavaCast<TResult>(IJavaObject)

Android ランタイムチェック型変換を実行します。

JavaCast<TResult>(IJavaObject)

モック android.content.Context クラス。

GetJniTypeName(IJavaPeerable)

モック android.content.Context クラス。

適用対象