Java skype视频通话的eclipse代码

Java skype视频通话的eclipse代码,java,android,skype,Java,Android,Skype,我正在寻找一个Eclipse演示Android上Skype视频通话的示例项目。我已经尝试了许多来自Stack Overflow的Skype intent实现,但无法构建或运行项目。我是一个初学者,所以我需要一个完整的实现和项目,我可以导入,以及在Eclipse上执行此操作的说明 以下代码显示我的应用程序的当前状态: package com.example.newpro; import android.net.Uri; import android.os.Bundle; import andro

我正在寻找一个Eclipse演示Android上Skype视频通话的示例项目。我已经尝试了许多来自Stack Overflow的Skype intent实现,但无法构建或运行项目。我是一个初学者,所以我需要一个完整的实现和项目,我可以导入,以及在Eclipse上执行此操作的说明

以下代码显示我的应用程序的当前状态:

package com.example.newpro;

import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity
{
    public void sendMessage(View view)
    {
        Intent skypeIntent = new Intent(Intent.ACTION_VIEW);
        String contactUserName="nithya92";

        skypeIntent.setData(Uri.parse("skype:" + contactUserName + 
            "?call&video=true"));

        //make call only then use  bellow given code
        //skypeIntent.setData(Uri.parse("skype:" + contactUserName+ "?call"));

        skypeIntent.setComponent(new ComponentName("com.skype.raider",
            "com.skype.raider.Main"));
        skypeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

        MainActivity.this.startActivity(skypeIntent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu)
    {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
}
公共类MainActivity扩展活动{
@凌驾
创建时受保护的void(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
最终按钮skype=(按钮)findViewById(R.id.skypevideocall);
final EditText edit=(EditText)findViewById(R.id.editText1);
//Skype视频通话按钮单击此处的事件代码
setOnClickListener(新的OnClickListener()
{
@凌驾
公共void onClick(视图v)
{
字符串skypeName=edit.getText().toString();
if(skypeName.length()<6)
Toast.makeText(getApplicationContext(),“无效用户名:最少6个字符”,Toast.LENGTH\u LONG.show();
Uri skypeUri=Uri.parse(“skype:+skypeName+”?call&video=true”);
Intent myIntent=新意图(Intent.ACTION\u视图);
myIntent.setData(skypeUri);
星触觉(myIntent);
}
});
}
@凌驾
公共布尔onCreateOptions菜单(菜单){
//为菜单充气;这会将项目添加到操作栏(如果存在)。
getMenuInflater().充气(R.menu.main,menu);
返回true;
}

在清单文件中添加以下详细信息

<intent-filter> 
     <action android:name="android.intent.action.MAIN" /> 
     <category android:name="android.intent.category.LAUNCHER" /> 
     <action android:name="android.intent.action.CALL_PRIVILEGED" />
     <category android:name="android.intent.category.DEFAULT" /> 
 </intent-filter>

在清单文件中添加以下详细信息,
<intent-filter> 
     <action android:name="android.intent.action.MAIN" /> 
     <category android:name="android.intent.category.LAUNCHER" /> 
     <action android:name="android.intent.action.CALL_PRIVILEGED" />
     <category android:name="android.intent.category.DEFAULT" /> 
 </intent-filter>