시원한물냉
2013. 9. 8. 17:24
[Android] Intent 활용 예제
안드로이드 Intent 활용 예제
-
- Intent intent = new Intent(Intent.ACTION_VIEW,
- Uri.parse("content://contacts/people" + String.valueOf(contact.getId())));
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_INSERT,
- Uri.parse("content://contacts/people"));
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_EDIT,
- Uri.parse("content://contacts/people" + String.valueOf(contact.getId())));
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_DELETE,
- Uri.parse("content://contacts/people" + String.valueOf(contact.getId())));
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_DIAL,
- Uri.parse("tel:" + TelNumber));
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_CALL,
- Uri.parse("tel:" + TelNumber));
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_VIEW)
- intent.putExtra("sms_body", "The SMS text");
- intent.setType("vnd.android-dir/mms-sms");
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_SENDTO,
- Uri.parse("sms_body:" + "The SMS text"));
- intent.setType("vnd.android-dir/mms-sms");
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_SENDTO,
- Uri.parse("mailto:" + "The 이메일 text"));
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
- intent.putExtra(SearchManager.QUERY, "검색어");
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_SENDTO,
- Uri.parse("geo: 38.00, -35.03"));
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_VIEW,
- Uri.parse("market://search?q=pname:전체패키지명"));
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_WEB_SEARCH,
- Uri.parse("market://details?id=전체패키지명"));
- startActivity(intent);
-
- Intent intent = new Intent(Intent.ACTION_DELETE);
- intent.setData(Uri.parse("전체패키지명"));
- startActivity(intent);