Android Question My App is crazy

hibrid0

Active Member
Licensed User
Hi guys, I write an small App with 7 activities and 7 layouts.

My app work fine in some devices but in other devices goes crazy, generating a PDF file the app crash, and start again.

And sometimes when I'm in an activty PDF view, I press back button, and again go to PDF view the App restart, but restart in any old activities.
But only in some divices.

In device the App go fine have 26MB for Apps and in the device the App is crazy have 13MB for Apps.

I create a Service to generate PDF file that service sometimes take a lot of memory and crash.

Any suggestions to free the memory or whaever can I do to make more stable or release used memory.
 

hibrid0

Active Member
Licensed User
Hi and thanks for your answer, I have this libraries:

Animation
b4aPDFViewer
Core
ContentResolver
Core
DateUtils
Dialogs
Excel
EZCamera
FTP_auto
GPS
HTTP
MLfiles
PDFWriter
Phone
RandomAccessFile
Reflaction
ScrollView2D
SignPad
String

Aditional Modules:
DownloadService
HttpUtils2Service
StateManager
Crear_PDF (PDFWriter)

And when I get the OutOfMemory is in this Library: PDFWriter, in the instruction "PDFWriter.outputtoScreen", I really dont show the content of PDF in this activity but the only way to write the PDF correct. I see some users have a rutine called PDFwriter_convertionDone, in my code this runtine not excuted, then I need output to screen.

The PDF Generated is 6.85MB with a many imagenes, if I put more images I get OutOfMemory, but where I save the outtoprint is an String, in there is save the images and everything PDFRawContent.

B4X:
Log("Memoria Disponible :"&GetFreeMem)
DIM PDFContent as String
PDFcontent = PDFWriter1.outputToScreen
'    Dim PDFcontent2 As String
Log("////////////////////////MEMORIA LIBRE LUEGO OUTPUT TO SCREEN///////////////////////////////////////////////////////")
Log("Memoria Disponible :"&GetFreeMem)
    PDFWriter1.outputToFile(ruta,"pdf1.pdf",PDFcontent,"Windows-1252")
 
Last edited:

hibrid0

Active Member
Licensed User
Well I partial solved the crazy activities with catch the Back Button and put on in the call to the activity I need.
Now only sometimes crash and restart the first activity or in PDFViewer, I dont know why. In the Log i dont see any info, and the console log dont show a crash.
I think is a crash because the app show in blank, only with the title and the icon is changed to icon by default, and then start in the Activity first or pdfview. That unestable but is more usable now.
 
Top