Topic: [IAWA] Oracle Generator app for Android
Started by: David Artman
Started on: 1/31/2011
Board: lumpley games
On 1/31/2011 at 4:03pm, David Artman wrote:
[IAWA] Oracle Generator app for Android
I wanted to play with App Inventor, but I didn't want to, you know, actually INVENT an app. So I lobbed, with this:
<a href="http://davidartman.com/design/iawa-oracles-for-android">IAWA Oracles for Android
Any typos are the responsibility of whomever populated the Abulafia random generator. Though I tried to review as I copy & pasted.
App Inventor makes this stuff VERY easy and mostly WYSIWYG. Once one gets one's head around how it wants stuff structured in OpenBlocks (e.g. one RANDs right out of an array, without having to make a temp variable--yes, this is simple stuff to you smarties, but I last programmed in PASCAL in 1988, so stuff it!).
A couple of caveats:
* You have to enable "Unknown sources" in Settings > Applications, because it's not coming from the Android Market.
* The app is WAY bigger than it needs to be, because App Inventor's the Schema implementation packs all of the Schema classes, even if one only uses a handful. Hopefully, Google will improve it to cull unneeded classes upon packaging... but for now, in App Inventor Beta, it's 3MB installed when it should be more like 300KB. Good thing storage is essentially free, ya? ;)
On 1/31/2011 at 6:52pm, David Artman wrote:
Re: [IAWA] Oracle Generator app for Android
Actually... go re-download it, if you DLed between the first post and this one.
I made the code smarter (read the web page link above to see the difference. Ahhh, the POWER of procedure calls!). It will over-write just fine (no real "data" being stored by me). Just be sure to use ASTRO or some other file manager to browse to your downloads folder on your SD card, to delete the APK file(s) once IAWAOracles is installed.
On 2/1/2011 at 5:05pm, lumpley wrote:
RE: Re: [IAWA] Oracle Generator app for Android
I am Androidless, but I'd love to hear about people using this!
Thanks, David.
-Vincent
On 2/1/2011 at 6:45pm, David Artman wrote:
RE: Re: [IAWA] Oracle Generator app for Android
Vincent, check my web site link for a screen shot of the app (prior to a button being pressed to generate four Oracles). It's super-simple... but does obviate the need for a deck of cards. :)
I might decide to extend it some once Google does something about the bloating of App Inventor apps (caused by the ENTIRE classes file for Schema being included in EVERY app!). Once a "real app" can be done in Inventor, I'll probably extend the IAWAOracles app so that the current, active Oracle List is scraped from a TXT or XML file, to populate the list from which it will randomize the four.
THAT way, when the app launches, it could scan its "lists" folder to get the Oracle List names out of each TXT file, for populating a drop-down (instead of the four default Oracle buttons). Choose one of the lists and press GO, and it will pull that list file's sentences, put them into the array, and randomize from it.
Maybe then also add a list editor... but I like the idea of a new Oracle list being "distributed" as an "app" that merely copies a TXT file into the base generator's "lists" folder--not a full update tot he app every time someone wants to make a list. Think of it as "themeing" as applied by other apps. And anyone with a file browser could just drop their own TXT files into it and relaunch--no need to even compile the new list as an "app" to make the core app recognize it on next startup.
Of course, that will mean having to learn how to scan a directory, peek into a file, parse it by carriage returns (or commas or whatever), assign the content to a drop-down chooser and to the temp array for randomizing, and probably come up with a recursive version of the randomizing code, rather than a brute-force way of checking each newly randomized Oracle against all previous randomized ones this click.
Or... you know, maybe not. :) It was mostly a lark to see how easy App Inventor is (answer: easy enough, fun) while also making something someone somewhere might someday use (e.g. at a convention WAY up in the mountains, where there's no Internet or WiFi or 3G and, thus, no Abulafia or lumpley.com). ;)
On 2/17/2011 at 1:43pm, Artanis wrote:
RE: Re: [IAWA] Oracle Generator app for Android
Works perfectly on my Samsung Galaxy GT-I9000, firmware version 2.2. Very nice to have that on my phone, good job David!
On 2/18/2011 at 8:00pm, David Artman wrote:
RE: Re: [IAWA] Oracle Generator app for Android
Glad it works for you. Don't look at its memory footprint, and you'll be fine. ;)
[I've since discovered that App Inventor wraps, like, the WHOLE Scheme API into each application, not just those functions your code calls. That Oracle Generator should be about a 200KB app, not a 3MB one!]