본문 바로가기

Android

Call & SMS & Chaton intent

Call & SMS & Chaton intent
Intent intent;  
if (v.getId() == call.getId()) {  
    intent = new Intent(Intent.ACTION_DIAL);  
    //Uri.parse("tel:" + TelNumber));  
  
    getContext().startActivity(intent);  
} else if (v.getId() == sms.getId()) {  
    intent = new Intent(Intent.ACTION_VIEW);  
    //intent.putExtra("sms_body", "The SMS text");  
    intent.setType("vnd.android-dir/mms-sms");  
  
    getContext().startActivity(intent);  
} else {  
    intent = new Intent(Intent.ACTION_MAIN);  
    intent.setComponent(ComponentName.unflattenFromString("com.sec.chaton/.HomeActivity"));  
    intent.addCategory(Intent.CATEGORY_LAUNCHER );  
    getContext().startActivity(intent);  
}