블로그 이미지
JoyfulLife

공지사항

최근에 받은 트랙백

글 보관함

calendar

          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Notification fail

2009.12.23 23:40 | Posted by JoyfulLife
I have to practice English. so I made up my mind to write English so on.
영어를 연습해야겠고, 이제부터 영어로 글을 쓰겠다고 한 것이다.
------------------------------------------------------------------------------

Notifycation is difficult.

It's easy to implemente Notification in the Activity. But not Extented Activity, It's difficult.

I think I have to use Context. But I don't know it well.. Context is very abstract.


///////////////////////////////////////////////////////////////////////////////

NotificationManager nm = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
        Intent intent = new Intent(mContext, test.class);
        PendingIntent intent1=PendingIntent.getActivity(mContext, 0,intent,0);
        Notification notification= new Notification(android.R.drawable.arrow_down_float,"aaa",System.currentTimeMillis());
        notification.setLatestEventInfo(mContext, "aaa", "bbbb", intent1);
        nm.notify(1234,notification);
        Toast.makeText(mContext, "Notification Registerd.", Toast.LENGTH_SHORT).show();

/////////////////////////////////////////////////////////////////////////

Here is my source. in the Intent, It's a little different. new Intent(mContext, test.class);

I have never us Context until now. Is it possible to use like this?

mContext is
A Context of the application package implementing this class.
test.class is
The component class that is to be used for the intent.


hmm.. this is what I copy from Android developer.


I think I can make solve this problem..


신고

'안드로이드' 카테고리의 다른 글

I can upgrade my Dreamphone to 1.5 finally..  (0) 2010.01.09
I can send my voice to another phone  (0) 2009.12.30
Notification fail  (0) 2009.12.23
OnTouchListener 구현  (0) 2009.12.15
ObjectOutputStream  (0) 2009.12.09
RC29로 다운 그레이드가 안됩니다.  (0) 2009.12.02

티스토리 툴바