Integrate KartaView API for image uploads; refactor image upload logic#34
Open
iamrajeshk wants to merge 2 commits into
Open
Integrate KartaView API for image uploads; refactor image upload logic#34iamrajeshk wants to merge 2 commits into
iamrajeshk wants to merge 2 commits into
Conversation
…c and update UI components
…crets.properties.example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors and improves the KartaView image upload flow, modularizes the KartaView API logic, and updates file provider configurations for better maintainability and portability. The most important changes are grouped below:
KartaView API Refactor and Integration
KartaViewApiClientclass to encapsulate all KartaView API interactions, including sequence creation, image upload, sequence closing, and URL retrieval. This centralizes error handling and simplifies usage throughout the codebase.AbstractOsmQuestFormto useKartaViewApiClientfor image uploads, removing directHttpClientand manual API calls. This reduces code duplication and improves maintainability. [1] [2] [3]KartaViewApiClientas a singleton in the dependency injection module (ApplicationModule.kt). [1] [2]File Provider and Path Configuration
conf.xmlfiles for both debug and main builds to reflect the new application ID, ensuring correct file sharing between apps. [1] [2]file_paths.xmlto use<external-files-path>instead of hardcoded<external-path>, making file paths more robust and less dependent on the application ID.file_paths.xml.UI and Layout
FragmentContainerViewforAttachPhotoFragmentto theform_leave_note.xmllayout, supporting photo attachment in note forms.Minor Cleanups
These changes collectively improve the modularity, maintainability, and portability of the application's KartaView integration and file handling.