*
*
Home
Help
Login
Register
Welcome, Guest. Please login or register.
October 30, 2014, 05:42:40 AM

Login with username, password and session length
Forum changes: Editing of posts has been turned off until further notice.
Search:     Advanced search
46709 Posts in 5588 Topics by 13297 Members Latest Member: - Shane786 Most online today: 123 - most online ever: 429 (November 03, 2007, 04:35:43 AM)
Pages: [1]
Print
Author Topic: [IAWA] Oracle Generator app for Android  (Read 3505 times)
David Artman
Member

Posts: 606

Designer & Producer


WWW
« on: January 31, 2011, 08:03:26 AM »

I wanted to play with App Inventor, but I didn't want to, you know, actually INVENT an app. So I lobbed, with this:
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? ;)
Logged

Designer - GLASS, Icehouse Games
Editor - Perfect, Passages
David Artman
Member

Posts: 606

Designer & Producer


WWW
« Reply #1 on: January 31, 2011, 10:52:38 AM »

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.
Logged

Designer - GLASS, Icehouse Games
Editor - Perfect, Passages
lumpley
Administrator
Member
*
Posts: 3656


WWW
« Reply #2 on: February 01, 2011, 09:05:08 AM »

I am Androidless, but I'd love to hear about people using this!

Thanks, David.

-Vincent
Logged
David Artman
Member

Posts: 606

Designer & Producer


WWW
« Reply #3 on: February 01, 2011, 10:45:23 AM »

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). ;)
Logged

Designer - GLASS, Icehouse Games
Editor - Perfect, Passages
Christoph Boeckle
Member

Posts: 545

Yverdon, Switzerland


WWW
« Reply #4 on: February 17, 2011, 05:43:39 AM »

Works perfectly on my Samsung Galaxy GT-I9000, firmware version 2.2. Very nice to have that on my phone, good job David!
Logged

Regards,
Christoph
David Artman
Member

Posts: 606

Designer & Producer


WWW
« Reply #5 on: February 18, 2011, 12:00:17 PM »

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!]
Logged

Designer - GLASS, Icehouse Games
Editor - Perfect, Passages
Pages: [1]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
Oxygen design by Bloc
Valid XHTML 1.0! Valid CSS!