我相信这是正确的版本,不明白为什么会出现错误。日志中没有任何内容出现。当从应用程序发送“url”到应用程序B出现错误,并中止所有。应用程序A将URL发送到应用程序B
应用A按钮
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.putExtra("url", "http://46.182.25.34:1935/tv/1420/playlist.m3u8");
intent.setPackage("ro.vrt.exo");
intent.setClassName("ro.vrt.exo", "ro.vrt.exo.MainActivity");
startActivity(intent);
应用B(小型播放)
Bundle bundle = getIntent().getExtras();
String url = bundle.getString("url");
emVideoView = (EMVideoView)findViewById(R.id.video_play_activity_video_view);
emVideoView.setOnPreparedListener(this);
//For now we just picked an arbitrary item to play. More can be found at
//https://archive.org/details/more_animation
emVideoView.setVideoURI(Uri.parse(url));
你应该发布你得到的错误。 – user3804769
作为两个不同的应用程序模拟器什么都没有出现只有应用程序停止 –
放在你的代码周围尝试/抓住并显示你在烤面包中捕获的错误。 – StephaneM