2012년 9월 5일 수요일
패턴 코드) Android Notification Bar creation.
노티 피케이션바 사용법
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager)getSystemService(ns);
서비스 받아 온다.
mNotificationManager.cancel(id);
원래 있던 애는 캔슬 <이게 캔슬하는 API>
요 부분이
Intent intent = new Intent(getApplicationContext(), HelloWorld.class);
intent.putExtra(IS_FROM_NOTIFICATION_BAR, true);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
Notification notification = new Notification(getApplicationContext(), R.drawable.sys, getApplicationContext().getResources()
.getString(R.string.download_completed), System.currentTimeMillis(), getApplicationContext().getResources().getString(
R.string.download_completed), "HelloWorld", intent);
notification.contentView = new RemoteViews(getApplicationContext().getPackageName(), R.layout.download_completed);
notification.flags = Notification.FLAG_AUTO_CANCEL;
notification.contentIntent = pendingIntent;
mNotificationManager.notify(PRGS_NUM+(int)9999, notification);
만들어서 쏘는 것 까지
이 패턴만 여러번 봐서 익히면 노티바는 무척 쉽다.
코드도 역시 패턴.
이 패턴이 그 패턴은 아니지만.
피드 구독하기:
댓글 (Atom)
UPBIT is a South Korean company, and people died of suicide cause of coin investment.
UPBIT is a South Korean company, and people died of suicide cause of coin. The company helps the people who control the market price manipu...
-
프루나는 이제 믿을만한 공유가 안되고 있다. 젠장. 영화 다운 받아보면 전부 야동이나 포르노류 밖에는 없다. 신고되어 있는 자료부터 보지만 신고가 안되어 있는 것은 제대로 다운도 되지 않는다. 이젠 유료 사이트를 믿을 수 밖엔... ...
-
Intel의 새로운 MMX - "KNI" KNI 는 Katmai New Instruction 의 약자이다 . 아는 분들은 잘 알고있겠지만 KATMAI( 이하 카트마이로 부름 ) 는 인텔의 다음번 펜티엄...
-
C:\program files\ 베이비론 폴더가 있다. 브라우저 창 다닫고 지우고 다시 실행하면 없어진다.
댓글 없음:
댓글 쓰기
국정원의 댓글 공작을 지탄합니다.