Android 安卓Skype意图
我目前正在android上开发一个简单的应用程序。我有一个带有setonclicklistener的imageview(Skype意图)。当有人单击此图像视图时,会出现“使用……完成操作”对话框。该对话框包含所需的skype选项,但也包含我在计算机上开发的所有应用程序。当有人点击imageview时,我希望可以选择仅使用skype应用程序完成操作。如果可以完全消失“使用…完成操作”对话框,并自动打开skype,那就更好了 skype的目的是:Android 安卓Skype意图,android,skype,Android,Skype,我目前正在android上开发一个简单的应用程序。我有一个带有setonclicklistener的imageview(Skype意图)。当有人单击此图像视图时,会出现“使用……完成操作”对话框。该对话框包含所需的skype选项,但也包含我在计算机上开发的所有应用程序。当有人点击imageview时,我希望可以选择仅使用skype应用程序完成操作。如果可以完全消失“使用…完成操作”对话框,并自动打开skype,那就更好了 skype的目的是: final Intent sky = new Int
final Intent sky = new Intent("android.intent.action.VIEW");
sky.setData(Uri.parse("skype:" + ""));
ImageView imSky = (ImageView) findViewById(R.id.imageView2);
imSky.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
startActivity(sky);
}
});
Android Manifest.xml和我拥有的2个意图过滤器
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="skype" />
</intent-filter>
提前谢谢你 此代码将启动Skype,这是您想要的吗
Intent intent = getActivity().getPackageManager().getLaunchIntentForPackage("com.skype.raider");
if (intent != null)
{
// start the activity
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
else
{
// bring user to the market
// or let them choose an app?
intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setData(Uri.parse("market://details?id="+"com.skype.raider"));
startActivity(intent);
}
谢谢你的回复,我找到了解决办法。刚刚从manifest.xml中删除。现在它不会出现“使用完成操作”对话框并重新连接到skype应用程序。