Android 如何在安卓系统中进行3g视频通话

Android 如何在安卓系统中进行3g视频通话,android,videochat,Android,Videochat,我正在开发一个应用程序,其中包含短信,音频通话和通话记录历史。但我还需要将视频通话添加到我的应用程序中。我尝试了如下代码,但它引发ActivityNotFoundException。 请帮我打视频电话 Intent callIntent = new Intent("com.android.phone.videocall"); callIntent.putExtra("videocall", true); callIntent.set

我正在开发一个应用程序,其中包含短信,音频通话和通话记录历史。但我还需要将视频通话添加到我的应用程序中。我尝试了如下代码,但它引发ActivityNotFoundException。 请帮我打视频电话

Intent callIntent = new Intent("com.android.phone.videocall");
                callIntent.putExtra("videocall", true);
                callIntent.setData(Uri.parse("tel:" + number));
                callIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(callIntent);

任何帮助都将收到。…

您可以检查对象的引用是否为
null

if(acode == null || acode.equals("")) {

}
如果acode为null或不为null且等于空字符串,则该条件为true。 另外,你可以使用android

   if (TextUtils.isEmpty(acode)) {
   }
这将检查null和空字符串,使if条件更加紧凑。从
isEmpty

如果字符串为null或长度为0,则返回true


考虑到您正在Android上开发,一个优雅的解决方案是:

if (TextUtils.isEmpty(acode)) {
    // do something here
}
请参阅:

使用

TextUtils.isEmpty(acode)

并检查空字符串和空字符串

您可以这样尝试

如果(acode!=null | | acode.lenght()=0)
{
//等于空代码
}
否则
{
//不等于空您的代码
}