4. No monoliths ..
but interconnected
components
All apps are equal!
5. Modular Apps
● Activity UI for one focused endeavor
● Service no UI, used for long running processes
● Broadcast receiver receives announcements
● Content provider makes data available
7. Intents (2)
● Transition and messaging between components
within application and beyond
● Source component + target component + data
● Expected behaviour, e.g. TAKE_PICTURE
● Used throughout the system
● Explicit vs. implict intents
Named target
or Tests against intent filters
8. Intent filters (1)
● Advertising functionality of compontent
● Registered at install / start up time
part of Manifest.xml
● Define tests for implicit intents
● Multiple filters of component are ORed
9. Intent filters (2)
● Action test
e.g. TAKE_PICTURE
One must match
Intent without action always accepted
● Data / Mime-type test
e.g. content://contacts/people/1 geo:0,0?q=Pizza
image/jpeg text/html
filters with wildcards
match everything specified
content: and file: schema implicitly supported
10. Intent filters (3)
● Category test
e.g. CATEGORY_DEFAULT, CATEGORY_BROWSABLE
All categories must match
Intents for activities always include
CATEGORY_DEFAULT
● User can choose if more than one target found
● Exception if no target found
12. In Practice
e.g. in Activity
Intent i = new
Intent(Intent.ACTION_VIEW);
i.setData(„http://www.openintents.org“);
this.startActivity(i);
this.startActivityForResult(i, RESCODE);
this.startService(i);
this.bindService(i, con, 0);
this.sendBroadcast(i);
13. Benefits
● Focus on core functionality
● Reuse
● Exchange system components, e.g.
home screen, keyboard, address book,
dialer
● Automatic handling
Tasks, plug-ins, menus, live folders
Don't forget performance and security!
14. OI Extensions
OI applications work together
OI Voice notes
OI Notepad OI Shopping list
OI Delete all
OI Convert CSV
OI About
OI Safe OI File manager
15. Create new intents
Every developer can create their own new intents:
VIEW SHOW
DISPLAY
EXHIBIT
EXPOSE
REVEAL
The Tower of Babel by Pieter Brueghel the Elder (1563)
16. OpenIntents.org
●
Discussion group since 2007
●
All about open applications and interoperability
●
Open source
●
List of Android libraries
●
Intents registry
●
Backed by OpenIntents UG
(haftungsbeschränkt)
– Closed source apps
– Organizer of droidcon
17. Intent registry
www.openintents.org
Browse and find
intents, actions,
applications, URIs,
extras
Promote your own
intents and applications
As of January 2010:
>50 registered intents
Reuse components!
Don't reinvent the wheel!
18. Dependency Manager (1)
● Intents create dependencies
between components
● Standard implementation:
– run-time dependency check
late binding
– nearly constantly connected
– Programs handles missing components
e.g. direct user to app store or
explain missing feature
19. Dependency Manager (2)
● Components that rely on dependent components
– A la distro package managers
– Light-weight, late binding still possible
– Helper library
– Declaration in Manifest.xml uses-intent
● Resolution helper with UI
– Interface to various sources, e.g. app stores,
personal listings, etc.
20. droidcon 2010
Brussels, Berlin
Barcelona, London
All information at
droidcon.be and droidcon.de
Free barcamp
Conference
Participate as speaker, sponsor or attendee
Get in touch with Android community
and decision makers
Present and discuss ideas and results
21. More info
Web site:
www.openintents.org
Developer group:
http://groups.google.com/group/openintents
Code repository:
http://openintents.googlecode.com
Twitter:
http://twitter.com/openintents