Saving Data on Android


Adding permissions in the manifest



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

Adding permissions in the manifest
To use external storage, you must first add the correct permission to the manifest. If 
you wish to only 
read
 external files, use the 
READ_EXTERNAL_FILE
 permission.
<
uses-permission
  
  
android:name
=
"android.permission.READ_EXTERNAL_STORAGE"
 />
If you want to both 
read and write
, use the 
WRITE_EXTERNAL_STORAGE
 
permission.
<
uses-permission
  
  
android:name
=
"android.permission.WRITE_EXTERNAL_STORAGE"
 />
Beginning with API level 19, reading or writing files in your app’s 
private
 external 
storage directory does not require the above permissions. If your app supports 
Android API level 18 or lower, and you’re saving data to the private external 
directory only, you should declare that the permission is requested only on the lower 
versions of Android by adding the 
maxSdkVersion
 attribute:
<
uses-permission
  
  
android:name
=
"android.permission.WRITE_EXTERNAL_STORAGE"
 
  
android:maxSdkVersion
=
"18"
 />
In this app, you’ll be reading and writing to the external storage, so add the 

Download 19,28 Mb.

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