Sie sind auf Seite 1von 46

@kevinmcdonagh

Android isn't just about phones


W3C standards
'95 - HTML4
'96 - XML
'2012? - HTML5
New input element's in HTML5:
tel, week,
search, time,
url, datetime-local
email, number,
datetime range,
date, color
month,
WebSocket API
WebSocket protocol
Server-Sent Events
Web Storage (localStorage and sessionStorage)
Web SQL Database
Geolocation
Workers
Offline

hasFeature("XHTML", "5.0")
Source: Isuppli Press release 201

Source: "Future of Embedded Systems Technology". BCC Report G-229R.


● Set Top boxes
● GPS Units

● Kiosks

● Self-Checkout

● Phones

● Personal Computers

● Medical Equipment
3,000,000 iPads in 80 Days
1992 - *7
Dalvik Optimisations
●Byte Code
●One DEX file with shared constant pools

●Dex files are read only & shared within processes

●Alignment and Ordering to suit local system

●Register based
●Intents
●Intent Receivers
• Broadcast Receivers
• Intent Filters listen to Broadcast Intents
Intent Types

Activity Action Broadcast Intents


Intent intent = new Intent (......................);
startActivity(intent);

Intent i = new Intent();


i.setAction("my.package.action");
i.putExtra("number", new Integer( 99 ) );
i.putExtra("text", new String( “foo”) );
startSubActivity(i, ACTIVITY_INVOKE);
Intent intent = new Intent (Intent.ACTION_DIAL,
Uri.parse(“tel:93675359”)); startActivity(intent);

Intent intent = new Intent (Intent.ACTION_VIEW,


Uri.parse(“http://www.droidcon.co.uk”));
startActivity(intent);
<activity android:name=”.HelloWorld” android:label=”@string/app_name”>
<intent-flter>
<action android:name=”android.intent.action.VIEW”/>
<category android:name=”android.intent.category.DEFAULT”/>
<category android:name=”android.intent.category.BROWSABLE”/>
<data android:scheme=”scheme”/>
</intent-flter>
</activity>

Intent intent = new Intent (Intent.ACTION_VIEW, Uri.parse(“scheme://”));


startActivity(intent);
<activity android:name=”.HelloWorld” android:label=”@string/app_name”>
<intent-flter>
<action android:name=”android.intent.action.VIEW”/>
<category android:name=”android.intent.category.DEFAULT”/>
<category android:name=”android.intent.category.BROWSABLE”/>
<data android:scheme=”http” android:host=”droidcon.co.uk”/>
</intent-flter>
</activity>

Intent intent = new Intent (Intent.ACTION_VIEW,


Uri.parse(“http://www.droidcon.co.uk”));
startActivity(intent);
<receiver android:name=”CameraPressedReceiver”>
<intent-flter>
<action android:name=”android.intent.action.CAMERA_BUTTON”/>
</intent-flter>
</receiver>

public class CameraPressed extends Broadcast Receiver {

@Override
public void onReceive(Context context, Intent intent) {
CRUD with HTTP verbs (post/get/put/delete)
Simplicity in data sources through a unified interface

query()
insert()
update()
delete()
getType()
onCreate()
Dim Screens
Suspend long tasks
Warn about I/O
Don't poll
+ <add yours>
Receive message
Check scheme
Check contents
Intercept SMS
Pass Extras
Generate suggested todos
Suspend resources
Change Answering machine
Auto responders to email
Suspend Services
Auto download shows/podcasts
28th/29th October
Largest ever
Android Conference!

In London!

www.droidcon.co.uk
@novoda
www.novoda.com

@kevinmcdonagh
Tel: 07981932411

Das könnte Ihnen auch gefallen