Initiating YouTube Live Streams on Android Devices
Stay organized with collections
Save and categorize content based on your preferences.
The YouTube Mobile Live deep link enables Android applications to initiate a YouTube live stream directly from a mobile device. An app only needs to provide an entry point, such as a button that the user can click, that starts the Mobile Live flow via the Android Intent mechanism.
Example
This flow shows the user experience for an app that deep links into the YouTube application, where the user lands on the Mobile Live Stream Setup screen.
- First, the user configures the stream, setting the title, privacy mode, and other stream options.
- Then, the user navigates to the Thumbnail Photo screen to set a thumbnail image for the stream.
- Finally, the user starts the live stream and broadcasts the view from the front or rear camera.
Device Requirements
Android devices must meet the following requirements to properly support YouTube live streaming and the Mobile Live deep link:
- Android release: Marshmallow (API 23) or higher
- Camera: At least one camera capable of recording 720p at at least 30Hz
- Microphone: Onboard microphone
- Audio encoder: Hardware accelerated audio encoder capable of encoding 8-bit PCM mono audio to AAC at 44.1KHz or better
- Video encoder: Hardware accelerated video encoder capable of encoding 720P raw video to H.264/AVC at 30Hz or better
- YouTube app installed: Version 13.02 or higher
Mobile Live Intent specification
To link into the YouTube Mobile live streaming flow, your Android app launches an Intent. The Intent initiates the live streaming process by starting an Activity in the YouTube application.
The Mobile Live Intent uses a custom Action
string to navigate to the live creation Activity within the YouTube app. It also specifies the package name for the YouTube mobile app.
- Action: “
com.google.android.youtube.intent.action.CREATE_LIVE_STREAM
”
- Package: "
com.google.android.youtube
"
The YouTube application setup flow handles the stream configuration. The following Intent extras set parameters associated with the live stream:
Params |
Intent.EXTRA_REFERRER |
Required. This parameter specifies a URI that represents the application launching the live streaming Activity. This value must follow the android-app: scheme format with a package name. The value enables accurate attribution and accounting. |
Intent.EXTRA_SUBJECT |
Optional. This parameter provides a text description of the live stream. It is placed in the Intent extras bundle as a String. The value can be used to annotate the stream with a branded message, such as "Streamed live from DEVICE". |
Launching the live streaming flow
Step 1: Check for support
Your client should first confirm that the Mobile Live Intent can be launched by verifying that the YouTube app is installed on the device and that the YouTube app version supports live streaming. The following code sample defines two methods to do that:
- The
canResolveMobileLiveIntent
method verifies that the device supports the Mobile Live Intent.
- The
validateMobileLiveIntent
calls the canResolveMobileLiveIntent
method in the context of an if-else
statement.
- If the device supports the Intent, then the device could launch the live stream flow.
- If the device does not support the Intent, then the device could prompt the user to install or upgrade the YouTube app.
private boolean canResolveMobileLiveIntent(Context context) {
Intent intent = new Intent("com.google.android.youtube.intent.action.CREATE_LIVE_STREAM")
.setPackage("com.google.android.youtube");
PackageManager pm = context.getPackageManager();
List resolveInfo =
pm.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
return resolveInfo != null && !resolveInfo.isEmpty();
}
private void validateMobileLiveIntent(Context context) {
if (canResolveMobileLiveIntent(context)) {
// Launch the live stream Activity
} else {
// Prompt user to install or upgrade the YouTube app
}
}
Step 2: Launch the live stream activity
To start the live streaming flow, your client app creates and launches an Intent as shown in the following code sample:
private Intent createMobileLiveIntent(Context context, String description) {
Intent intent = new Intent("com.google.android.youtube.intent.action.CREATE_LIVE_STREAM")
.setPackage("com.google.android.youtube");
Uri referrer = new Uri.Builder()
.scheme("android-app")
.appendPath(context.getPackageName())
.build();
intent.putExtra(Intent.EXTRA_REFERRER, referrer);
if (!TextUtils.isEmpty(description)) {
intent.putExtra(Intent.EXTRA_SUBJECT, description);
}
return intent;
}
private void startMobileLive(Context context) {
Intent mobileLiveIntent = createMobileLiveIntent(context, "Streaming via ...");
startActivity(mobileLiveIntent);
}
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThe YouTube Mobile Live deep link allows Android apps to initiate YouTube live streams directly, requiring an entry point within the app to trigger the flow.\u003c/p\u003e\n"],["\u003cp\u003eAndroid devices need Marshmallow (API 23) or higher, camera, microphone, audio/video encoders, and YouTube app (v13.02+) to support Mobile Live.\u003c/p\u003e\n"],["\u003cp\u003eTo deep link, apps must use a specific Intent format with the action \u003ccode\u003ecom.google.android.youtube.intent.action.CREATE_LIVE_STREAM\u003c/code\u003e and package \u003ccode\u003ecom.google.android.youtube\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eApps need to include a referrer URI for attribution and can optionally add a stream description using Intent extras.\u003c/p\u003e\n"],["\u003cp\u003eBefore launching, apps should verify device compatibility and YouTube app installation to ensure a smooth user experience.\u003c/p\u003e\n"]]],["Android apps can initiate YouTube live streams via a Mobile Live deep link. This requires creating an Android Intent with the action `com.google.android.youtube.intent.action.CREATE_LIVE_STREAM` and the package `com.google.android.youtube`. The Intent must include `EXTRA_REFERRER` (app's package name) and optionally `EXTRA_SUBJECT` (stream description). Before launching, apps should verify YouTube app compatibility and necessary device features, including Android Marshmallow or higher, specific camera, microphone, and encoder requirements. The user then configures the stream and starts broadcasting.\n"],null,["# Initiating YouTube Live Streams on Android Devices\n\nThe YouTube Mobile Live deep link enables Android applications to initiate a YouTube live stream directly from a mobile device. An app only needs to provide an entry point, such as a button that the user can click, that starts the Mobile Live flow via the Android Intent mechanism.\n\nExample\n-------\n\nThis flow shows the user experience for an app that deep links into the YouTube application, where the user lands on the Mobile Live Stream Setup screen.\n\n1. First, the user configures the stream, setting the title, privacy mode, and other stream options.\n2. Then, the user navigates to the Thumbnail Photo screen to set a thumbnail image for the stream.\n3. Finally, the user starts the live stream and broadcasts the view from the front or rear camera.\n\nDevice Requirements\n-------------------\n\nAndroid devices must meet the following requirements to properly support YouTube live streaming and the Mobile Live deep link:\n\n- **Android release:** Marshmallow (API 23) or higher\n- **Camera:** At least one camera capable of recording 720p at at least 30Hz\n- **Microphone:** Onboard microphone\n- **Audio encoder:** Hardware accelerated audio encoder capable of encoding 8-bit PCM mono audio to AAC at 44.1KHz or better\n- **Video encoder:** Hardware accelerated video encoder capable of encoding 720P raw video to H.264/AVC at 30Hz or better\n- **YouTube app installed:** Version 13.02 or higher\n\nMobile Live Intent specification\n--------------------------------\n\nTo link into the YouTube Mobile live streaming flow, your Android app launches an [Intent](https://developer.android.com/reference/android/content/Intent.html). The Intent initiates the live streaming process by starting an [Activity](https://developer.android.com/guide/components/activities.html) in the YouTube application.\n\n### Intent format\n\nThe Mobile Live Intent uses a custom `Action` string to navigate to the live creation Activity within the YouTube app. It also specifies the package name for the YouTube mobile app.\n\n- [Action](https://developer.android.com/reference/android/content/Intent.html#setAction(java.lang.String)): \"`com.google.android.youtube.intent.action.CREATE_LIVE_STREAM`\"\n- [Package](https://developer.android.com/reference/android/content/Intent.html#setPackage(java.lang.String)): \"`com.google.android.youtube`\"\n\n### Intent extras\n\nThe YouTube application setup flow handles the stream configuration. The following Intent extras set parameters associated with the live stream:\n\n| Params ||\n|-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Intent.[EXTRA_REFERRER](https://developer.android.com/reference/android/content/Intent.html#EXTRA_REFERRER)** | **Required** . This parameter specifies a URI that represents the application launching the live streaming Activity. This value must follow the [android-app: scheme](https://developer.android.com/reference/android/content/Intent.html#URI_ANDROID_APP_SCHEME) format with a package name. The value enables accurate attribution and accounting. |\n| **Intent.[EXTRA_SUBJECT](https://developer.android.com/reference/android/content/Intent.html#EXTRA_SUBJECT)** | **Optional** . This parameter provides a text description of the live stream. It is placed in the Intent extras bundle as a [String](https://developer.android.com/reference/java/lang/String.html). The value can be used to annotate the stream with a branded message, such as \"Streamed live from DEVICE\". |\n\nLaunching the live streaming flow\n---------------------------------\n\n### Step 1: Check for support\n\nYour client should first confirm that the Mobile Live Intent can be launched by verifying that the YouTube app is installed on the device and that the YouTube app version supports live streaming. The following code sample defines two methods to do that:\n\n- The `canResolveMobileLiveIntent` method verifies that the device supports the Mobile Live Intent.\n- The `validateMobileLiveIntent` calls the `canResolveMobileLiveIntent` method in the context of an `if-else` statement.\n - If the device supports the Intent, then the device could launch the live stream flow.\n - If the device does not support the Intent, then the device could prompt the user to install or upgrade the YouTube app.\n\n```scdoc\nprivate boolean canResolveMobileLiveIntent(Context context) {\n Intent intent = new Intent(\"com.google.android.youtube.intent.action.CREATE_LIVE_STREAM\")\n .setPackage(\"com.google.android.youtube\");\n PackageManager pm = context.getPackageManager();\n List resolveInfo = \n pm.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);\n return resolveInfo != null && !resolveInfo.isEmpty();\n}\n\n\nprivate void validateMobileLiveIntent(Context context) {\n if (canResolveMobileLiveIntent(context)) {\n // Launch the live stream Activity\n } else {\n // Prompt user to install or upgrade the YouTube app\n }\n}\n```\n\n### Step 2: Launch the live stream activity\n\nTo start the live streaming flow, your client app creates and launches an Intent as shown in the following code sample: \n\n```scdoc\nprivate Intent createMobileLiveIntent(Context context, String description) {\n Intent intent = new Intent(\"com.google.android.youtube.intent.action.CREATE_LIVE_STREAM\")\n .setPackage(\"com.google.android.youtube\");\n Uri referrer = new Uri.Builder()\n .scheme(\"android-app\")\n .appendPath(context.getPackageName())\n .build();\n\n intent.putExtra(Intent.EXTRA_REFERRER, referrer);\n if (!TextUtils.isEmpty(description)) {\n intent.putExtra(Intent.EXTRA_SUBJECT, description);\n }\n return intent;\n}\n\n\nprivate void startMobileLive(Context context) {\n Intent mobileLiveIntent = createMobileLiveIntent(context, \"Streaming via ...\");\n startActivity(mobileLiveIntent);\n}\n```"]]