Oh wow, you're Dave Hylands! 

The only previous info I could find on the Emulator SD-card came from your 
Bugzilla thread - https://bugzilla.mozilla.org/show_bug.cgi?id=828063 

Glad to finally meet you. =) 


On Wednesday, January 22, 2014 11:51:07 AM UTC-8, Dave Hylands wrote:
> Hi Hugh,
> 
> So I tried running ds-test (which has the DS icon). (I left the SDCARD_SIZE 
> at its default).
> 
> It seems to be running fine in the emulator.
> 
> I chose "Add & Del Unnamed File" 
> 
> You can find the source for ds-test in gaia/test_apps/ds-test
> 

Yes your app works fine on my Emulator build. I was able to Add file, Del file, 
Show File, Add & Del Unnamed File, get Free Space, etc. testing the SD-card 
with your app. 


> 
> 
> Was the certified app installed as part of the emulator build?
> 

I copied the app dir into {B2G}/gaia/apps and did ./build.sh to install the app 
into the Emulator build. 

My relevant code segment looks like this: 

--- 

            var sdcard  = navigator.getDeviceStorage("sdcard"); 
            
            var fname   = "testfile"; 
            var file    = new Blob( ["Hello, World"], {type: "text/plain"} ); 
            var request = sdcard.addNamed(file, fname); 

            request.onsuccess = function() 
            {     
              alert("File created: " + fname); 
            }
            request.onerror = function() 
            {
              alert("Unable to create file: " + this.error); 
            } 

--- 

Sadly, neither alerts were triggered. 


> 
> 
> I was running master fetched from last night. Were there any messages in 
> logcat?
> 
> 
> 
> Dave Hylands


Is there perhaps some obvious step that I missed? Much obliged for your tips 
and suggestions. 

Thanks! 

Hugh  
_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to