Pro Android with Kotlin


Download 5.42 Mb.
Pdf ko'rish
bet118/223
Sana04.11.2023
Hajmi5.42 Mb.
#1746807
1   ...   114   115   116   117   118   119   120   121   ...   223
Bog'liq
@de android telegram Pro Android with Kotlin Developing Modern Mobile

133
CHAPTER 8: APIs
Table 8-2. (continued )
Method
Description
setRequiresBatteryNotLow 
(batteryNotLow: Boolean)
This is only for API level 26 and higher. This specifies as an 
additional condition that needs to be met for the job to run 
that the battery must not be low. false resets this to not 
care.
setRequiresCharging 
(requiresCharging: Boolean)
Specifies as an additional condition that needs to be met 
for the job to run that the device must be plugged in. false 
resets this to not care.
setRequiresDeviceIdle 
(requiresDeviceIdle: Boolean)
Specifies as an additional condition that needs to be met 
for the job to run that the device must be in idle state. false 
resets this to not care.
setRequiresStorageNotLow 
(storageNotLow: Boolean)
This is only for API level 26 and higher. This specifies as an 
additional condition that needs to be met for the job to run 
that the device memory must not be low. false resets this to 
not care.
addTriggerContentUri 
(uri: JobInfo.TriggerContentUri)
This is only for API level 24 and higher. This adds a content 
URI that will be monitored for changes. If a change happens
the job gets executed.
setTriggerContentUpdateDelay 
(durationMs: Long)
This is only for API level 24 and higher. This sets the 
minimum delay in milliseconds from when a content change 
is detected until the job is scheduled.
setTriggerContentMaxDelay 
(durationMs: Long)
This is only for API level 24 and higher. This sets the 
maximum total delay in milliseconds that is allowed from 
the first time a content change is detected until the job is 
scheduled.
setClipData 
(clip:ClipData, grantFlags:Int)
This is only for API level 26 and higher. This sets a ClipData 
associated with this job. Possible values for the grantFlags 
are as follows:
FLAG_GRANT_READ_URI_PERMISSION
FLAG_GRANT_WRITE_URI_PERMISSION
FLAG_GRANT_PREFIX_URI_PERMISSION
(All constants are inside class Intent.)
Firebase JobDispatcher
The Firebase JobDispatcher is an alternative to the JobScheduler that works for Android API 
levels before and starting with 21.
Caution The Firebase JobDispatcher library requires Google Play Services and the Google Play 
store to be installed. If you are not targeting API levels below 21, it is recommended you use the 
JobScheduler instead.



Download 5.42 Mb.

Do'stlaringiz bilan baham:
1   ...   114   115   116   117   118   119   120   121   ...   223




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling