• Save
Building PHP Powered Android Applications
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Building PHP Powered Android Applications

on

  • 57,044 views

This is a talk I gave at PHP Quebec 2009 on building Android applications with PHP back-ends. Posted for completeness, the majority of this talk was buried in Android/Java and PHP code.. That said, ...

This is a talk I gave at PHP Quebec 2009 on building Android applications with PHP back-ends. Posted for completeness, the majority of this talk was buried in Android/Java and PHP code.. That said, there are still some useful things in the slides themselves to share.

Statistics

Views

Total Views
57,044
Views on SlideShare
56,648
Embed Views
396

Actions

Likes
11
Downloads
0
Comments
1

8 Embeds 396

http://www.slideshare.net 375
http://www.e-presentations.us 6
http://www.blog.deitek.com 5
http://webcache.googleusercontent.com 4
http://translate.googleusercontent.com 2
http://www.techgig.com 2
http://intranet 1
https://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Android programming is done in linux, apps are written in java.
    Android programming can be done on any OS platform. :confused:open marriage
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Building PHP Powered Android Applications Presentation Transcript

  • 1. Building PHP Powered Android Applications John Coggeshall
  • 2. Introductions
    • Welcome!
    • About me
      • CTO of Automotive Computer Services (ACS)
      • Core PHP 5 Dev
      • Author, Speaker
    John Coggeshall Presentation Title
  • 3. Agenda
    • Crash Course in Android Development
    • Building PHP-powered backend services for the application
    • Bringing it all together
    • Warning: Nothing Magical here! Heavy Java/Android ahead!
  • 4. Server Backend
    • Zend Framework Backend of web services supporting our primary Flex-powered front-end
      • Supports both XML-based and Action Message Format (AMF) encodings
      • How Auth Service ultimately works:
        • Post to http://server/service/v1?command=auth.find the necessary parameters
        • Receive back a success, and a session ID
  • 5. Server-Side Service Code
  • 6. Basic Android Concepts
    • Activity – A “Screen” of your application where you do things
    • Intent – An inter-process / inter-activity notification system
    • Layout – An XML definition of widgets for an activity
  • 7. The Goal
    • Create an Android application that can authenticate against our pre-existing web services
      • Create the Android App itself
      • Create a Proxy that can communicate over HTTP to the backend server
      • Process the XML response
      • Save the authenticated session for future use
  • 8. The Android Application
  • 9. Considerations
    • Android itself doesn’t provide too many tools for web service calls (other than a HTTP client)
    • The most challenging piece of the connectivity is in the details
      • Error handling
      • Parsing of responses
      • Connecting all of it with an effective UI
  • 10. Another option
    • As Android is entirely Java-based, there are numerous Java toolkits that can help you along the way
      • Be careful, many are too bloated for Android
      • For XML-RPC, you can use the android-xmlrpc package
  • 11. If you’re going to try..
    • If you’re interested in trying the Android platform, here’s a few words to the wise:
      • Find good sources of documentation
        • Too many out-of-date / wrong articles
        • http://www.anddev.org/
        • http://www.helloandroid.com/
  • 12. Development Tips
    • Use the Android Debugger!
    • The Log class is great for printf() sort of things
      • (Shows up in the Android LogCat tab)
      • Log.e(“MyErrorTag”, “My Error Message”);
    • Server side: You *must* have good logging facilities
      • Log exceptions, errors (real and logical) to a file you can tail –f on when making service calls
  • 13. Development Tips
    • The AndroidManifest.xml file is very important
      • Need to define everything in there to some degree
        • Activity classes
        • Intent Filters
        • Permissions requested (i.e. Network access)
      • Works a lot better if you use the GUI interface instead of modifying the XML directly
  • 14. We’re Hiring!
    • Thank you!
      • Interested in working on a project like this? We’re hiring!
      • See our full-page ad in the conference program and visit us at the Job Fair!