Making awesome apps

3,961 views

Published on

Collection of tips & tricks that makes the difference between a good app and a "wow-affect" app. Relevant to product managers and developers (including some code samples)

As presented in DroidCon Tel Aviv 2014 by:
Ran Nachmany, MobiliUp
http://il.droidcon.com

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,961
On SlideShare
0
From Embeds
0
Number of Embeds
2,784
Actions
Shares
0
Downloads
26
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Making awesome apps

  1. 1. From good to awesome
  2. 2. Always up to date Users don't like to wait. Location updated. Data downloaded from web.
  3. 3. Always up to date Users don't like to wait. Location updated. Data downloaded from web.
  4. 4. Find the location fast. Loop through all providers->getLastKnownLoc. If there is one or more location which is recent enough – return the most accurate one If not – Return the latest one. In case of #2 – look for “fastest” provider: Coarse Accuracy && low power consumption. Register for location update.
  5. 5. Fused Location Define your priorities Let Google play services do the heavy lifting.
  6. 6. Using fused location
  7. 7. Data updates
  8. 8. The challenges: When to update? Where the data is coming from? What to update? How to update?
  9. 9. When to update my App? Right before the user launches it Assuming I have battery. Assuming I have BW.
  10. 10. Where the data is coming from? My Server 3rd Party Servers
  11. 11. Where the data is coming from? My Server 3rd Party Servers
  12. 12. Content Segmentation -What to Update? What's Hot Interesting stuff Other
  13. 13. BG Update What's Hot BG Update Interesting Stuff Other
  14. 14. BG Update What's Hot BG Update Interesting Stuff Other GCM Embedded
  15. 15. BG Update What's Hot BG Update Interesting Stuff Other GCM Embedded GCM + Back-off
  16. 16. BG Update What's Hot BG Update Interesting Stuff Other GCM Embedded GCM + Back-off Daily / Bundled
  17. 17. Updating Data from 3rd party servers Monitor the device Use Variable alarms. Use conditional services and receivers. Monitor the user
  18. 18. Is it worth waking up? Set wake alarm for min update freq. Set non-wake alarm for optimal update freq.
  19. 19. Monitor device State Change the refresh rate based on device state: Update without connectivity? Update more on WiFi? Update more when charging? Suspend updates on low battery? Update more when docked? Don't update in car dock?
  20. 20. Monitor connectivity
  21. 21. Monitor Battery
  22. 22. Monitor State canged BCAST
  23. 23. Monitor the user Change your behavior based on the user's acitivty Update more when driving? Update more when walking? Pause updates while cycling?
  24. 24. Activity recognition
  25. 25. Activity recognition
  26. 26. Activity recognition
  27. 27. Being Invisible I don't need to think how the app works. I never notice the app's work. I am never being bothered by the app.
  28. 28. Work Offline Queue and Send transactions. Use persistence layer. Tape From Square.
  29. 29. Work Semi-Offline Be resilient to poor networks. Prioritize your transactions. Be able to cancel transaction on the fly, or clear the Queue. Adjust your apps behavior and timeouts accordingly. Use Volley
  30. 30. Use sync adapter to... sync Sync adapter is great for sending data from the device to your server Has a system wide POV. Poor documentation, Hard to implement.
  31. 31. Be efficient – Data usage
  32. 32. Radio State Machine IDLE FACH DCH Power ~10Sec tail time ~12-75 Sec tail time Bandwidth
  33. 33. IDLE FACH DCH Power ~10Sec tail time ~12-75 Sec tail time ~2 Sec Bandwidth Radio State Machine
  34. 34. Avoid bursty traffic Transmit data “together”. Piggyback if needed. Pre-fetch data for the next 2-5 minutes. Don't ping just to keep TCP connection alive RRC != TCP Connection. TCP connection is kept even in IDLE mode
  35. 35. #1: Case study: Pandora Music file streamed as single file. Analytics data sends ~2KB every 62.5 seconds Source: AT&T research
  36. 36. #1: Case study: Pandora 0.2% of data consumed 46% of energy!
  37. 37. Don't be HTTP rookie Don't download what you already have. Take care of server headers Max-age, expires. Use conditional GET when cache expires Use “last modified” header. Server return 304, with no body.
  38. 38. Don't be lazy Read AT&T research: Top Radio Resources Issues in Mobile Applications AT&T Lab Research – call for more efficient apps Watch my latest reversim talk (video / slides ) Use ARO. Developed by AT&T. Monitors and analyze network activity. http://developer.att.com/ https://github.com/attdevsupport/ARO
  39. 39. Adaptive App Optimized for different User Experience. User has more than one device. Be predictable. Behave as expected
  40. 40. Text Input Specify the Edit Text input to show the right keyboard type. use android:inputType attribute Four classes of keyboards: Plain text Decimal Number Phone Number Date or Time
  41. 41. Text Input Plain text types: URIs Email address People's names Postal address Passwords
  42. 42. Context is critical Activity recognition Location
  43. 43. GeoFencing
  44. 44. Personal G+ SSO Login once – on all of your devices. Track the user, not the device
  45. 45. Geek Magic – Text to Speech
  46. 46. Geek Magic – Text to Speech
  47. 47. Geek Magic – Text to Speech
  48. 48. Geek Magic – Speech Recognition
  49. 49. Geek Magic – Speech Recognition More than one result is returned. Loop through all results, taking context in mind.
  50. 50. Summary By Fresh Be Invisible Be Efficient Be Adaptive Be psychic
  51. 51. ran@mobiliup.com +Ran Nachmany Thank You

×