advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Partners & Affiliates
advertisement
advertisement
Rate this item | 0 users have rated this item.
 Print Print
 
Android Mobility: Open Source Hits the Road
Learn to leverage Android's powerful APIs to rapidly create sophisticated applications for media, data storage, and networking. 

advertisement
ven prior to Google's splashy announcement about Android late last year, rumors were swirling about the so-called "gPhone." Now that programmers have had several months to experiment with early releases of the SDK, a clearer vision of Android has emerged. Android offers a robust and modern Java-derived API, visual components that look great out of the box, and has a uniquely pluggable architecture that makes first-class citizens out of all your phone applications.

That said, Android does have its faults. Some of these are just growing pains: APIs that do not work as expected, unimplemented features, or outright bugs. Many developers also feel nervous about Android's future—if Android becomes just another platform to support, its new features will become a burden to already overwhelmed porting engineers.

Do Android's positive features outweigh the negatives? The best way to tell is to try it for yourself! This article will take you on a whirlwind tour through many of Android's capabilities as you build a networked camera application called ConnectedCamera. You will learn how to use Android's camera, create files and databases for storage, navigate through multiple screens, update information, and communicate with a server. Though you'll be building a richly featured application, it's also simple enough that you'll be able to focus on the important concepts.

Step Zero
First, some housekeeping. The application in this article was developed using the M5-RC15 release of the SDK. It should run on earlier or later versions as well, but will require modification as Google continues to tinker with the APIs.

Prior to starting, install the SDK and set up your development environment. You should be able to run the basic "Hello World" application that is created with new projects. If you need help, see the related resources at the left-hand navbar of this article.

Start a new Android project. Your main Activity's name will be Camera and the layout camera.xml.

Imagining the App
Before digging into the code, it's helpful to think a bit about how to organize the application. First, it's generally best to make each screen a separate Activity. This leverages Android's existing capabilities for state transition and management, and cleanly divides the application into components. It's not hard to do either. You'll need four Activities: a camera, an album, an editor, and an uploader.

You'll also need a way to store data. Android offers a plethora of persistence mechanisms, but in this instance, two are most applicable: a SQLite database or a Content Provider. Because you do not need to share data with other applications, private SQLite storage is the best option for this app.

Finally, you need to decide if your application needs to act or respond when not actually running. If so, you'll need a Service or special IntentReceiver. In this case, you don't need it, so let the coding begin!

Page 1 of 5
advertisement
  Next Page: Take a Picture
Page 1: IntroductionPage 4: Linked In
Page 2: Take a PicturePage 5: Sharing
Page 3: Stick Around 
DevX is a division of Jupitermedia Corporation
© Copyright 2007 Jupitermedia Corporation. All Rights Reserved. Legal Notices
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES