いつもお世話になっております。小原と申します。
Intentを用いてSkypeを経由して発信するプログラムを作っているんですが、以下のソースコードではIntentを受け取ったSkypeがSkypeのActivity上でToastでエラーを出します。
その内容は、”番号が間違っています。国番号を含めてください(例:+44 1234567)。”と表示されます。
このエラーはICS標準のコンタクトリストから電話番号を選択し電話をかけるプログラムにSkypeを選択した時と同じ内容のエラーです。
setClassNameが間違えているのでしょうか?
setDataが間違えているのでしょうか?
電話番号の形式が間違えているのでしょうか?
以下ソースです
public class MainActivity extends Activity {
private TextView mTextView;
private String number;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mTextView = (TextView) findViewById(R.id.numberTextView);
mTextView.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
sendSkypeIntent(number);
}
});
}
private void sendSkypeIntent(String number) {
Intent intent = new Intent("android.intent.action.CALL_PRIVILEGED");
intent.setClassName("com.skype.raider", "com.skype.raider.Main");
intent.setData(Uri.parse("8109012345678"));
startActivity(intent);
}
}
ご指導ください、お願いします。