MediaProjectionManager.CreateScreenCaptureIntent 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| CreateScreenCaptureIntent() |
傳 |
| CreateScreenCaptureIntent(MediaProjectionConfig) |
傳 |
CreateScreenCaptureIntent()
傳Intent<>回 b 必須<>傳遞至 Activity#startActivityForResult(Intent, int) (或類似的) 以啟動螢幕擷取的 。
[Android.Runtime.Register("createScreenCaptureIntent", "()Landroid/content/Intent;", "")]
public Android.Content.Intent CreateScreenCaptureIntent();
[<Android.Runtime.Register("createScreenCaptureIntent", "()Landroid/content/Intent;", "")>]
member this.CreateScreenCaptureIntent : unit -> Android.Content.Intent
傳回
- 屬性
備註
傳Intent<>回 b 必須<>傳遞至 Activity#startActivityForResult(Intent, int) (或類似的) 以啟動螢幕擷取的 。 活動會提示使用者是否允許螢幕擷取。 此活動的結果(由覆寫 Activity#onActivityResult(int, int, Intent) onActivityResult(int, int, Intent)所接收)應傳遞至 #getMediaProjection(int, Intent)。
與使用MediaProjectionConfig#createConfigForUserChoice()呼叫#createScreenCaptureIntent(MediaProjectionConfig)相同。
當呼叫的應用程式不想自訂向使用者顯示的活動時,應該使用 #createScreenCaptureIntent(MediaProjectionConfig) 而非 。
的 android.media.projection.MediaProjectionManager.createScreenCaptureIntent()Java 檔。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
CreateScreenCaptureIntent(MediaProjectionConfig)
傳Intent<>回 b 必須<>傳遞至 Activity#startActivityForResult(Intent, int) (或類似的) 以啟動螢幕擷取的 。
[Android.Runtime.Register("createScreenCaptureIntent", "(Landroid/media/projection/MediaProjectionConfig;)Landroid/content/Intent;", "", ApiSince=34)]
public Android.Content.Intent CreateScreenCaptureIntent(Android.Media.Projection.MediaProjectionConfig config);
[<Android.Runtime.Register("createScreenCaptureIntent", "(Landroid/media/projection/MediaProjectionConfig;)Landroid/content/Intent;", "", ApiSince=34)>]
member this.CreateScreenCaptureIntent : Android.Media.Projection.MediaProjectionConfig -> Android.Content.Intent
參數
- config
- MediaProjectionConfig
MediaProjection Intent這個要求使用者同意的 自定義。
傳回
Intent要求使用者同意的 ,根據指定的組態特製化。
- 屬性
備註
傳Intent<>回 b 必須<>傳遞至 Activity#startActivityForResult(Intent, int) (或類似的) 以啟動螢幕擷取的 。 根據提供的 config自定義活動和產生的MediaProjection工作階段。 活動會提示使用者是否允許螢幕擷取。 此活動的結果(由覆寫 Activity#onActivityResult(int, int, Intent) onActivityResult(int, int, Intent)所接收)應傳遞至 #getMediaProjection(int, Intent)。
如果 MediaProjectionConfig 建立自: <ul><li>MediaProjectionConfig#createConfigForDefaultDisplay(),則會建立 Intent 以擷取預設顯示器的 。 活動會將用戶的選擇限制為只指定顯示。 </li li>>MediaProjectionConfig#createConfigForUserChoice()<,然後建立 Intent ,以延遲要擷取給用戶的區域。 這可讓用戶的行為與呼叫 #createScreenCaptureIntent()相同。 活動可讓用戶選擇 android.view.Display#DEFAULT_DISPLAY、 或不同的區域。 </li></ul>
當呼叫端應用程式想要自訂向使用者顯示的活動時,應該使用 而不是 #createScreenCaptureIntent() 。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。