안드로이드 개발 질문/답변
(글 수 45,052)
Notification이 왜 무효처리 된건지 알고싶습니다.
더이상 지원하지 않는다는 건가요?
Notification notif = new Notification(statusBarIconID, null, System.currentTimeMillis()); notif.sound = Uri.withAppendedPath(Audio.Media.INTERNAL_CONTENT_URI, "6");//ringURI; notif.flags = Notification.FLAG_INSISTENT; notif.setLatestEventInfo(context, from, message, theappIntent); notif.ledARGB = Color.GREEN; NotificationManager nm = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
1번째 라인
Notification notif = new Notification(statusBarIconID, null, System.currentTimeMillis());
4번째 라인
notif.setLatestEventInfo(context, from, message, theappIntent);
지금 처럼 두개 라인이 무효화 처리되었습니다 ....
알고 싶은게 ..
왜 저렇게 무효화가 됬는지와 .. 저렇게 무효화 되면 소스자체에서 없는 소스로 판단하는지 ..
아니면 읽기는 읽는지 알고싶습니다.
커서를 갖다대면 아래오 같은 메세지가 나올 것입니다.
The constructor Notification(int, CharSequence, long) is deprecated
단지 해당 API들이 deprecated된 것이지 무효화 처리가 된것은 아닙니다.
http://developer.android.com/reference/android/app/Notification.html 해당사이트를 보면 아래와 같이 나와있으니 웬만하면 deprcated된 API보다는 새로 제공해주는 것을 이용하시는게 좋을 거 같네요 그렇다고 deprecated된 API가 동작하지 않는 건 아닙니다.
Notification.Builder
instead.