本人微信,欢迎交流:mantis2340
导入jar包:framework.jar
接口:
import android.content.Intent;
import android.media.tv.TvContract;
import android.net.Uri;
private static final String ACTION_START_TV_PLAYER_AV1 = "com.mediatek.tvinput/.composite.CompositeInputService/HW2";
private static final String ACTION_START_TV_PLAYER_HDMI1 = "com.mediatek.tvinput/.hdmi.HDMIInputService/HW5";
private static final String ACTION_START_TV_PLAYER_HDMI2 = "com.mediatek.tvinput/.hdmi.HDMIInputService/HW6";
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = null;
uri = TvContract.buildChannelUriForPassthroughInput(ACTION_START_TV_PLAYER_AV1);//HDMI HDMI2 COMPOSITE
intent.setData(uri);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
网友评论