Guest User

Untitled

a guest
Jul 16th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. 05-17 10:07:24.819: WARN/ActivityManager(73): Launch timeout has expired, giving up wake lock!
  2. 05-17 10:07:24.849: WARN/ActivityManager(73): Activity idle timeout for ActivityRecord{40968180 com.test.android.sk/.FPaint}
  3.  
  4. public String cReatePNG(){
  5.  
  6. Log.i("cp1", "in the create png");
  7.  
  8. try{
  9. Log.i("cp2", "in the create png");
  10. flag=true;
  11. DataBaseHelper myDbHelper = new DataBaseHelper(this);
  12.  
  13. String pattern= "dd-MM-yyyy-HHmmss" ;
  14. SimpleDateFormat format = new SimpleDateFormat(pattern);
  15. String formattedDate = format.format(new Date());
  16. Log.i("cp3", "in the create png");
  17. tmpfile= CreateTempDir.createTempDir();
  18.  
  19. File file = new File(Environment.getExternalStorageDirectory()
  20. + File.separator+"/SK_Temp/img-"+formattedDate+".png");
  21.  
  22. try{
  23.  
  24. Log.i("cp4", "in the create png"+file);
  25. FileOutputStream out = new FileOutputStream(file);
  26. Log.i("cp5", "in the create png");
  27. Log.i("view",out.toString());
  28. view.mBitmap.compress(Bitmap.CompressFormat.PNG,100,out); // <----issue with this line
  29. }catch(Exception e){ e.printStackTrace();}
  30. Log.i("CP#file_creation", "PNG file created");
  31. filename=file.toString();
  32. }catch(Exception e){e.printStackTrace();}
Add Comment
Please, Sign In to add comment