Skip to content

Integrate KartaView API for image uploads; refactor image upload logic#34

Merged
iamrajeshk merged 7 commits into
aviv-dev-latestfrom
feature-image-to-note
Jul 14, 2026
Merged

Integrate KartaView API for image uploads; refactor image upload logic#34
iamrajeshk merged 7 commits into
aviv-dev-latestfrom
feature-image-to-note

Conversation

@iamrajeshk

Copy link
Copy Markdown
Collaborator

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

  • Introduced a new KartaViewApiClient class 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.
  • Refactored AbstractOsmQuestForm to use KartaViewApiClient for image uploads, removing direct HttpClient and manual API calls. This reduces code duplication and improves maintainability. [1] [2] [3]
  • Registered KartaViewApiClient as a singleton in the dependency injection module (ApplicationModule.kt). [1] [2]

File Provider and Path Configuration

  • Updated file provider authorities in conf.xml files for both debug and main builds to reflect the new application ID, ensuring correct file sharing between apps. [1] [2]
  • Changed file_paths.xml to use <external-files-path> instead of hardcoded <external-path>, making file paths more robust and less dependent on the application ID.
  • Removed the now-unnecessary debug-specific file_paths.xml.

UI and Layout

  • Added a FragmentContainerView for AttachPhotoFragment to the form_leave_note.xml layout, supporting photo attachment in note forms.

Minor Cleanups

  • Removed unused imports and code related to the old KartaView upload logic and preferences handling. [1] [2] [3] [4] [5]

These changes collectively improve the modularity, maintainability, and portability of the application's KartaView integration and file handling.

@iamrajeshk
iamrajeshk force-pushed the feature-image-to-note branch from cd8151b to 0a4142a Compare July 13, 2026 06:28
@iamrajeshk
iamrajeshk force-pushed the feature-image-to-note branch from d56930c to 9433ee4 Compare July 14, 2026 05:16
@iamrajeshk
iamrajeshk merged commit cd7402f into aviv-dev-latest Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant