I have a doubt...i am not sure whether its some carelessness from my part. I was using mBitmap.compress(Bitmap.CompressFormat.PNG,100, out);
to save a bitmap to png . In the code the line beneath this code does not respond along with this. Let me make it clear, I have given Log.i(xy,xy);
in all the alternating lines in the method to trace the issue, but all the Log until the line before mBitmap.compress(Bitmap.CompressFormat.PNG,100, out);
prints and I have included the whole code in a try-catch
, but no exception was caught. I have checked whether the parameter and the object were null, but no they are not. I am confused here..please help ...
Thanks in advance
Logcat
05-17 10:07:24.819: WARN/ActivityManager(73): Launch timeout has expired, giving up wake lock! 05-17 10:07:24.849: WARN/ActivityManager(73): Activity idle timeout for ActivityRecord{40968180 com.test.android.sk/.FPaint}
Edit
public String cReatePNG(){ Log.i("cp1", "in the create png"); try{ Log.i("cp2", "in the create png"); flag=true; DataBaseHelper myDbHelper = new DataBaseHelper(this); String pattern= "dd-MM-yyyy-HHmmss" ; SimpleDateFormat format = new SimpleDateFormat(pattern); String formattedDate = format.format(new Date()); Log.i("cp3", "in the create png"); tmpfile= CreateTempDir.createTempDir(); File file = new File(Environment.getExternalStorageDirectory() + File.separator+"/SK_Temp/img-"+formattedDate+".png"); try{ Log.i("cp4", "in the create png"+file); FileOutputStream out = new FileOutputStream(file); Log.i("cp5", "in the create png"); Log.i("view",out.toString()); view.mBitmap.compress(Bitmap.CompressFormat.PNG,100,out); // <----issue with this line }catch(Exception e){ e.printStackTrace();} Log.i("CP#file_creation", "PNG file created"); filename=file.toString(); }catch(Exception e){e.printStackTrace();}