本文整理匯總了Java中android.media.projection.MediaProjectionManager.createScreenCaptureIntent方法的典型用法代碼示例。如果您正苦於以下問題:Java MediaProjectionManager.createScreenCaptureIntent方法的具體用法?Java MediaProjectionManager.createScreenCaptureIntent怎麽用?Java MediaProjectionManager.createScreenCaptureIntent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.media.projection.MediaProjectionManager
的用法示例。
在下文中一共展示了MediaProjectionManager.createScreenCaptureIntent方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: fireScreenCaptureIntent
import android.media.projection.MediaProjectionManager; //導入方法依賴的package包/類
public static void fireScreenCaptureIntent(Activity activity ) {
MediaProjectionManager manager =
(MediaProjectionManager) activity.getSystemService(MEDIA_PROJECTION_SERVICE);
Intent intent = manager.createScreenCaptureIntent();
activity.startActivityForResult(intent, CREATE_SCREEN_CAPTURE);
}
示例2: createScreenCaptureIntent
import android.media.projection.MediaProjectionManager; //導入方法依賴的package包/類
public void createScreenCaptureIntent() {
LogUtil.LOGI("startActivityForResult");
MediaProjectionManager projectionManager = (MediaProjectionManager) getSystemService(Context.MEDIA_PROJECTION_SERVICE);
Intent intent = projectionManager.createScreenCaptureIntent();
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivityForResult(intent, PERMISSION_CODE_MEDIA_PROJECTION);
}
示例3: fireScreenCaptureIntent
import android.media.projection.MediaProjectionManager; //導入方法依賴的package包/類
static void fireScreenCaptureIntent(Activity activity, Analytics analytics) {
MediaProjectionManager manager =
(MediaProjectionManager) activity.getSystemService(MEDIA_PROJECTION_SERVICE);
Intent intent = manager.createScreenCaptureIntent();
activity.startActivityForResult(intent, CREATE_SCREEN_CAPTURE);
analytics.send(new HitBuilders.EventBuilder() //
.setCategory(Analytics.CATEGORY_SETTINGS)
.setAction(Analytics.ACTION_CAPTURE_INTENT_LAUNCH)
.build());
}
示例4: requestCapture
import android.media.projection.MediaProjectionManager; //導入方法依賴的package包/類
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private void requestCapture() {
MediaProjectionManager projectionManager =
(MediaProjectionManager) getSystemService(Context.MEDIA_PROJECTION_SERVICE);
Intent intent = projectionManager.createScreenCaptureIntent();
requestStartTime = System.currentTimeMillis();
startActivityForResult(intent, REQUEST_CODE);
}