Nov 30

Your LocationSimon Judge is attempting to understand how Google Maps Mobile cell ID-based location actually works:

Hence, my best guess at how this all works is…

App sends IMEI and Cellid (if available) to Google
If IMEI is for operator with location service agreement then get position
else if Cellid available then look it up in Google cellid/position database
else tell the user their phone isn’t supported

He also notes that Java ME, in most cases, is unable to reliably retrieve a cell ID.

Nov 30

Ah, Friday. If you have a N95, have you tried out the version of AccelerInvaders? A perfect way to see a game that uses the accelerometer, and peace out for a few minutes.

Nov 29

Richard Monson-Haefel, ex EJB author, current mobile analyst, thinks that Microsoft should love Android.

His reasoning is basically: Android will fragment the Java world.

I disagree. Java on the phone is already fragmented. J2ME isn’t ONE thing, it is broken. As he himself says, Sun is moving on to Java SE on the phone, which makes sense as we have the computing power now. The current batch of top phones are computers, so let’s utilize that power.

Android is hopefully going to open up the entire mobile market. I don’t know if this will help Windows Mobile. In some ways it should (open networks etc). I don’t think that Android is going to cause Java developers to jump over to Microsoft though. They now have a great platform that is going to push Mobile Java forward.

I wouldn’t be too happy Microsoft. Ed Burnette feels the same way too, and put out a rebuttal:

If Mr. Monson-Haefel had done a little research first before making blanket statements like this, he would know that Microsoft .NET Compact Framework is not the same as regular .NET. Compared to the desktop version, the Compact Framework has some things trimmed out and some other things added in that are specific to mobile devices. Sound familiar? Android takes the exact same approach.

There is still one overall “Java platform”, regardless of what the language on top is (Java, JRuby, Groovy, etc.) or the particular flavors of the API (ME, SE, EE, GWT, Android), how the code is compiled and run (JIT, AOT), or even what the bytecodes look like. The Java platform is much bigger than any one hardware platform or vendor.

Android represents an incredibly positive new injection of resources and excitement into the Java, Linux, and open source communities. It’s unfortunate that a respected analyst like Mr. Monson-Haefel fails to recognize this fact.

Nov 28

The new Google Maps with My Location product is an update to Google Maps for Mobile that has location information even if you don’t have GPS.

It uses information from cell towers a la Navizon on the iPhone.

As for privacy:

This approximation is anonymous, as Google does not gather any personally identifiable information or associate any location data with personally identifiable information as part of the My Location feature. The feature can also be easily disabled by anyone who prefers not to use it.

And more info:

If you have a GPS-enabled device, this blue dot corresponds to your GPS location. At times, or if you do not have a GPS-enabled phone, you might see the blue dot surrounded by a light blue circle (as shown on the right) to indicate uncertainty about your location.

Why the uncertainty? The My Location feature takes information broadcast from mobile towers near you to approximate your current location on the map - it’s not GPS, but it comes pretty close (approximately 1000m close, on average). We’re still in beta, but we’re excited to launch this feature and are constantly working to improve our coverage and accuracy.

The My Location feature is available for most web-enabled mobile phones, including Java, BlackBerry, Windows Mobile, and Nokia/Symbian devices.

Just press “0″.

Nov 28

Is there something in the air? Verizon has traditionally been the network that tries the hardest to stay closed. They have been downright mean in how they cripple hardware.

new open network:

Beginning early 2008, however, Verizon will open itself to, “[a]ny device that meets the minimum technical standard,” and “[a]ny application the customer chooses will be allowed on these devices.” The company has yet to announce the minimal technical standards that it will set for applicable devices and applications. This is expected to be unveiled during an upcoming developers conference. A Verizon representative stated in a press conference this morning that the minimal standards are in place solely to ensure that devices will work with the network and that applications won’t have adverse effects on network users, such as the spread of malware.

Asked whether the network would be open to potential hardware manufacturers beyond the major players, Verizon CTO Dick Lynch stated, “If someone has the ability to build a phone in their basement on a breadboard, and they want to bring it us, the philosophy says, ‘Have at it.’”

“I think it’s important for us to realize that it’s not just phones that we’re talking about,” Verizon CEO Lowell McAdam added. He stated that the newly opened network would have the potential to cater to new devices that could potentially utilize the network, such as gaming systems. “It doesn’t matter whether it sells five or 5,000 devices,” added McAdam. “This makes it possible for anyone who wants to get into the game to get into the game. It just has to meet the general connectivity standards.”

We haven’t heard the real details, which should be coming at a Verizon developer event, but it seems to be a great time to be a mobile developer, and a consumer!

Nov 27

We have promised to open source all of Android. It just takes time to do it all, and do it right.

Some people get a little impatient and Michael Pavone is one of those people:

