資源簡介

代碼片段和文件信息
/*
?*?Copyright?(C)?2007?The?Android?Open?Source?Project
?*
?*?Licensed?under?the?Apache?License?Version?2.0?(the?“License“);
?*?you?may?not?use?this?file?except?in?compliance?with?the?License.
?*?You?may?obtain?a?copy?of?the?License?at
?*
?*??????http://www.apache.org/licenses/LICENSE-2.0
?*
?*?Unless?required?by?applicable?law?or?agreed?to?in?writing?software
?*?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS
?*?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.
?*?See?the?License?for?the?specific?language?governing?permissions?and
?*?limitations?under?the?License.
?*/
package?android.app;
import?android.content.Context;
import?android.content.Intent;
import?android.os.Build;
import?android.os.RemoteException;
import?android.os.WorkSource;
/**
?*?This?class?provides?access?to?the?system?alarm?services.??These?allow?you
?*?to?schedule?your?application?to?be?run?at?some?point?in?the?future.??When
?*?an?alarm?goes?off?the?{@link?Intent}?that?had?been?registered?for?it
?*?is?broadcast?by?the?system?automatically?starting?the?target?application
?*?if?it?is?not?already?running.??Registered?alarms?are?retained?while?the
?*?device?is?asleep?(and?can?optionally?wake?the?device?up?if?they?go?off
?*?during?that?time)?but?will?be?cleared?if?it?is?turned?off?and?rebooted.
?*?
?*?The?Alarm?Manager?holds?a?CPU?wake?lock?as?long?as?the?alarm?receiver‘s
?*?onReceive()?method?is?executing.?This?guarantees?that?the?phone?will?not?sleep
?*?until?you?have?finished?handling?the?broadcast.?Once?onReceive()?returns?the
?*?Alarm?Manager?releases?this?wake?lock.?This?means?that?the?phone?will?in?some
?*?cases?sleep?as?soon?as?your?onReceive()?method?completes.??If?your?alarm?receiver
?*?called?{@link?android.content.Context#startService?Context.startService()}?it
?*?is?possible?that?the?phone?will?sleep?before?the?requested?service?is?launched.
?*?To?prevent?this?your?BroadcastReceiver?and?Service?will?need?to?implement?a
?*?separate?wake?lock?policy?to?ensure?that?the?phone?continues?running?until?the
?*?service?becomes?available.
?*
?*?Note:?The?Alarm?Manager?is?intended?for?cases?where?you?want?to?have
?*?your?application?code?run?at?a?specific?time?even?if?your?application?is
?*?not?currently?running.??For?normal?timing?operations?(ticks?timeouts
?*?etc)?it?is?easier?and?much?more?efficient?to?use
?*?{@link?android.os.Handler}.
?*
?*?
Note:?Beginning?with?API?19
?*?({@link?android.os.Build.VERSION_CODES#KITKAT})?alarm?delivery?is?inexact:
?*?the?OS?will?shift?alarms?in?order?to?minimize?wakeups?and?battery?use.??There?are
?*?new?APIs?to?support?applications?which?need?strict?delivery?guarantees;?see
?*?{@link?#setWindow(int?long?long?PendingIntent)}?and
?*?{@link?#setExact(int?long?PendingIntent)}.??Applications?whose?{@code?targetSdkVersion}
?*?is?earlier?than?API?19?will?continue?to?see?the?previous?behavior?in?which?all
?*?alarms?are?delivered?exactly?when?r
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????23509??2015-08-28?15:26??fr
?????文件???????1369??2015-08-28?15:26??fr
?????文件?????257427??2015-08-28?15:26??fr
?????文件??????69596??2015-08-28?15:26??fr
?????文件??????21636??2015-08-28?15:26??fr
?????文件???????3816??2015-08-28?15:26??fr
?????文件??????11244??2015-08-28?15:26??kernel\drivers\staging\android\alarm-dev.c
?????文件???????2262??2015-08-28?15:26??kernel\drivers\staging\android\uapi\android_alarm.h
?????文件???????2930??2015-08-28?15:26??bionic\libc\kernel\common\linux\android_alarm.h
?????目錄??????????0??2018-04-14?11:41??fr
?????目錄??????????0??2018-04-14?11:41??fr
?????目錄??????????0??2018-04-14?11:41??fr
?????目錄??????????0??2018-04-14?11:41??fr
?????目錄??????????0??2017-07-12?09:37??fr
?????目錄??????????0??2017-07-12?09:37??fr
?????目錄??????????0??2017-07-12?09:37??fr
?????目錄??????????0??2018-04-14?11:41??kernel\drivers\staging\android\uapi
?????目錄??????????0??2018-04-14?11:41??bionic\libc\kernel\common\linux
?????目錄??????????0??2017-07-12?09:37??fr
?????目錄??????????0??2017-07-12?09:37??fr
?????目錄??????????0??2018-04-14?11:41??fr
?????目錄??????????0??2018-04-14?11:41??kernel\drivers\staging\android
?????目錄??????????0??2017-07-12?09:37??bionic\libc\kernel\common
?????目錄??????????0??2017-07-12?09:37??fr
?????目錄??????????0??2017-07-12?09:37??fr
?????目錄??????????0??2017-07-12?09:37??kernel\drivers\staging
?????目錄??????????0??2017-07-12?09:37??bionic\libc\kernel
?????目錄??????????0??2017-07-12?09:37??fr
?????目錄??????????0??2017-07-12?09:37??kernel\drivers
?????目錄??????????0??2017-07-12?09:37??bionic\libc
............此處省略6個文件信息
評論
共有 條評論