Posts Tagged ‘android’

WordPress for Android

2011. April 6. 22:16

Tonight I downloaded the android wordpress app. This is my 1st post from my mobile. I don’t promise but maybe I’ll write more often from now on.

:android_symbol:Drawable.createFromPath

2010. December 13. 20:44

I was trying to load an image from the sdcard. From the same directory I managed to open sound files and play them, but for some reason it didn’t work for the image. After trying everything it turned out that

MediaPlayer.create(this, Uri.parse("file:///sdcard/app/a.mp3"));

works, but

Drawable.createFromPath("file:///sdcard/app/a.jpg");

doesn’t work. Instead of this path, one should use:

Drawable.createFromPath("/sdcard/app/a.jpg");

This finally works! BTW it also works for the MediaPlayer.