In this video it explains about the “Android Device Streaming” option to run virtual Android device or emulator in Android Studio environment.
As per formal documentation, it states below:
Android Device Streaming, powered by Firebase, provides secure direct ADB access to a wide range of Android devices, which you can use to debug and interact with your app.
Android Device Streaming is a Beta service and may encounter service disruptions or issues as performance improves. Select a Firebase Spark plan project for limited access at no cost, or select a Blaze project for pay-as-you-go access that’s billed monthly.
For details and pricing related information refer below documentation links:
https://developer.android.com/studio/run/android-device-streaming
https://firebase.google.com/docs/test-lab/usage-quotas-pricing#device-streaming
I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: programmerworld1990@gmail.com
Code:
package com.programmerworld.androiddevicestreamingdemoapp;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
public class MainActivity extends AppCompatActivity {
private TextView textView;
private int i = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_main);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
textView = findViewById(R.id.textView);
return insets;
});
}
public void buttonCounter(View view){
textView.setText(String.valueOf(++i));
}
}
Screenshots:





Details:
https://developer.android.com/studio/run/android-device-streaming

Pricing Details:
https://firebase.google.com/docs/test-lab/usage-quotas-pricing#device-streaming

Android Device Streaming quotas
Note: This feature is subject to the “Pre-GA Offerings Terms” in the General Service Terms section of the Service Specific Terms. Pre-GA features are available “as is” and might have limited support. For more information, see the launch stage descriptions.
Usage is limited, and billing usage will be introduced at a later date.
- Starting on June 1, 2024, for a promotional period:
- (no cost) Spark plan: 120 no cost minutes per project, per month
- Blaze plan: 120 no cost minutes per project, per month, 15 cents for each additional minute
- On or around February, 2025, the promotional period will end and billing will be based on the following quota limits:
- (no cost) Spark plan: 30 no cost minutes per project, per month
- Blaze plan: 30 no cost minutes per project, per month, 15 cents for each additional minute
Not all projects in the Blaze plan have the same quotas. If your usage of Google Cloud console increases over time, your quotas might increase correspondingly. If you expect a sizable upcoming increase in usage, you can proactively request quota adjustments.