Android Question Blob PDF

makis_best

Well-Known Member
Licensed User
Longtime User
Hi.

I have some pdf files inside my sqlite database in blob format.
How I can open them so I can read them inside my application?
I need to use any specific library?

Thank you.
 

amykonio

Active Member
Licensed User
Longtime User
Hi.
You can read blobs using the result from an execquery or execquery2 command. That will return a cursor.
From that cursor you can access your blob using one of the following methods:
B4X:
Dim Buffer() As Byte
Buffer = Cursor.GetBlob("col1")
or
B4X:
Dim Buffer() As Byte
Buffer = Cursor.GetBlob2(0)

It can be achieved using sql library.
You can save the contents of the buffer to a file... And use it later as you want.

Andreas.
 
Last edited:
Upvote 0

amykonio

Active Member
Licensed User
Longtime User
I'm not sure if you want to open and read its content to use them inside your application (some kind of data extraction) or if you simply want to show the pdf to the corresponding application.
 
Upvote 0
Top