我试图从主代码xmtv提供的网络播放器改变一点。但不会像我一样。 原则上不是开放视频广告。或者如果打开未显示在页面中,则不会在我的帐户中编号。
我做错了什么? 这是源头 http://xmtvplayer.com/monetization
private void canalda2buton() {
Button accionentrar = (Button) findViewById(R.id.bCanalD2);
accionentrar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.xmtvplayer.watch.live.streams","org.zeipel.videoplayer.XMTVPlayer"));
PackageManager pm = getPackageManager();
List<ResolveInfo> activities = pm.queryIntentActivities(intent, 0);
if (activities != null && activities.size() > 0) {
Bundle bnd = new Bundle();
bnd.putBoolean("NoExitPrompt", true); // Exit from player with one click of back button
bnd.putString("adszone", "adqnq3hq-14zlpp44-vuutd"); // change adszone with your own id.
bnd.putInt("adstime", 30);
Intent i = new Intent();
i.setPackage("com.xmtvplayer.watch.live.streams");
i.setDataAndType(Uri.parse("http://80.86.107.169:8100/stream.flv"), "video/*");
i.setClassName("com.xmtvplayer.watch.live.streams", "org.zeipel.videoplayer.XMTVPlayer");
i.putExtras(bnd);
startActivityForResult(i, 100);
}
else {
final Toast tag = Toast.makeText(getBaseContext(), "Te rog Instaleaza Playerul Necesar pentru a putea vizualiza canalul dorit!",Toast.LENGTH_SHORT);
tag.show();
new CountDownTimer(9000, 1000)
{
public void onTick(long millisUntilFinished) {tag.show();}
public void onFinish() {tag.show();}
}.start();
Intent goToMarket = new Intent(Intent.ACTION_VIEW)
.setData(Uri.parse("market://details?id=com.xmtvplayer.watch.live.streams"));
startActivity(goToMarket);
}
}
});
}
答案 0 :(得分:0)
您定义的adzone是来自AdIquity的ID,要开始接收广告,您必须填写“如何获利”一节中定义的表单,以便从我们这里收到与您相关的广告ID。这是必需的,因为我们正在尝试向XMTV播放器添加更多广告网络。目前我为你定义了id为“50CDFE59-47DC-4DBD-B7EE-9BCE6E81C101”的id。请在您的代码中更改它。还改变了你传递Video Uri的方式:
i.setDataAndType(Uri.parse(“http://80.86.107.169:8100/stream.flv”), “video/*”);
与
bnd.putString(“path”, uri);
bnd.putString(“name”, Title);