ushahidi / tenfour-mobile

TenFour mobile app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android app not filling location in respond

mackers opened this issue · comments

Expected Behaviour

Respond to a check-in fills my location

Actual Behaviour

My location is not filled in

Steps to Reproduce

  • install app
  • login to my ushahidi account
  • open a check-in awaiting response
  • i am prompted to allow app access my location
  • tap allow
  • expect location field to be auto filled in
  • restart app
  • same effect

Environment

  • www.tenfour.org
  • app.tenfour.org
  • staging.tenfour.org
  • dev.tenfour.org
  • localhost:8100
  • iOS App (live)
  • iOS App (testflight)
  • Android App (live)
  • Android App (beta)

Hmm, the this.geocoder.reverseGeocode is suppose to return an array of results, however on Android it's returning the first object instead, so the if (results && results.length > 0) check was not passing.

I'll refactor so it will work if this.geocoder.reverseGeocode returns an array or a single object. 👍