New to Android and realm, I have heard a lot about using realm at the place of SQLite, But I want to store documents in Database. So Can we do it with Realm if yes then how can we do it?
Asked
Active
Viewed 106 times
0
-
What do you mean by documents? JSON? – Christian Melchior May 22 '16 at 12:40
-
Documents by mean that, text documents or PDFs , DOCs or any other document which can contain images + text – Bat May 24 '16 at 09:14
-
You can store blobs in Realm using `byte[]`. So yes, if you convert your PDF to a byte array it should work fine. There is a 16 MB limit on the blob though. – Christian Melchior May 24 '16 at 09:20
-
@Christian : can you please give me example or can you please share some link from where I will get more information – Bat May 25 '16 at 06:29
-
See e.g. here http://stackoverflow.com/questions/1131116/pdf-to-byte-array-and-vice-versa – Christian Melchior May 25 '16 at 08:56