Skip to content

docs: add v2 route deep link example#16

Closed
Komzpa wants to merge 3 commits into
organicmaps:api-fixesfrom
Komzpa:komzpa/pr15-v2-route-example
Closed

docs: add v2 route deep link example#16
Komzpa wants to merge 3 commits into
organicmaps:api-fixesfrom
Komzpa:komzpa/pr15-v2-route-example

Conversation

@Komzpa
Copy link
Copy Markdown

@Komzpa Komzpa commented May 18, 2026

Adds Java and Kotlin README examples for opening Organic Maps v2 route deep links directly from an app, matching the route-deeplink documentation pattern used by the API repos.\n\nThis is intended as a helper PR for #15.\n\nValidation:\n- git diff --check origin/pr/15..HEAD\n- JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 ANDROID_HOME=/usr/lib/android-sdk ANDROID_SDK_ROOT=/usr/lib/android-sdk ./gradlew assemble

biodranik and others added 3 commits May 18, 2026 00:00
- sample-app-capitals: add missing startActivity() in onActivityResult
  and setPickPointMode(true) on outgoing MapRequests so OM actually
  returns the picked point; null-guard the result flow; make
  EXTRA_POINT final.
- PickPointResponse.extractFromIntent: null-guard intent.getExtras()
  and declare @NonNull/@nullable.
- OrganicMapsApi: Allman braces, drop extraneous ;, add
  app.organicmaps.web flavour to isOrganicMapsPackageInstalled.
- Bump gradle wrapper to 9.4.1 to match AGP 9.2.1.
- .gitignore: block reintroduction of the Eclipse-era module-root
  layout (/*/AndroidManifest.xml, /*/build.xml, /*/project.properties,
  /*/res/, /*/src/com/) and widen .idea to all modules.
- Delete the legacy lib/{AndroidManifest,build.xml,project.properties,
  res,src/com} and sample-app-capitals/{same,...,.idea} trees.
- README: full rewrite around the real OrganicMapsApi +
  ActivityResultLauncher flow, document both samples.
- CLAUDE.md: update build numbers and source-layout note.

Signed-off-by: Alexander Borsuk <me@alex.bio>
Mirror each Java snippet (showPointsOnMap, ActivityResult round-trip,
CrosshairRequest) with an idiomatic Kotlin version. Call out that Java
getters surface as Kotlin properties (response.point, point.id,
response.zoomLevel) and that mapTo(ArrayList()) is needed because
showPointsOnMap takes ArrayList<Point>, not List<Point>.

Signed-off-by: Alexander Borsuk <me@alex.bio>
Signed-off-by: Darafei Praliaskouski <me@komzpa.net>
(cherry picked from commit 5ed4755)
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.

3 participants