检查是否安装了sopcast,不起作用

时间:2015-07-04 19:28:52

标签: android video-streaming

我已经开始了几个星期并更新了一个应用程序自己,试图学习尽可能多。

但是我有一个问题,这个代码适用于xmtv播放器,但是sopcast无法正常工作,看到没有安装sopcast。请帮忙。谢谢。

Intent intent = new Intent();

            intent.setComponent(new ComponentName("org.sopcast.android","org.sopcast.android"));
            PackageManager pm = getPackageManager();
            List<ResolveInfo> activities = pm.queryIntentActivities(intent, 0);
            if (activities != null && activities.size() > 0) {


                startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("sop://broker.sopcast.com:3912/253035")));



            }
            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();








                startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.sopcast.org/download/android.html")));




            }

0 个答案:

没有答案