Great, thanks for the head start, much appreciated. For others who happen by this thread ... through more trial and error I seem to have discovered that loading an array from XML with more than 500 items is failing. It's actually 501 -- the 0 position plus 500 more. Adding one more topples it. It's surprising and I haven't found this limitation documented anywhere, but I've got the some circumstantial evidence.
On Sep 15, 1:17 pm, DanH <[email protected]> wrote: > Unfortunately the Java file I/O stuff is pretty obscure, but what you > need to do is pretty simple: Open the raw file (openRawResource) and > then read lines from the resulting InputStream. Of course, reading > lines from an input stream has been made stupidly complex by the Java > JDK designers, so you have to use something like this: > > BufferedReader reader = new BufferedReader(new > InputStreamReader(inputStream, "UTF-8")); > int i = 0; > while ((line = reader.readLine()) != null) { > TEAM_SCORES[i++] = line; > } > > This of course is ignoring exception stuff, and assumes you know the > array size in advance. If you don't know the array size you'd use an > ArrayList or some such and convert to an array after all is read. > > (Obviously, with this scheme the file is just a list of your data > records, one per carriage-return-terminated line, with no XML markup > and no quotes.) > > On Sep 15, 9:11 am, nextgen <[email protected]> wrote: > > > > > Correct, I'm using Resources.getStringArray (shown above). > > > Also, I've not yet learned how to do data any other way than XML > > bundled in the app -- it is on my list to learn not only straight text > > files, as you suggest, but also using a database, or especially > > putting this out on the internet somewhere and not bundling with the > > app, as Frank suggests. > > > So I have a workaround for now, but I will pursue these more-permanent > > solutions next. It's not easy learning Android and Java from scratch > > while trying to produce apps under a time constraint, but I'm trying > > my best. I very much appreciate you taking the time to reply. > > > On Sep 14, 10:44 pm, DanH <[email protected]> wrote: > > > > I'm assuming you use Resources.getStringArray to read the array?- Hide > > > quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

