Datasheet

22
Part I: Getting Started
What you can also do is post local notifications as a way to get a user’s atten-
tion when important events happen. (This is especially relevant to Location
Services, which I cover in greater detail in Chapter 18.) For example, a GPS
navigation-type application running in the background can use local notifica-
tions to alert the user when it’s time to make a turn. Applications can also
schedule the delivery of local notifications for a future date and time and
have those notifications delivered even if the application isn’t running.
Accessing the Internet
The ability to access Web sites and servers on the Internet allows you to
create applications that can provide real-time information to the user. It can
tell me, for example, that the next tour at the Tate Modern is at 3 p.m. This
kind of access also allows you, as the developer, to go beyond the limited
memory and processing power of the device and access large amounts of
data stored on servers, or even offload the processing. I don’t need all the
information for every city in the world stored on my iPhone or have to strain
the poor CPU to compute the best way to get someplace on the Tube. I can
send the request to a server and have it do all that work.
This is client-server computing — a well-established software architecture
where the client provides a way to make requests to a server on a network
that’s just waiting for the opportunity to do something. A Web browser is an
example of a client accessing information from other Web sites that act as
servers.
Address Book and Contacts
Your application can access the user’s contacts on the phone and display
that information in a different way, or use it as information in your applica-
tion. As a user of the MobileTravel411 application, for example, you could
enter the name and address of your hotel, and the application would file it
in your Contacts database. That way, you have ready access to the hotel
address — not only from MobileTravel411, but also from your phone and
other applications. Then when you arrive at Paddington Station, the applica-
tion can retrieve the address from Contacts and display directions for you.
What’s more, you can also present standard system interfaces for picking
and creating contacts in the Address Book.
Calendar Events
If you can leverage the information stored in the Address Book and Contacts
databases, it stands to reason you can do the same thing with the Calendar
application. You can remind a user when they need to leave for the airport,
for example, or create calendar events based on what’s happening this week
in London. These events show up in the Calendar application and in other
applications that support that framework.
05_879962-ch01.indd 2205_879962-ch01.indd 22 8/30/10 8:28 PM8/30/10 8:28 PM