티스토리 뷰
SendBroadCast 방송 보내기
SendBroadcast라는 Context에 포함된 함수를 이용하여 인텐트를 전달한다. Intent에 putExtra를 통해 Integer, boolean, String 등 여러 단일 타입 또는 배열의 혈태로 전달 할 수 있다.
Intent sendIntent = new Intent("com.dwfox.myapplication.SEND_BROAD_CAST");
sendIntent.putExtra("isBoolean", true);
sendIntent.putExtra("sendInteger", 123);
sendIntent.putExtra("sendString", "Intent String");
sendBroadcast(sendIntent);
'Android' 카테고리의 다른 글
안드로이드 변수 이용 (0) | 2019.03.08 |
---|---|
안드로이드 foreground service (0) | 2019.03.07 |
different between PendingIntent FLAG (0) | 2019.03.07 |
웹사이트. csv,xlse파일을 sqlite파일로 변환 (0) | 2016.05.23 |
개발환경 여러가지 설정하기 (0) | 2015.02.19 |
댓글