Android Bootstrap

  • 7,675 views
Uploaded on

Deck for Android Bootstrap presented at HDC12.

Deck for Android Bootstrap presented at HDC12.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • i want it
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
7,675
On Slideshare
0
From Embeds
0
Number of Embeds
4

Actions

Shares
Downloads
0
Comments
1
Likes
17

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • This is basically a show and tell where you’re going to be able to change things on the fly. \n
  • \n
  • * Inspired by Twitter Bootstrap and iOS Boilerplate and uses code from Github Gauges and the Github androia pp. \n* Needed because getting set up with ALL of these frameworks and tools is a royal pain.\n\n\n\n
  • \n
  • \n
  • \n
  • * Note that there is no content resolver, YET, but there will be soon with examples of how to write and reas from teh underlying SQLite database. \n
  • \n
  • Next slide shows URL of the site.\n
  • Open browser if needed. \n
  • Next slide shows URL of the site.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • * Show how the code has to be reimplemented by combining the libraries. \n
  • Next up Account Manager\n
  • Next up Account Manager\n
  • Next up: HTTP Communication\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Transcript

  • 1. Android Bootstrap Developing Android applications with open-source tools.
  • 2. about me
  • 3. What is it? &Why is it needed?
  • 4. expectations• Installed IntelliJ or know how to use Maven with Eclipse• Have an emulator or device to test with• Intermediate level
  • 5. HistoryAndroid Bootstrap’s Beginning
  • 6. Data
  • 7.   driv en
  • 8.   from
  • 9.   an
  • 10.    API
  • 11.   on 
  • 12.   Parse.com
  • 13.   
  • 14. Features Included• RoboGuice • Fragments• ActionBarSherlock • View Pager• Maven Build • View Pager Indicator• Custom Theme • Http-Request Support• HTTP Communication • Custom List Items• Consume JSON Endpoint • Remote Image Download & File Caching• Account Manager • RoboAsyncTask• GSON • ... and more
  • 15. Setup Time (For all the tools and frameworks listed previously) this
  • 16.   is
  • 17.   what
  • 18.   tIn my experience: 3~5days usually
  • 19.   looks
  • 20.   l he
  • 21.   cycle
  • 22.   of
  • 23.   dev ike
  • 24.   over
  • 25.   the
  • 26.   c elopment
  • 27.    ourse
  • 28.   days/weFor a beginner: 1~3 weeks eks 10% 20%Analysis/ResearchGetting it to work/Smashing face into deskProcrastination 70%
  • 29. Where’s the code?
  • 30. AndroidBootstrap.com Generate your app with the correct app nameand package name. Coming in the next two weeks.
  • 31. Until then, get it here:github.com/donnfelker/android-bootstrap
  • 32. Building the App
  • 33. What is Maven?A build/project/dependency tool (and more!). All defined in the pom.xml file.
  • 34. Maven App Arch Parent and Child POM’s
  • 35. Building with Maven You will need Maven 3.0.3 (or greater) to run this. Open your command prompt.Navigate to /path/to/android-bootstrap Run this command: mvn clean package ilds
  • 36.   the
  • 37.   app (10 Min. Cap) this
  • 38.   bu
  • 39. IntelliJ (Our IDE) Open IntelliJ File > Open ProjectNavigate to /path/to/android-bootstrap Open pom.xml (20 Min. Cap)
  • 40. Maven Settings• Force Import• Check download sources in settings
  • 41. IntelliJMavenSettings
  • 42. Import Maven Projects
  • 43. You Should See ... (In the project window, left hand side of screen)
  • 44. Run Configuration Run > Edit Configurations Create a new Maven configuration:
  • 45. Run Configuration Run > Edit Configurations important basical ly
  • 46.   says
  • 47.   ... nd
  • 48.   at
  • 49.   this
  • 50.   location” en,
  • 51.   run
  • 52.   this
  • 53.   comma“hey
  • 54.   mav
  • 55. Build in IntelliJ?• Sometimes can get wonky.• Always default to command line.
  • 56. IntelliJ Shortcuts Change keymapping: File > Preferences• OSX (OSX Keymapping) • CMD + N: Go to Class • CMD + SHIFT + N: Go to file • CMD + B: Go to definition• Windows/Linux • CTRL + N: Go to Class • CTRL + SHIFT + N: Go to file • CTRL + B: Go to definition
  • 57. App Architecture
  • 58. Bootstrap Architecture • parent • app • integration tests
  • 59. Action Bar Sherlock & RoboGuice uice
  • 60.    
  • 61.   RoboG ABS
  • 62.   & ed
  • 63.   ...notice
  • 64.    
  • 65.   combin are
  • 66. Custom Theme Theme.Bootstrap.Dark
  • 67. Account Manager Implemented so you don’t have to (thank goodness)
  • 68. Account Manager Gotchas Different Process - Hard to debugMost of the time - don’t access the main UI thread Can access via the Android settings
  • 69. HTTP CommunicationService Layer / JSON Consumption w/ GSON
  • 70. Parse Using the Parse.com REST APIExample request: curlcurl -X GET -H "X-Parse-Application-Id: zHb2bVia6kgilYRWWdmTiEJooYA17NnkBSUVsr4H" -H "X-Parse-REST-API-Key: N2kCY1T3t3Jfhf9zpJ5MCURn3b25UpACILhnf5u9" https://api.parse.com/1/classes/ Example response: { "results": [ { "location": { "__type": "GeoPoint", "latitude": 33.379530000000003, "longitude": -111.94038999999999 }, "name": "Free Range CrossFit", "createdAt": "2012-09-03T23:49:31.055Z", "updatedAt": "2012-09-03T23:49:44.065Z", "objectId": "NuomvMZ91i" }, ... }
  • 71. View Pager & Indicator Understanding the framework
  • 72. Understanding Fragments Reusable components Framework Fragments - Fragment - List Fragment App Types - ItemListFragment<T>
  • 73. Create a new Fragment
  • 74. The Other Great StuffBasic Android Examples in the App• Serializable Objects• Starting Activities• The Intent Chooser
  • 75. Hack Session
  • 76. Thanks!