안드로이드 개발 질문/답변
(글 수 45,052)
UpdateService이라는 서비스에서
통지기능을 사용하고자 아래처럼 서비스를 불러왔어요
근데,
NotificationManager notiManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
NotificationManager notiManager = (NotificationManager)getSystemService(UpdateService.this.NOTIFICATION_SERVICE);
위랑 아래랑 차이가 뭔가요??
아래처럼하면 물론
The static field should be accessed in a static way 이란 워닝이 뜹니다..
사실 서비스에서
Context를 가져오는 방법은
getApplicationContext()
getBaseContext()
여러개인데요...
차이가 뭔지 잘모르겠습니다.
위 2Method의 차이가 뭔가요??
그냥 인자로 넘어오는 context랑
저 method랑
그리고,
UpdateService.this
어떤 차이가 있는지 궁금합니다.