Monday, March 24, 2014

Setting SD Card File on your android emulator

Developing apps involving taking some photos from the camera requires the use of  SD card, but how do you set it up. Do you need to rush to the nearby hardware store to get an SD card ? Of course not, the solution just lies on few mouse clicks.
 How to set up a virtual SD card in your eclipse IDE ?  If you are using the ADT bundle you are lucky this post will likely help you out.

1. Go to SDK/tools directory :
    make sure that you have the mksdcard utility available else download SDK manager.

2. Go to the cmd and locate the mksdcard directory and your own sd card called mysdcard:
   
C:\adt-bundle-windows-x86-20130917\sdk\tools>  mksdcard.exe 62M mysdcard
   Press Enter and it is done.
 62M represents the size of your sd card file.

3. Go to the Android Virtual Device manager:

Windows --> Android Virtual Device manager

4.  Select the device and Edit:

5. Make sure you change the back camera option  to Emulated or Webcam()

6. Under SD Card:
    select the File option and browse to the location of mysdcard and select it.
  Click Ok.

7. Rebuild your project , run it and have fun

Due to the lack of time I could not provide you with screenshots but trust me I will insert them next time. If you face any problem, please don't hesitate to drop a comment.
 Aurevoir !!!

1 comment:

  1. I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well! este

    ReplyDelete