In this video it shows the steps to connect Android TV to Android Studio environment over WIFI for debugging the App’s code.
Two simple Steps which needs to be followed:
- Android TV – Enabled Developer Options. Get IP Address.
- Android Studio – Connect to the TV using IP Address
Command for connecting: Android Debug Bridge (adb)
>> adb connect <IP_Address>
‘ADB.exe’ command is in the following path. Either change to the below path in the Terminal or add it in the PATH variable of your OS.
C:>where adb
C:\Users\USERNAME\AppData\Local\Android\Sdk\platform-tools\adb.exe
Kindly make sure that both Laptop (running Android Studio) and Android TV are on the same WIFI network and the IP address of the TV is accessible from the laptop.
In this video it uses MiTV for demonstration.
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
Complete details/ steps of this video:
package com.programmerworld.connectiontoandroidtvapp;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
private TextView textView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = findViewById(R.id.textView);
}
public void buttonToggle(View view){
if (textView.getText().equals("Programmer World")){
textView.setText("Hello World");
} else {
textView.setText("Programmer World");
}
}
}
Command to connect >> Android Debug Bridge (adb)
PS C:\Work\ConnectiontoAndroidTVApp> adb connect 192.168.1.7
Location/ Path of adb.exe:
C:\>where adb
C:\Users\abhis\AppData\Local\Android\Sdk\platform-tools\adb.exe
C:\>
Excerpt:
The content describes the process of connecting Android TV to the Android Studio environment over WIFI for app code debugging. Two main steps are provided: activate Developer Options and get IP Address on Android TV, then use this IP Address to connect to the TV from Android Studio using Android Debug Bridge (adb). The ‘adb.exe’ command path is provided, and it’s reminded to ensure both Laptop (running Android Studio) and Android TV