Project a day 4 all

319 views
215 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
319
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Project a day 4 all

  1. 1. DAY 3 Summary
  2. 2. This is our last day, and yesterday we talk about: • Monetizing your app • Publishing your app • Before you upload you APK • Using Services in you app • What is a Service • Tell me something about Service priority • How do we start a service • Cloud solutions • Training options • Pluralsight • Coursera (this is what I’ve forgot yesterday) 2
  3. 3. Monetization strategy is important 3
  4. 4. Potential Revenues sources • Pay-per download • In-app advertising • In-app purchase • Subscriptions • Affiliate sales • Sponsorship • Promotions • Analytics 4
  5. 5. ANY QUESTIONS?
  6. 6. Before we start Day 4 lectures • Let’s look at Eclipse IDE  • How to import projects • What android device do you have??? • What kind of device do you have • http://developer.samsung.com/android/tools-sdks/Samsung-Andorid-USBDriver-for-Windows • How to use device to run app 6
  7. 7. DAY 4: Location Basics
  8. 8. Android location basics • Accessing the location systems • Location providers and security • Handling location information • Receiving location updates • Getting a single location value 8
  9. 9. Accessing the location system • Location manager is the root of the location system • • • • • Get current location Monitor for changes in status of location hardware Request notification when reaching a location Exposed as system service Use | Context.getSystemService (Context.LOCATION_SERVICE) 9
  10. 10. Selecting a location provider • Global Positioning System (GPS) • • • • LocationManager.GPS_PROVIDER Satellite based Extremely accurate (3 meters) Very power intensive • Network-based • • • • LocationMAnage.NETWORK_PROVIDER Uses a combination of known Wi-Fi hotspots and cellular towers Accuracy varies (10m-1km) Less power 10
  11. 11. Location is a secured service • You must request permissions • How? • Different permission depending on location accuracy • Course location providers • Network provider is considered low-accuracy (a.k.a course) • Request ACCESS_COURSE_LOCATION permission • Fine location providers • GPS provider is consider high-accuracy (a.k.a fine) • Request ACCESS_FINE_LOCATION • Fine location permission implies course 11
  12. 12. Location provided through callbacks • Implement the LocationListener interface to receive updates • OnLocationChanged • onProviderEnabled/onProviderDisabled • onStatusChanged 12
  13. 13. Understanding Location class • Providers row location information • Core fields • getLatitude, getLongitude, getAccuracy • Provides latitude/longitude and accuracy in meters • Time • getTime (UTC) • getElapsedRealtimeNanos • Added in Android 4.2 • Other information varies depending on provider • getSpeed, getAltitude ( use has method to check) 13
  14. 14. DEMO 14
  15. 15. Steps to receive location updates • Request a reference to location service • Create instance of LocationListener implementation • Call the location service’s requestLocationUpdates method 15
  16. 16. Getting a single location value • Getting a single location value quickly • LocationManage.getLastKnownLocation • Immediately returns the last Location received by the provider • Getting a single, current location value • Locationmanage.requestSingleUpdate • Uses callback model like requestLocationUpdates • To run callback on main thread, pass null as the 3rd (Looper) parameter 16
  17. 17. Summary • The LocationManage is exposed as a system service • Location Providers offer varaying features • GPS • Network • Location requires appropriate security privilages • Implement LocationListener interface to receive location callbacks • Location class contains raw details • Get single location quickly with getLastKnownLocation (watch the time) 17
  18. 18. ANY QUESTIONS?
  19. 19. And now – THE TEST  • Just a few questions from summaries 19
  20. 20. DAY 4: Cloud app
  21. 21. DEMO • We did the talk yesterday 21
  22. 22. Workshop Evaluation • Why it is so important • What you need to pay attention to 22
  23. 23. Do we have time to look into progress bars • Let check documentation 23
  24. 24. How can you connect with me • Twitter: @gdjonovic – fastest way to ask question and get answer • Email: djonovic.g@gmail – send me an email to get material • LinkedIn: http://www.linkedin.com/in/gdjonovic • Slide share: http://www.slideshare.net/gorandjonovic • Git hub: https://github.com/gdjonovic • Blog: http://gdjonovic.me/ - fresh 24/13
  25. 25. Farewell speech • You are smart – Question everything • Solve problems • Be passionate • Go out your comfort zone – grow • Share your knowledge • Learn true value 25
  26. 26. 26
  27. 27. 27
  28. 28. ANY QUESTIONS?

×