Samuel Wong

Ramblings of a rocket scientist turned web developer

Notes on AndroidTO Conference

Just some of my personal notes from the AndroidTO conference in Toronto. Not all the slides/code from the speakers have been posted to the androidto.com site… boo-urns!

What’s covered:

  • Just Because It’s Mobile Doesn’t Mean It has to be Native
  • Android tips and tricks
  • Near Field Communication (NFC)
  • Rogers Catalyst
  • Kernels 101
  • Custom Views
  • Google AppInventor

Just Because It’s Mobile Doesn’t Mean It has to be Native

This is an ongoing discussion everywhere. Unfortunately I only caught the tail end of this talk since I was manning the registration booths.

Some HTML5 keywords that I caught:

  • Cache manifest
  • .appcache file
  • Html manifest: Use Javascript to detect when manifest has updated
  • window.localStorage
  • The basecamp web app is a good example.

Some tools that were helpful in building a mobile-conscious webapp:

  • Batman.js, a javascript mvc framework that uses data attributes to render interacrive views
  • Skeleton CSS, a responsive CSS framework. Responsiveness is all the rage now. The css will detect the mobile agent and present a different layout.
  • Use the meta tag to set viewport size.

Chris’s Github | Chris’s blog

Android tips and tricks

  • Use Content providers
  • Register your intent filters; registering will launch your native app whenever you encounter your URL
  • Use fragments, reusable!
  • Error tracking and other reporting with Flurry and Acra
  • Dev tools: Layoutopt, Hierarchyviewer, Monkey (for automated testing), Strict mode

Tips

  • Leave the ui thread alone
  • Develop and test on worst case devices
  • Design for orientation switching
  • Keep in mind dpad
  • Design for offline whenever possible
  • Beta test on the market
  • Be stingy with permissions
  • Register company package: com.unstash.Android
  • Use strings.xml and translate
  • Use public apis, calendar content providers in ICS
  • Always assume your tasks can be interrupted
  • Battery life considerations
  • How to jump the learning curve: watch google io videos
  • How to quickly implement expected UI gestures like pull-down-to-refresh? It is a custom widget, you might find on Github.

NFC

This was the best talk, honestly. They had demos of NFC working and also dived into the source code. Essentially, NFC can be used to launch Intents and transfer information from one device to another, or from a NFC tag to the phone.

Code

Rogers Catalyst

Ah, the requisite sponsor speaker. Rogers offer interesting things to developers, like network-based location (coarse), access to Customer Telephone Number (CTN), SMS delivery and receive-handling (shortcodes), and carrier billing. Of course, they’ll charge you for use of these services and it’s only available for Rogers customers. The speaker demo’ed an app where he could tweet to his phone and the phone would reply with its location, via Twitter DM.

Question from the audience: why would you use Rogers location API over Google’s location API? Turns out, Google uses Rogers location API underneath its own API… so it might be faster to use Rogers directly? Or they just want your money.

Slides

Kernels 101

This went over my head, partly because I was on the side of the stage and partly because his font size was so small I could hardly follow what he was doing. But in essence, he compiled the Android kernel with some familiar tools like fastboot and codesorcery.

Custom views

Sometimes you just got customize some behaviour not offered by the APIs. To do this, dive into the android source code. Grepcode.com is a good tool for code diving. Check out kik.com developers blog.

Video Code

Google AppInventor

It’s a “gateway drug” for programmers just starting out on the Android journey. It’s also great for prototyping. Speaker claims to get an app done in under 1 hour. Notable features:

  • All online
  • Fusion tables , store my SQL table online
  • REST-capable
  • Drag and drop GUI
  • No version control
  • Lots of changes, very rapid development and adding of new features

Official resources: http://androidto.com/speakers

Comments