Audrey M. Roy

Art, design, Python, JavaScript, and general silliness 
Filed under

android

 

Android Dev Challenge

I made it!  I'm so tired.  I think I'm going to sleep for the next 12 hours and then take a break from coding tomorrow. 

I submitted two apps:

  • Brain Combustion: Multiples (bcmult.apk)
  • Clouds (clouds.apk). 
I haven't released Clouds to the Android Market yet because I want to work on it more.  So it's only available to the public through this post, for now :)

The uploader was acting unpredictably, but I think they went through.  Anyone else have this problem?  I kept uploading the new version of clouds.apk and seeing the old logo.  I don't know if they got the latest version or not.  I was having lots of problems with bcmult.apk too.

Click here to download:
clouds.apk (162 KB)

Click here to download:
bcmult.apk (34 KB)

Filed under  //   Android   PhoneGap  
Posted by email 

Comments [0]

My Android math multiplier game

Here's a video of my Android game working on the G1.  Currently the game has no sound because there's a bug in my sound-playing code that makes the app crash.  Hopefully there will be boings whenever you click in the real version. 

I'm open to ideas about how to make better use of the Android's sensors in the app.  I was thinking that it could give you hints when you shake the phone.  E.g. all the multiples of 4 would fall to the left side when you shook it to the left (at a 20-point penalty). 

This is just the development version.  I'll announce it's real title when it's officially out, which is something new that I came up with last night.

  

Filed under  //   Android   games   PhoneGap   programming   projects   XUI  
Posted by Audrey M Roy 

Comments [4]

PhoneGap - AudioFlinger error while receiving a Gmail email

In my (XUI) on click handler, I have this:
navigator.notification.beep(2);


The problem is that beeping stops working after awhile.  I think it stops working whenever my phone receives a network tickle from Gmail.

If I keep playing the game after the sound stops, the app crashes entirely after a little longer.  That's really bad.

The log.txt showing the AudioFlinger error & Gmail notification:  

I'm stuck.  I guess these are my options:

  • Play a non-beep sound on click and see if it still happens.  Find a free wav to use.
  • If that doesn't help, look at PhoneGap.java to better understand how audio works in PhoneGap.  And learn how audio generally works when using the Android SDK.
  • Give up and remove audio from the game. 

Filed under  //   Android   audio   PhoneGap   programming  
Posted by Audrey M Roy 

Comments [3]

How to set up a real G1 Android phone for development on Ubuntu 9.04 (Jaunty Jackalope)

I'm renting a G1 from someone for a few days to test my app.  The Android docs don't mention how to install the G1 on Ubuntu Jaunty (9.04).  What I did to install it:

$ cd /etc/udev/rules.d/
$ nano 51-android.rules

and create a file containing this:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

then:
$ sudo chmod a+rx /etc/udev/rules.d/51-android.rules

Check that it attached:
$ cd /your_android_sdk_path/tools/
$ $ ./adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT94YLC00022    device

After this, I was able to run my app on the real Android via Eclipse.

Filed under  //   Android   programming   Ubuntu 9.04  
Posted by email 

Comments [0]

Progress on my first PhoneGap/XUI app

I'm making great progress with the app.  I wrote the code entirely from scratch tonight.  And the app mostly works now.  You click on boxes that match a specified condition to earn points.  The faster you do it, the more bonus points you get. 

I spent over an hour trying to figure out how to get the text from a DOM element with XUI.  It must be something like x$('#foo').text() or x$('#foo').html().nodeValue.  I tried a million things and couldn't figure it out.

I know that x$('#foo').html() returns a Javascript object because I printed it in an alert, but then I don't know what to do with the object.  If only I could run the app in Firefox and use Firebug, then I could inspect it.  I did try loading just the html file in Firefox and commenting out the link to phonegap.js, but that didn't work. 

Tomorrow:

  1. Figure out how to get the text of a DOM element with XUI.  Fill in the condition test that uses the text from the number box divs.
  2. Load state from somewhere (a text file?) upon app launch, and save it at the end of every level.
  3. Try to add some cute accelerometer-using feature to the app.
  4. Come up with a good name.  Firethink?  I don't know.  Something about speed/fire + math/thinking/mental workouts.

Filed under  //   Android   JavaScript   PhoneGap   programming   XUI  
Posted by email 

Comments [2]

PhoneGap sample project running in Android emulator

PhoneGap is awesome. 

I'm using Eclipse Ganymede, Ubuntu 9.04. 

To do:

  1. Get rid of scroll bar?
  2. Set up the Android vibration/sensor simulation tool.  I believe this is something separate?  Clicking 'Beep' makes noises, and 'Call 411' brings up the dialer with 411 properly, but that's all I could verify right now.

Filed under  //   Android   PhoneGap  
Posted by email 

Comments [0]