I’ve started another little reverse engineering project. Google hasn’t released any documentation on their new VM so I decided to get some the hard way. Well, hard is relative here. A decompiled Java class is a bit easier to read than a disassembled 68K binary. Anyway, I’ve managed to write some documentation on the dex file format used by the VM. I hope to have some documentation on the actual instruction set used by the VM in a few days, but for now I can whet your appetite with this: The instructions are variable length from 1 to 5 16-bit words. The VM appears to support 256 registers, but most instructions can only access the first 16. Instructions can take anywhere from 0 to 4 operands (though most take 2 or less). The actual opcode is stored in the first (least significant) byte.

He then goes on to give his view of the Dex file format.

Nov 27

First we saw the iPhone site. Then we had Blackberry support. Now we have Windows Mobile.

Peter Foot has written up Facebook Development with the .NET Compact Framework which delves into the world of creating a Windows Mobile Facebook view:

In the samples explored in this article we have seen how to use the functionality exposed by the Facebook Developer Toolkit. Although Facebook does not expose the full functionality of the site through their API, they provide a wide range of functions for retrieving information on your friends, groups, events, and photos. We have seen how to take advantage of Windows Mobile APIs to integrate Facebook data with our device Contacts and Calendar applications. Finally we saw how to browse and upload to your online photo albums directly from your mobile device.

Nov 26

There are a couple of PHP developers out there, and Nokia has announced that they can code on the S60:

I can now reveal that we at the CCNC conference in Las Vegas in January, 2008 will demonstrate and release what we call the PAMP stack.

PAMP stands for Personal Apache, MySQL, PHP, so yes, the full LAMP stack will be made available for S60 smart phones. In addition, there will be PHP extension modules that provide access to the core functionality of the phone. And on top of PAMP you can basically install any LAMP based content management system. For instance, Drupal can be installed off the shelf.

Yes, a fair amount of memory is needed and it’s still pretty experimental stuff, but it runs quite nicely on E90.

Wow, I was surprised to see JavaScript come to the phone, but now PHP?

Nov 26

As soon as Android was released people got to work delving into the native side of things and now Macrobug has posted about how you can use Scratchpad to build ARM binaries for Android:

Benno explains how to build simple native programs for Android. But any significant pre-existing Linux software package uses a complex array of libraries and a correspondingly complicated build process, typically based around GNU Autoconf. That build process usually involves a “configure” script whose purpose is to run tiny programs to experiment with the system, to find out its capabilities and set up the code appropriately.

Terrific, except it doesn’t work if, say, you’re building on an Intel x86 box, but trying to build for Android, which is based around Linux and an entirely different CPU. Fortunately, the Scratchbox project exists to solve this problem. It provides you with a special Linux universe, which uses the QEMU emulator to run ARM binaries. Hence: autoconf can run its experiments and all will be well.

It worked surprisingly well and surprisingly simply. Good work by the Scratchbox team.

Maybe this is how Benno produced his strace binary which he used to dig up some interesting stuff from Android. I’m not sure. Either way, I’m going to be building strace here as an example of how to get this stuff to work.

Nov 26

Many people are talking about Amazon’s Kindle eReader device, and Russell has done some digging on how it fares as a mobile browser:

The Kindle is using Access NetFront to power the browser, and it seems like a combo of a basic mobile browser on the client with a server side proxy. It formats the markup as best as possible, but because there’s no scrolling in the Kindle, it does break up normal sites into into insane numbers of pages. There’s a default mode - which seems to ignore CSS and JavaScript, and a more Advanced Mode, which is marked as being even more “Experimental” than the default mode. The Advanced Mode actually displays CSS, however, so I can’t imagine many people using the default unless they don’t know otherwise. The connection over EVDO is reasonably fast, though the screen’s redraw time might make you want to cry a bit.

Here’s the relevant header info:

HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0) NetFront/3.3
HTTP_X_FSN: ABC123ABC123ABC123ABC123ABC123ABC123ABC123ABC123*
HTTP_X_FORWARDED_FOR: 66.193.201.11, 10.0.52.11
HTTP_VIA: 1.1 (amazon proxy)
HTTP_ACCEPT: image/png, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

Because the internal browser is already doing paging, I used the above info to make sure that I deliver full pages through the Mowser content adapter - as it was confusing otherwise - and it seems to work pretty well. If you get a Kindle and want to use the browser for any realistic amount of time, I’d definitely recommend using Mowser, as the formatting ended up being much more readable (if I do say so myself), and you end up with less paging because of the more compact markup, and reduced image loading. Here’s a high-resolution example of the New York Times on the Kindle via Mowser.

All-in-all it’s a slick little device. The navigation for the web is a bit wonky - there might be a way of making more “Kindle-specific” GUI features which will help, but in general if you were to choose a reader, the free mobile browsing itself is worth quite a bit