Thanks for the reply Nikolay. I should be able to get it done with your suggestion. I've also managed to figure out the reading into a 2d array part now, so I should be good to go.
I'll post my method after I am done. Thanks On Tue, Dec 13, 2011 at 3:05 PM, Nikolay Elenkov <nikolay.elen...@gmail.com>wrote: > On Tue, Dec 13, 2011 at 6:16 PM, Raghav Sood > <raghavs...@androidactivist.org> wrote: > > > > this.level9 = new int[][] { { 0, 0, 0, 0, 0, 0, 0, 0 }, > > { 1, 1, 1, 1, 1, 1, 1, 1 }, > > { 0, 0, 1, 0, 0, 1, 0, 0 }, > > { 0, 1, 0, 0, 0, 0, 1, 0 }, > > { 1, 1, 1, 1, 1, 1, 1, 1 }, > > { 0, 0, 1, 0, 0, 1, 0, 0 }, > > { 0, 1, 0, 0, 0, 0, 1, 0 }, > > { 1, 1, 1, 1, 1, 1, 1, 1 }, > > { 0, 0, 0, 0, 0, 0, 0, 0 }, }; > > > > The first 8 values are always 0. > > > > 2) How do I store this array? > > It doesn't matter where you save it, you have > to serialize it (convert to a string/byte array) first. You > could use Java (binary) serialization, or a text-based > format such as JSON or XML (really?). But, since > it's just a bunch of one and zeros, you can just > compress it to 9 bytes (one row -> one byte). > Then, for example, Base64 encode to save as string. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Raghav Sood http://www.androidactivist.org/ - Author http://www.appaholics.in/ - Founder -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en