Why are the storage options in SAF limited in the Android emulator?

I have an app that saves to a text file and elsewhere copies a database to storage, both using Storage Access Framework.
Testing it on Android Studio emulators (API 26 and 28) the only available options are Downloads and SD card. But on physical devices(API 26 and 29), you can save anywhere. Is there something I need to do to make emulators work like the devices?

3

There a number of different ways storage internal and external can be configured on real devices and what’s available has changed over time and got complicated.

So in Android Studio emulator it only really offers the Basic more original option of the “limited internal – downloads”/”SD card” setup thats guaranteed to be available on all phones from the really old, to modern “basic” phones, to modern higher end phones.

But the whole concept of SAF is that as a developer this complication of all the different options of storage configurations does not matter. You ask the user to choose some location and you get back a URI that can be used in a consistent fashion no matter if the location is on device based storage internal or emulated external storage or a SD card or some random cloud provider.

Some Background

Originally Smartphones came with came with very limited “internal Storage” and most user storage was provided by a SD Card. The HTC Dream only had 256Mb of internal storage and up to 16Gb on the SD Card.

And what you could do with these original smartphones was more limited.

Then manufacturers started offering more non SD card storage built in to the phone and quite often with no SD Card slot. But I believe they still wanted to give users more flexibility of using the extra internal storage space instead as really as an emulated SD card instead of the limited access Android gave to non SD card storage.

But when they did this they did not want a hard fixed partition boundary between the “internal” and emulated “external” storage, so they are on the same partition and the manufacturers provide a Document Provider that provides access to various directories of the “internal” storage as though it was open access “user” storage as a SD Card substitute.

The there is more complication that now some phone offer using the SD Card as a way to seamlessly extend “Internal Storage”.

Add to the fact that Google has mucked around with permissions and how to access files so much over various Android versions.

You also note that the Android Studio emulator does not have setup a “G Drive” Document Provider because the emulator does is not usually connected up to a Gmail Account and Goggle Drive.

It seems I overlooked a quite simple explanation. Using the Files app Internal storage is hidden by default.

I’ve noticed it a few times using some apps but since all of my devices are legacy devices I’m not used to using SAF and having to select show Internal storage.

That’s my excuse and I’m sticking to it…

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật