Awesome FOSS Logo
Discover awesome open source software
Launched 🚀🧑‍🚀

Device Storage API Quirk in FirefoxOS

Categories

After purchasing the Flame FFOS reference phone, I set up the App Manager (provided by Mozilla) and have been having a blast debugging and testing my new application (VCFPorter).

I recently ran into some issues using the Device Storage API (https://developer.mozilla.org/en-US/docs/Web/API/Device_Storage_API).

The problem was that I was trying to access internal storage (I don’t have an SD card on the device), but it would always return empty (the cursor would be “done” on the first onsuccess callback).

Turns out the fix was to disable “Share using USB” on the internal storage while I was debugging the app. It was preventing FFOS from accessing the internal storage. (Settings > Media Storage > Share using USB (under internal storage))

Hope this helps someone out!