File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to create sdcard and mount on the emulator

 
Suzzane Pinto
Ranch Hand
Posts: 214
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends,


i am trying to develop a simple application where i want to send an image from gallery to server.
i am facing problem in creating sd card into the emulator(version 2.1). it says no media found...
please let me know the steps for creating sdcard and pushing image to the sdcard.
 
Swastik Dey
Rancher
Posts: 1601
5
Android Java Java ME
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you create a new virtual device from eclipse, at that time there is an option to specify the size of sd card, and if you specify that it creates the sd card.
 
Swastik Dey
Rancher
Posts: 1601
5
Android Java Java ME
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See screen snaps.
new_avd.JPG
[Thumbnail for new_avd.JPG]
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya i got it....but how to see whethr sdcard is created or not and how to create a directory in the sdcard and save the image into it.
please help...



thankyou
 
Swastik Dey
Rancher
Posts: 1601
5
Android Java Java ME
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once the emulator starts, open command prompt and enter the following command. for e.g

c:\>adb shell

it opens the shell interface and promp changes to

#

not type ls, it will show the directory contents, and should show sdcard.

not type
#cd sdcard
the directory gets changed to sdcard
now type the following command
#mkdir nameofthedirectory/folder you wish to create

I hope this helps.

 
Suzzane Pinto
Ranch Hand
Posts: 214
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i did that using DDMS perspective where i selected the emulator and did push operation..
now i am facing problem with with the transfer code after picking from gallery..
i have to transfer my image to server following is the code in andriod my main activity..please let me know




unable to understand the error
 
Swastik Dey
Rancher
Posts: 1601
5
Android Java Java ME
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following should show you the actual path of the image selected. Your next should be to read the file contents and send to server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic