views:

307

answers:

2

hi everyone , I am new to android.

I intend to make video player which can play video from file as well as web URL. But the problem is that when my emulator runs , a sd card folder should be created in "File Explorer" tab of DDMS perspective in eclipse , which is not happening . That's why I am unable to push any file in the sd card and hence video is not being played.

I have used following code :- check it out the link
http://davanum.wordpress.com/2009/12/04/android-%E2%80%93-videomusic-player-sample-take-2/

Please help me out.

Abhijeet

A: 

I didn't have a look at your code, but you can try to use the command line adb tool which you can find in the SDK. That's what I need to do (and works because I created a device with an sd card but it doesn't show up in the DDMS view.. To check if your device has a sd card, use a shell and go to the tools folder in your android installation, make sure you only have one emulator running. Type adb shell and check contents with the ls command, if there's a folder sdcard then you can use other commands to push and pull files. If there's no such folder try to create a new device, perhaps that was the problem. Leave the shell withCtrl + C, and type adb pull \sdcard\yourfileonthephone.txt yourfileonthecomputer.txt, files will be saved in the tools folder. Or use adb push to store files. But anyway perhaps there's a way to make it visible in DDMS, would be great :)

PS: Access via DDMS seems to work with devices running 2.1, but not 2.2...

Sonja
thnx sonja ......... it was very kind on your part .i am able to view my sd card folder . But another problem has cropped up . When I run my android project, emulator do starts , but in the DDMS perspective no devices are shown . I have to "Reset adb" from the "Devices" tab . Then only I am able to see the devices and and my project runs successfully . But some sort of error messages appear in the console :-DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote hostDeviceMonitor]Connection attempts: 1Can you help me with that ?
Abhijeet
A: 

I think your slashes are backwards. \sdcard\yourfileonthephone.txt should be /sdcard/yourfileonthephone.txt. Otherwise, you a "file system is read-only" error.

Ferrol