Sunday, 28 November 2010

Protocol Buffers In Android Databases

I've got a self contained structure that I want to store in each row in a database.
Rather than normalising everything out into tables, I want to have the flexibility to add fields and relations, without having to perform database migrations for each client.

So I've stored my structure in a Protocol buffer. Since this structure is simply plucked out of a parent protobuf then this is simple.

I've reused the Base64 trick as storing a byte array didn't seem to work.

No comments:

Post a Comment