MozStumbler-Firefox-Mobile

From MozillaWiki
Revision as of 15:53, 11 June 2014 by Garvan (talk | contribs)
Jump to navigation Jump to search

https://wiki.mozilla.org/Mobile/Notes

Bugzilla

Major Outstanding Items

  • Integrate into Fennec
    • use android/thirdparty/org/mozilla/mozstumbler, place .java files there
    • android/services/manifests, place StumblerAndroidManifest_services.xml
    • no new permissions? Stumbler uses android.permission.READ_PHONE_STATE, check what for. Will added permissions be needed for listening for events to start the stumbler service? (During development I find GPS_FIX_CHANGE is handy intent to set in manifest, this is a commonly used, but undocumented, intent)
    • resources: android/base/resources put xml files: authentication, syncadapter, preferences
  • Sync
    • we cannot sync using mobile data plan without user authorization. Potentially too much data. Creates UI issue, we ask 1 question of the user in Android Notification screen, can we ask a 2nd question?
    • don't want sync entry in settings for stumbler, investigate proper method of doing this.
    • Sync code needs a peer-review
  • Separate Process Split
    • run stumbler service as a separate process, Android *should* be less likely to kill it. The OS kills processes based on resource usage, so Fennec is likely to be killed when not in use.
    • code-wise this is trivial, but ensure mobile team has no concerns.

Passive Stumbling Overview

  • Broadcast receiver specified in manifest xml starts the passive listening service on boot (consider other events?)
  • Passive listening service will get GPS location events after other apps have requested a GPS location
    • Service will then scan wifi and cell
  • Service needs to check Fennec setting for geolocation sharing is on/off
  • Periodically, service uploads stumbling data to MLS
  • Frequency of sync depends on both the number of collections, and the age of the current non-uploaded batch. Local data storage is cleared after upload.
  • Batches 2 weeks old that have not been uploaded are deleted.
  • Don't run when battery <15%.