-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The implementation of the location pinning app #2
Conversation
@ShubertMunthali hello and thank you so much for the PR! Unfortunately, here is come confusion happened! Yes, I did create bounty for the task. But I have another developer approved for it. The problem is that somebody faked my bounty for unknown reason, I really don't understand why anyone would need it. Here is my original bounty with payment in ZIL: https://gitcoin.co/issue/29079 I'm contacting GitCoin support so they will remove fake bounty. What about the PR: you are very welcome and I don't want this work be in vane. Please, contact me in Telegram for discussing details about what we can do. My handle is @kirill_taran there. Another dev, which was approved in original bounty, is working on this task and he is close to finish. He took a little bit different approach but maybe we could combine your efforts. |
Also if you want me to test this app, please enable GitHub Actions and create CI pipeline, so it would be possible to just download APK. Here are examples in our repos: |
Alright, that's ok. I have contacted you on Telegram. |
# Conflicts: # app/src/main/kotlin/com/ark/globe/MainActivity.kt # app/src/main/kotlin/com/ark/globe/filehandling/FilePicker.kt
Certainly possible to fix before merging:
Bonus points: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few controversial points that can be done later
val locationName: EditText = view.findViewById(R.id.locationName) | ||
val locationDesc: EditText = view.findViewById(R.id.locationDesc) | ||
val urlText: EditText = view.findViewById(R.id.urlText) | ||
val addButton: Button = view.findViewById(R.id.addButton) | ||
val saveButton: FloatingActionButton = view.findViewById(R.id.saveButton) | ||
val layoutManager = LinearLayoutManager(requireContext()) | ||
val recyclerView: RecyclerView = view.findViewById(R.id.recycler_view) | ||
longitude = view.findViewById(R.id.longitude) | ||
latitude = view.findViewById(R.id.latitude) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to use view binding instead of findViewById
Here is a good library for this
https://github.com/androidbroadcast/ViewBindingPropertyDelegate
private val coordinateList: | ||
MutableLiveData<MutableList<Coordinates>> by lazy{ | ||
MutableLiveData<MutableList<Coordinates>>().also{ | ||
it.value = mutableListOf() | ||
} | ||
} | ||
|
||
private val locationList: | ||
MutableLiveData<MutableList<Location>> by lazy{ | ||
MutableLiveData<MutableList<Location>>().also{ | ||
it.value = mutableListOf() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to use StateFlow
since we use coroutines
|
||
class URLParser { | ||
companion object{ | ||
private const val GOOGLE_MAPS = ".google." | ||
private const val GOOGLE_MAPS_SHORT = "goo.gl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to add DI and use the repository pattern instead of companion object
Same for JSONFile
, JSONParser
# Conflicts: # .idea/deploymentTargetDropDown.xml # .idea/gradle.xml # .idea/misc.xml
Number 1, we discussed the problem. Found out it was not the coordinate fetching mechanism |
All the implementation has been made, the app allows a user to enter coordinates manually, using a link and getting sharing intent from Google Maps and OpenStreetMap. It also allows the user to choose a folder to save location files in JSON format. The selection of the folder uses ARK-FilePicker. It is also in light and dark mode.