views:

454

answers:

4

A mobile device like a Windows Mobile cellphone/PDA is by definition used from many kinds of locations, and should adapt accordingly. If I'm at home, I'd like it to switch to my local WLAN rather than using 3G or GPRS. If I'm in a meeting, I'd like it to be on silent buzzer rather than a loud ringtone. If I'm in a noisy environment, I'd like the ringtone to adjust accordingly. If I'm commuting home, I might want to send an automatic SMS to my SO.

There are a number of data sources I might use to determine where and what kind of environment I am in:

  1. The current GSM cell
  2. The available WLAN network SSID's
  3. The GPS coordinates (if that device is active)
  4. The calendar status (in a meeting)
  5. The microphone (noisy or quiet environment)
  6. The ActtiveSync status (probably at my computer)

I expect future generations of cellphones to allow more kinds of location-dependent configuration and behaviour. For now, I'm probably limited to writing something for myself. However, integrating location data sources and weighing evidence from different sources as to where I am and what I'm doing is something more than one application would be interested in, and something an end-user wouldn't want to configure to separate definitions in several applications.

The nearest question I've found is about how to get mobile cell ID's. Other API's are possible to locate, I guess (but any help is welcome).

Are there any frameworks or ideas which might help me integrate these data sources, let a user configure environments, and trigger events when a location or situation changes? How should I represent a location, based on evidence from several sources? Do you have quick links to applicable API's and components that could help me? Preferably for CF (and not just for Windows XP).

A: 

Buddycloud and their API may be of interest to you. They allow queries based on many of the things you listed.

In addition you can use bluetooth to detect your proximity to others, etc. Interesting stuff.

MattJ
A: 

for points 1 - 3 (at least), there are

ax
+1  A: 

This is a very interesting article in Code Project on how you can retrieve the CellID and then map it to a coordinate.

kgiannakakis
+1  A: 

In providing more insight on the suggestions already posted:

Location Information The reference to "Deep Cast" on CodeProject makes use of Google's web service for inferring one's location from a Cell Tower ID in addition to the GPS hardware in the phone if present. It is assumed that Google has wide coverage on cell tower IDs making the method perceivably reliable. The downside of this method is that it isn't clear what Google's view is on some one making use of the service. Google's possible dispositions could include (1) against this functionality being used by other programs (2) encouraging developers to use the functionality or (3) apathy (ie not retricting use of it but not supporting use of it either). The danger of the apathy disposition is that at some point in the far future Google could change the interface to the service without warning. If you intend to make a program for commercial reasons then you will really want to get clarity on Google's disposition.

The Skyhook Wireless service is extremely reliable. Apple uses Skyhook Wireless for their WiFi location in the iPhone and iPod. As of a couple of months ago Skyhook expanded upon the service so that instead of only doing WiFi based location on Windows Mobile Phones it will now use WiFi, GPS, and Cell Tower location. The downside of this service is if you plan on using it commercially you will need to consider licensing. Using this SDK from a .Net / managed application was initially a pain because of limitations in the interop abilities of the .Net Compact Framework. I managed to make a .Net wrapper and posted it to the Skyhook Wireless discussion group.

Location Based Reminders

A few months ago there was an MSDN article on location based reminders. For more information see the article and example code at http://msdn.microsoft.com/en-us/magazine/2009.01.wm6gps.aspx

Ambient Noise Detection

There was an MSDN Magazine code example from a few years ago that demonstrated how to automatically adjust your phone's volume based on the ambient noise level. For more details see http://msdn.microsoft.com/en-us/magazine/cc163341.aspx

Joel