설.현.아빠
연락처, SMS, E-mail, 전화, 브라우저, 지도, 안드로이드 마켓 Intent 관련. 본문
연락처 Intent
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("content://contacts/people/" + String.valueOf(contact.getId())));startActivity(intent);
intent = new Intent(Intent.ACTION_INSERT, Uri.parse("content://contacts/people"));startActivity(intent);
intent = new Intent(Intent.ACTION_EDIT, Uri.parse("content://contacts/people/" + String.valueOf(contact.getId())));startActivity(intent);
intent = new Intent(Intent.ACTION_DELETE, Uri.parse("content://contacts/people/" + String.valueOf(contact.getId())));startActivity(intent);
전화 Intent
전화 걸기 : CALL_PHONE = "android.permission.CALL_PHONE"긴급 통화 : CALL_PRIVILEGED = "android.permission.CALL_PRIVILEGED"폰 상태 읽기 : READ_PHONE_STATE = "android.permission.READ_PHONE_STATE"폰 상태 수정 : MODIFY_PHONE_STATE = "android.permission.MODIFY_PHONE_STATE"브로드케스팅 수신 : PROCESS_OUTGOING_CALLS = "android.permission.PROCESS_OUTGOING_CALLS"전화 걸기 이전 : ACTION_NEW_OUTGOING_CALL = "android.intent.action.NEW_OUTGOING_CALL"
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);
SMS Intent
수신 모니터링 : RECEIVE_SMS = "android.permission.RECEIVE_SMS"읽기 가능 : READ_SMS = "android.permission.READ_SMS" 발송 가능 : SEND_SMS = "android.permission.SEND_SMS"SMS Provider로 전송 : WRITE_SMS = "android.permission.WRITE_SMS" : BROADCAST_SMS = "android.permission.BROADCAST_SMS"
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("smsto://" + contact.getHandphone()));intent.putExtra("sms_body", "The SMS text");intent.setType("vnd.android-dir/mms-sms");startActivity(intent);
이메일 Intent
Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:" + contact.getEmail()));startActivity(intent);
브라우저 Intent
new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com/"));startActivity(intent);
Intent intent = new Intent(Intent.ACT ION_WEB_SEARCH);intent.putExtra(SearchManager.QUERY, "검색어");startActivity(intent);
지도 Intent
Uri uri = Uri.parse ("geo: 38.00, -35.03");Intent intent = new Intent(Intent.ACTION_VIEW, uri);startActivity(intent);
안드로이드 마켓 Intent
Uri uri = Uri.parse("market://search?q=pname:전제_패키지_명"); //--- 예) market://search?q=pname:com.jopenbusiness.android.smartsearchIntent intent = new Intent(Intent.ACTION_VIEW, uri); startActivity(intent);
Uri uri = Uri.parse("market://details?id=전제_패키지_명");//--- 예) market://details?id=com.jopenbusiness.android.smartsearchIntent intent = new Intent(Intent.ACTION_VIEW, uri); startActivity(intent);
http://www.jopenbusiness.com/mediawiki/index.php/Android_-_Intent#.EC.9D.B4.EB.A9.94.EC.9D.BC_Intent
'안드로이드 > Intent' 카테고리의 다른 글
Samsung Apps Download Link (0) | 2012.01.10 |
---|---|
Activity Task(FLAG_ACTIVITY_NEW_TASK Flag..) (0) | 2011.03.23 |
Intent클래스의 유용하고 파워풀한 기능들의 TIP (0) | 2011.02.14 |
[Android] startActivityForResult(), onActivityResult() 사용하기 (0) | 2011.02.11 |
PendingIntent & Intent & Intent Sender (0) | 2011.02.11 |