Imperial Hack Evening
-
Upload
snig178 -
Category
Technology
-
view
1.043 -
download
0
description
Transcript of Imperial Hack Evening
Web APIsTuesday Talk - Imperial College - 26-02-
08Owen Griffin, Vodafone Group R&D
These slides are available on Google Docshttp://tiny.cc/D3HcM
- Quick Introduction- Mobile Development- Web APIs- Facebook Mashup- Other applications- Your ideas
This is who we work for
What's life like in R&D?
Summertime in Newbury
What's life like in R&D?
like these
APIsJavascript
Widgets
XHTMLXML
Ajax
SVGRuby on Rails
PHPJava
What do I do?
- Investigate Web Technologies
- Play with mobile devices
What do I do?
What do I do?
www.betavine.net
Member of the Betavine Development Team"An Open Community & Resource Website"
How many people own more than one mobile?
Zzzzz...
Questions
Has anyone done any mobile development before?
Questions
Has your application worked on more than 10 devices?
Questions
Mobile Development
- Worldwide mobile telephone subscriptions reached 3.3 billion- Thousands of different devices- Hundreds of different platforms- Too many choices for mobile development
Mobile Platforms- Windows Mobile- Symbian - Google Android- Apple iPhone- Java ME- Flash Mobile- Linux
Web Development
Easier than mobile development? Less devices, less platforms?
More developers and a larger audience?
Is the Web Browser a platform?
Web APIsAll the web sites mentioned before allow their users to access their information through an API.
There are 1000's of mini-applications on the web which make use of publically available Web APIs.
E.g.
http://www.flickr.com/services/api/
Allows you to:Search photosFind contactsTransform photosContribute
Uses HTTP withSOAPJSONXML-RPCREST
What can be done with Web APIs?
MashupsGoogleMaps mashups
Berkshire Floods1000's @ Google Maps Mania
Flickr MashupsRetrievrFastr
Social Network "Applications"Facebook applicationsOpenSocial
Services:Text Messages
Simple SMS messagesWAP Push links
Exchange of web linksApplication Trigger
Prompt applications to load on the phoneSupported formats:
JSONXMLRSSPlain text
Designed with mobile applications in mind. Simplistic - doesn't use a traditional authentication model. Read More..
Mobile Mashup Example
- Facebook, Bebo and MySpace, accounted for 5.17% of all UK Internet visits during October 2007
- So lets write a Facebook application...
Has anyone written a Facebook application before?
Uber Picture Poke
- Allows you to Poke your friends by showing them a photo of yourself on their mobile
- Requires both a Java Mobile MIDlet and a Facebook application
-The Facebook application uses the Betavine API to send an Application Trigger message to the MIDlet. The message contains a URL to an image. The image is downloaded and displayed on the mobile.
- http://apps.facebook.com/uberpicturepoke/
Uber Picture Poke - MIDlet
What we need to do:- Listen for messages- Download an image- Display an image
Lets just look at some code...
Has anyone written a MIDlet before?
Uber Picture Poke - FacebookThe Facebook application needs to:- List all of our friends which also have this application- Send an Application Trigger message to the MIDlet
Facebook API is extensive.. - http://developer.facebook.com/
The method we need is- Friends.getAppUsers
There is a helpful PHP library which interfaces with the API.
Facebook allows us access to all sorts of information, but.. does not let us find the users' mobile number.
Uber Picture Poke - Demo
Uber Picture Poke - FacebookSending the Application Trigger message:$url = "http://www.vodafonebetavine.net/api/send/trigger.plain?uaid=" . $uaid . "&dest=" . $mobile . "&message=" . $picture . "&port=" . $port;
$curl = curl_init();curl_setopt($curl, CURLOPT_URL, $url);curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);curl_setopt($curl, CURLOPT_TIMEOUT, 4);$response = curl_exec($curl);$error = curl_errno($curl);$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);if ($error != 0 || $httpcode != 200) { echo $response;} else { echo "<p>Poking.. " . $mobile . "</p>";}
Uber Picture Poke - Demo
References
- betavine.net developer resources
- betavine.mobi
- Reuters - Global cellphone penetration reaches 50 pct
- Social Network Usage Statistics
- Flickr API
- Facebook Developers