Saving Data on Android



Download 19,28 Mb.
Pdf ko'rish
bet237/292
Sana24.01.2022
Hajmi19,28 Mb.
#407089
1   ...   233   234   235   236   237   238   239   240   ...   292
Bog'liq
Bailey J., Dominguez A., Djermanovic D. - Saving Data on Android (1st Edition) - 2019

optimize battery 
usage
 and 
reduce bandwidth
. If the client app doesn't have any connection to the 
database, no active listeners, no pending requests, or similar, Firebase will 
automatically close the connection after 
60 seconds
 of inactivity. Alternatively, you 
can explicitly close the connection by using the 
goOffline
 method.
Visit the official 
documentation
 to learn more about the presence feature.
Latency
Generally speaking, 
latency
 is the time delay between the cause and the effect of 
some change. In Realtime database that would, for example, be when a user triggers 
the action to disconnect from the server until the user is actually disconnected, or 
the delay between requesting a login entry, to actual authorization response.
Firebase handles latency in a way that it stores a timestamp, that is generated on the 
server, as data, when the client disconnects, and lets you use that data to reliably 
know the exact time when the user disconnected. You can combine this feature with 
the 
onDisconnect()
 method, that you learned about earlier, to store the exact time 
when the user disconnected from the database. The timestamp is a static field in the 
ServerValue
 class and you access it by calling 
ServerValue.TIMESTAMP
.
Saving Data on Android
Chapter 14: Realtime Database Offline Capabilities
raywenderlich.com
236


Key points
• Realtime database allows you to enable 

Download 19,28 Mb.

Do'stlaringiz bilan baham:
1   ...   233   234   235   236   237   238   239   240   ...   292




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

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish