I use this code to load .png
In SMM_MediaReady i do this
Out of 200 png few of them gets this error when i load the png file using this
error code
When i download the png with Http job and save the job.GetInputStream. it loads perfectly fine.
B4X:
MediaManager.SetMediaWithExtra(pnlCLV.GetView(x).GetView(0), GetIconLink, "image/*", CreateMap(MediaManager.REQUEST_CALLBACK: Me))
In SMM_MediaReady i do this
B4X:
Dim Out As OutputStream
Out = File.OpenOutput(File.DirInternal, Starter.SelectedFolder & WhatFileName, False)
Media.Media.As(B4XBitmap).WriteToStream(Out, 50, "PNG")
Out.Close
Out of 200 png few of them gets this error when i load the png file using this
B4X:
MediaManager.SetMediaFromFile(pnlCLV.GetView(x).GetView(0), File.DirInternal, Starter.SelectedFolder & WhatFileName, "image/*", Null)
error code
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Bitmap.setDensity(int)' on a null object reference
When i download the png with Http job and save the job.GetInputStream. it loads perfectly fine.