BUG Community

Welcome! Log In

Forums Applications FileNotFoundException when trying to write to disk in emulator

Subscribe to FileNotFoundException when trying to write to disk in emulator  4 posts, 3 voices , Tagged: FileNotFoundException emulator

Log in to reply to this topic
 
Sep 16, 2009 1:18pm
User_img_not_found_06_med Nick.Dunn 3 posts

I'm following the tutorial from http://bugcommunity.com/wiki/index.php/The_Great_Baby_Monitor_BUGapp_Tutorial

When I get to the line,

 

byte[] image = camera.getImage();
writeToFile(image, "/tmp/camera.jpg");

 

I get the error


java.io.FileNotFoundException: \tmp\camera.jpg (The system cannot find the path specified)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
    at babymonitor.BabyTrackerCustomizer.writeToFile(BabyTrackerCustomizer.java:58)
    at babymonitor.BabyTrackerCustomizer.run(BabyTrackerCustomizer.java:42)

 

When working with the emulator for Android, I remember having to setup a fake SD card in order to write to disk.  Do you need to do the same thing when writing to disk using a virtual bug?

Sep 16, 2009 1:56pm
User_img_not_found_06_med Nick.Dunn 3 posts

Nevermind, figured it out.

 

The tutorial should be using File.separator, not / .  I should have been smart enough to realize that in the first place.

 

 

 

Jun 28, 2012 2:25am
User_img_not_found_03_med louis 38 posts

http://www.louisvuittonusauks.co.uk/ louis vuitton bags

http://www.louisvuittonpurses-outlets.net/ louis vuitton Handbags Outlet

http://www.greatlouisvuittonbags.com/ louis vuitton purses

http://www.louisvuittonpursebags.net/ Louis Vuitton Purses

http://www.louisvuittononlineshops.org/ Cheap Louis Vuitton

http://www.officiallouisvuittonzone.net/ louis vuitton outlet

http://www.hermesoutletus.org/ hermes Purses

http://www.cheap-suprashoes.org/ cheap supra shoes

Aug 14, 2012 1:55am
User_img_not_found_06_med rubing 103 posts

Isn&