Saving Data on Android



Download 19,28 Mb.
Pdf ko'rish
bet28/292
Sana24.01.2022
Hajmi19,28 Mb.
#407089
1   ...   24   25   26   27   28   29   30   31   ...   292
Bog'liq
Bailey J., Dominguez A., Djermanovic D. - Saving Data on Android (1st Edition) - 2019

Internal Cache Files
.
Internal cache files
Each app has a special and private cache directory to store temporary files. Android 
may delete these files when the device is low on internal storage space, so it’s not 
safe to store anything other than temporary files in this space. There’s also no 
guarantee that Android will delete these files for you, so you must maintain this 
directory yourself.
To write to the internal cache directory, use 
createTempFile
 as shown in the 
following example:
File.createTempFile(filename, 
null
, context.cacheDir)
A good use case for temporary files is when you’re uploading images to a server. You 
may not need the image persisted on the device, but you still need to upload 
some
 
file. In this case, a temporary file works well. You’d store the image in this temp file, 
upload it, and then delete the file upon completion.
Now that you have utilized the important features of internal storage, it’s time to 
look at how to store files on 

Download 19,28 Mb.

Do'stlaringiz bilan baham:
1   ...   24   25   26   27   28   29   30   31   ...   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