vcard パーサーで解析できるように、mimetype text/vcard の Web URI からデータのストリームを受信しようとしています。私の現在のコードは次のとおりです。
Uri.Builder b = Uri.parse("http://www.cs.auckland.ac.nz/our_staff/vcard.php").buildUpon();
b.appendQueryParameter("upi", items.get(pos));
Uri uri = b.build();
Intent i = new Intent(Intent.ACTION_VIEW, uri);
Log.d("URL of staff", uri.toString());
i.setDataAndType(uri, "text/vcard");
activity.startActivity(i);
ただし、例外が返されます。
06-01 06:49:21.021: E/AndroidRuntime(1659): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=http://www.cs.auckland.ac.nz/our_staff/vcard.php?upi=kng001 typ=text/vcard }
これに間違ったタイプのアクションを使用していますか? ACTION_VIEW ではないでしょうか。または、間違った方法でデータの種類を設定していますか?
ありがとう。