Valid HTML 4.01 Transitional

HTC G1 Cellphone
Miscellaneous Stuff

Jim Carter, 2009-03-30

This page is for miscellaneous stuff that I haven't had time to properly put into categories.

To-Do List

Not finished:

Finished items:

Useful Blogs and Postings

HTC Website for G1 Support: This is useful. Get it into the main pages somewhere other than Miscellaneous.

Step by step instructions how to flash a system/radio image.

Backup ideas:

Gabor Paller's blog about Android. The referenced page is the entry about Bluetooth.

T-Mobile G1 Review (2009-01-29) by Edward Umana. The referenced page is about connectivity. He compared several phones:

This review is pretty useless; I'm not going to read the other pages.

Android FAQ for Bluetooth.

Android Roadmap as of, well, there's no date, but probably late 2008, and has been updated to show some events finished in 2009-Q1.

Cupcake issues: (Only those interesting to jimc are shown)

Trying to display my home page

The home page is a file, /sdcard/html/homepage.html Using OI File Manager I select it and the browser says: The Web page at data:text/html;null,%3Chtml%3E%3Chead%3E (etc. etc.) might be temporarily down . . . (%3C = <, %3E = >) Subsequent content (not shown) appears to be the entire content of this page. It looks like the file manager may have read the file, prepended data:text/html;null, (assuming that null is to be interpreted as four bytes and not as \0), and sent the whole thing off to the browser, which choked on it.

Trying other file managers: The only credible one (and recommended by a few comment posters on the others) is Linda. It gave the same results as OI File Manager. However, Linda can open with an arbitrary app, and in the list I discover which one is the default: HTML Viewer. I wonder if this is identical to the browser, or is an alternate interface expecting different arguments. On the other hand, if I start the browser and type in the URL data:text/html;/sdcard/html/homepage.html, all the material after data: is shown verbatim. Well, we're making progress.

If I type in a URL of file:///sdcard/html/homepage.html, the browser claims that The web page at file:///sdcard/html/homepage.html could not be loaded as: If I try file://localhost/sdcard/html/homepage.html, the browser says the same thing, removing localhost from the URL in the error message.

How to Display a Local File in the Browser

Android Developers discussion: Luca Belluccini says, you can't use file:// URIs any more. (Why???) A solution is to read the file content and do data:mimetype and the content, max of 8kb. Megha Joshi says the file: URL was killed for security reasons (I can see that).

See if href="content://android_asset/filename.html" does anything useful. No content provider: (and repeats the URL). This is a simplified version of the content provider hack. This is an example using these techniques. The cupcake update is called RC31. See if camera app can do video recording -- that's a new feature. I think it can't.

GPS Control Data

/etc/location/gps/nmea is a file which looks important. -- NMEA = National Marine Electronics Association. This web page is reverse engineering of an obsolete version of their interoperation standard (v3.01); see the NMEA website to purchase a current version. GPS receivers send sentences, which are data packets including the position, velocity and time. Content is ASCII; fields are comma separated; records begin with $GPRMC (in our case) and end with CR-LF.

The fields in a GPRMC sentence are:

This file is possibly a history of the GPS unit's output.

Checking Your Account Balance

For T-Mobile in the USA, one of the FAQs says that you can send a USSD code of #225# (dial it like a phone number, press the green call button to send it out) and they will reply with your account balance. However on the Sidekick To Go plan this code is rejected. But a different FAQ for Sidekick says to use #999# -- and this one works. A pop-up window appears within a few seconds with the account balance.

For adding credit to your account they give several methods.

On AT&T here's a list of OSSD services. Dial the code and hit the green send button to send it out. In most cases you get a text message back in a few seconds.

*225# (*BAL#, in Spanish *725# *SAL#)

Check your account balance, dollar denominated. Don't use this feature for GoPhone (pay as you go).

*646# (*MIN#, in Spanish *876# *USO#)

Check your account balance denominated in minutes.

*3282# (*DATA#)

Check remaining data usage, broken down by type.

*729 (*PAY, in Spanish *72427 *PAGAR)

Pay to your account. This is a call to a voice activated robot. No ending #.

*639# (*NEW#)

Check if you are eligible to upgrade your phone at a subsidized rate.