steroid-team / app

Helping you organise your day with ease and privacy.
1 stars 2 forks source link

Show Current GPS Location + search Location #121

Closed shoutizix closed 3 years ago

shoutizix commented 3 years ago

I had troubles to make it works with maps API, so for now I've only added a new button in the toolbar of the notes "Add location" and it only displays the map centered at Sidney. I have to also hide/encrypt the google API key but I don't know how to do it so that CI would still be able to run test that needs it. I have to show the position of the user at first and maybe add a feature to be able to search a place and it will point to it.

shoutizix commented 3 years ago

Hey,

So first to access the MapsActivity we just have to access the note part and then click on a note and click on the note_header.

It will ask for permission to access the location of the user and if the user doesn't give permission or have the localisation disabled it will put a marker at a default place (right now it's Sydney) and center the camera to it.

If the user gave permission and have localisation enabled, then it will put a marker at the current place of the user.

The tests work fine but the coverage is very low, it only includes onCreate method, and I think it's because all the other methods are called in onMapReady but onMapReady isn't called form the activity, it's only the callback of getMapAsync method at the end of onCreate. Because of that I don't know how to increase the code coverage, so if you have any idea please let me know !

shoutizix commented 3 years ago

Hey @theo-damiani thanks a lot for the review !

You were absolutely right on the points that you've mentioned and I've made the corresponding changes.

theo-damiani commented 3 years ago

Hey @theo-damiani thanks a lot for the review !

You were absolutely right on the points that you've mentioned and I've made the corresponding changes.

Awesome! For me it is ready to be merged !