[android-developers] Using: Picture.createFromStream gets stuck - does not return new picture
Anybody could use Picture.createFromStream successfully?
When using static method Picture.createFromStream (static Picture createFromStream (InputStream stream))
Here is the snapshot of the code
public boolean streamPicture(Picture p)
{
if(_outStream == null)
return false;
else {
p.writeToStream(_outStream);
if(fileOutputStream != null ) {
p.writeToStream(fileOutputStream); // retrieved by fileOutputStream = new FileOutputStream("/data/picture.nubo") ;
try {
fileOutputStream.flush();
fileOutputStream.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
try {
Picture p_check = Picture.createFromStream(new FileInputStream("/data/picture")); //*** gets stuck here
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return true;
}
}
}
The code gets stuck at ***
1. I checked and saw that the file /data/picture is created before line ***.
2. Picture p is retrieved by capturePicture() in webview (I did not use startRecording)
Any ideas anybody?
Thanks,
Asi
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home