I have problem with decode stream. I'm trying to put images from folder /MyApp/icons to imageView. I have a fatal error
05-11 22:21:22.319: E/BitmapFactory(7981): Unable to decode stream: java.io.FileNotFoundException: /MyWeather/icons/a04n.png: open failed: ENOENT (No such file or directory)
I tried set a "icons/.." , "/icons/.." and a lot of another options, but anyone not works.
public class Notifications extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.notification);
ImageView imageView1 = (ImageView) findViewById(R.id.imageView1);
Bundle extras = getIntent().getExtras();
String ikona = extras.getString("icon");
Bitmap bm = BitmapFactory.decodeFile("MyWeather/icons/a"+ikona+".png");
imageView1.setImageBitmap(bm);
}
}
Could anyone tell me, how I can get this icon from this folder and set it in my imageView?
Thanks.