私の目的は、次を使用して Android デバイスでメール クライアントを起動することです。
Intent regularIntent = getPackageManager().getLaunchIntentForPackage("com.android.email");
if (regularIntent == null) {
Toast.makeText(getApplicationContext(),"This Email client not configured!",
Toast.LENGTH_LONG).show();
} else {
regularIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivityForResult(regularIntent,0);
}
私は常にregularIntentをNullとして取得します。この問題の回避策は何ですか?