Kitkat 4.4 버전부터 알람매니저 설정부분 변경 > 안드로이드 플랫폼 지식 공유

본문 바로가기

사이트 내 전체검색


안드로이드 플랫폼 지식 공유

Kitkat 4.4 버전부터 알람매니저 설정부분 변경

페이지 정보

작성자 LUG 작성일14-11-27 10:34 조회14,512회 댓글0건

본문

 

If your app uses AlarmManager...

When you set your app's targetSdkVersion to "19" or higher, alarms that you create using either set() or setRepeating()will be inexact.

To improve power efficiency, Android now batches together alarms from all apps that occur at reasonably similar times so the system wakes the device once instead of several times to handle each alarm.

If your alarm is not associated with an exact clock time, but it's still important that your alarm be invoked during a specific time range (such as between 2pm and 4pm), then you can use the new setWindow() method, which accepts an "earliest" time for the alarm and a "window" of time following the earliest time within which the system should invoke the alarm.

If your alarm must be pinned to an exact clock time (such as for a calendar event reminder), then you can use the new setExact() method.

This inexact batching behavior applies only to updated apps. If you've set the targetSdkVersion to "18" or lower, your alarms will continue behave as they have on previous versions when running on Android 4.4.

 

댓글목록

등록된 댓글이 없습니다.



Copyright © www.lug.or.kr. All rights reserved.
상단으로
PC 버전으로 보기