Archive for the ‘iPhone’ Category

Corporate discount on your AT&T plan with iPhone

December 11, 2007

If you had a 10% corporate discount with your AT&T plan, you must be aware that you lost that discount when you activated your iPhone. Well if your plan was a family plan, you will be able to get the discount back, if your register one of your other telephone numbers as your “primary” phone number. I did this today and the whole process with an AT&T representative on the phone took less than five minutes, and the discount will be applied to my account on the next billing cycle. Sweet!

Sarabjit found this cool trick by discussing his iPhone activation with AT&T. Thank you Sarabjit!

Routes in iPhone Google Map Application

October 28, 2007

With regular Google map, you can specify multiple destinations in the same URL. I was hoping to be able to create a bike route using Google maps and then e-mail it to my iPhone and thus display it in the iPhone’s Google map application. But no such a luck. The iPhone Google map application cannot handle multiple destinations. In the regular browser based Google map you can directly encode a route in a URL, e.g. here is route from San Jose, CA to Los Gatos, CA to Salinas CA:

http://maps.google.com/maps?saddr=Park+Ave+San+Jose+to:Los+Gatos+CA+to:Salinas+CA

Unfortunately iPhone’s Google Map Application is unable to process this kind URL. It looks a like a bug that hopefully will get fixed in some future upgrade.

Kennedy/Shannon Road Bike Trail II

October 14, 2007

Kennedy/Shannon Bike TrailThis is an easier Kennedy bike trail than the one I took last week. But it still has a couple of steeeeep hills and a number of panoramic views that take your breath away. The hardest hill Oct-14 ride elevation chartis on the way back on Kennedy just after Shannon. Here is the elevation chart (the elevation chart needs to be improved). Here is the Ruby code for the map and the elevation. The data from my Garmin GPS device is in GPX 1.0. The times are in UTC and the elevations in meters. The display of distance and elevations is in feet and miles. But when you import the data the distances are in meters.

I created the elevation chart in dojo JavaScript library hoping that it would work on iPhone, but unfortunately it doesn’t. Its time to forget about client-side charting and go back to generating chart images on the server.  

iPhone Safari Debug Console provides Tips

October 4, 2007

The Safari browser of iPhone has a Debug Console that you can activate using the Settings >> Safarai >> Developer option. This Console provides valuable information on the current page. In addition to pointing out errors (in HTML or JavaScript) it also provides Tips. I was surprised that when I followed the Apple’s own tip to use the meta viewport tag with the width set to 320, that I was in for yet another tip. The Tip in the Console informs me about an HTML Tip on a Line number:

Viewport width or height set to physical device width, try using “device-width” constant instead fo…

The odd thing is you cannot click on this tip to get further information, the string is just cut after fo.... Apple needs to provide a Tip to the Tip writers about the length of tips.

iPhone and the meta viewport tag

October 3, 2007

viewport and iphoneIf you want your content to look perfect on an iPhone you must use the viewport meta tag. Without it, your page may look like thumbnail. I had not heard of this tag until now. But it does the trick.


<meta name="viewport" content="width=320, user-scalable=yes">

Add this tag to the head section of the HTML page. If you set user-scalable to no, then your users wont be able to zoom in or out, so it is friendly to set it to yes (unless you are writing a page that is not meant to be zoomed in).

Adobe SHARE for your iPhone

October 2, 2007

Adobe SHAREAdobe today released a beautiful looking online service called Adobe SHARE (beta). Share can be viewed as your online document library in the clouds. You can easily upload a document and share it with others. A thumbnail and an Adobe Flash preview of most document types are automatically created and the Flash preview can be embedded in most blogs. At this point the share service requires a browser with latest version of the Adobe Flash plug-in.

Share PDFIn addition, today Adobe also released the web services for SHARE. The web services offer a simple REST based API to access Share libraries. You can use the web services to create mash-ups. In my quest to learn Ruby on Rails. I’ve written a simple application (based on the RailsSpaces book) that allows you to view your Share library using plain old HTML. I wanted to access my Share library on my iPhone (which has an excellent support for PDF and other file formats). The current mash-up - http://web.sharepdf.com/ - is not speedy, nothing is currently cached and there are lots of other applications running on this server. You can see the source code here.

There are a couple of minor bugs in the current web services & this mash-up:

  • The XML requests cannot contain any new line characters. For now, just send your XML request as one long string with no line breaks.
  • Ruby returns the current time in seconds. Share API requires the time in mili-seconds, so consecutive calls may appear to be issued at the same time. Just add a sleep in between the calls, e.g., to insert “sleep 1″ when you iterate over the list of your documents.
  • There is a typo in the API documentation, the URL to get the source document must end in src and not in source. See the definition of the method src.
  • I tweaked the site.css file and now the application shows up as a tiny thumbnail on my iPhone. Just tap on the app and iPhone will automatically zoom it.

Maps on iPhone: Bike route from Los Gatos to San Jose (part 2)

September 14, 2007

bike2.pngI’ve overlaid two bike routes from Los Gatos to San Jose. I noticed that the maps look fine in Firefox but on iPhone you cannot really zoom in as easily as you can in the desktop browser. This is one reason why Google is a special application on the iPhone and not just a web page in the browser. iPhone finger interface works a lot better on the Google iPhone app than it does on the Google browser map. Unfortunately you cannot enter a URL in the Google Maps application, you need to search for an address. It is not clear if it is possible for users to display their mash ups in Google iPhone Maps application or not. Does any one know?

iPhone’s User-Agent

September 13, 2007

By using Charles‘ excellent reverse-proxy feature you can monitor the HTTP traffic from the iPhone Safari right on your Mac. Here are the HTTP headers that iPhone sends when it requests note19.com (I added the line breaks for ease of reading):


GET / HTTP/1.1
Accept-Language: en
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en)
                 AppleWebKit/420+ (KHTML, like Gecko)
                 Version/3.0 Mobile/1C28 Safari/419.3
Accept: text/xml,application/xml,application/xhtml+xml,text/html;
           q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Connection: keep-alive
Host: note19.com:80

You can use the value of the User-Agent to detect on the server that the request is coming from an iPhone and then return an iPhone friendly response, if necessary.

Games on iPhone

September 12, 2007

The other day I bought a couple of iPod games (for the first time) on iTunes assuming that they will also work on my iPhone. But unfortunately the iPod Video games only play on iPod Videos. Dang! All is not lost, however, I found much better games on macmost.com –  better and free. The macmost games can  be used on iPhone (any browser actually). Thank you macmost!

Skype on iPhone

September 11, 2007

Today I wanted to call Canada & I wished I had Skype on my iPhone. Google search lead me to soonr.com. They’ve provided a very clever solution to running skype practically from any browser. First install the soonr application on your desktop, next you create an account on soonr, verify your email and cell phone. Finally you login to your account via Safari browser. From the browser you can see your skype contact list. Click on a contact to make a call. This sends a “message” to your desktop, which will call your contact and conference call you in. Super cool. I tried it, and calling Canada from the iPhone worked really well. The quality of the sound is skypish - not as good a real phone call but good enough. I typed this note on my iPhone.