Skip to content

feat: add quick shortcuts on Android#1124

Merged
simon-the-shark merged 6 commits intomainfrom
quick-shortcuts
Apr 3, 2026
Merged

feat: add quick shortcuts on Android#1124
simon-the-shark merged 6 commits intomainfrom
quick-shortcuts

Conversation

@MarmoPL
Copy link
Copy Markdown
Member

@MarmoPL MarmoPL commented Mar 28, 2026

quick shortcuts - quick win :)
Screenshot_20260328_183239_Niagara Launcher
they change names based on currently selected phone language
they appear only on Android

@MarmoPL MarmoPL self-assigned this Mar 28, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 28, 2026

Greptile Summary

This PR adds three Android static launcher shortcuts (Parkings, Radio LUZ, Map) that appear when a user long-presses the ToPWR app icon. The implementation is clean and idiomatic: the android.app.shortcuts meta-data is correctly placed inside the existing AudioServiceActivity declaration (which is the registered main activity), the shortcut intents use full HTTPS deep-link URLs that are already handled by the app's Flutter deep-linking layer (flutter_deeplinking_enabled = true), and label strings are provided in both English and Polish.

Key points:

  • android:targetClass / android:targetPackage correctly point to com.ryanheise.audioservice.AudioServiceActivity / com.solvro.topwr, matching the registered activity in the manifest.
  • Label localisation works correctly through the standard values/ and values-pl/ resource folders.
  • Icon drawables (map.xml, parking.xml, radio_luz_logo.xml) are valid VectorDrawables; the radio_luz_logo.xml has minor cosmetic issues noted in previous review threads.
  • All three shortcut intents have identical short and long labels — a separate _long variant could improve future extensibility (previously flagged).

Confidence Score: 5/5

Safe to merge — no P0/P1 issues; all remaining concerns are minor style notes previously flagged or cosmetic.

The implementation is technically correct: correct activity target class, valid deep-link URLs, proper resource scoping for i18n. No logic errors, security issues, or data-integrity problems were introduced. All findings are P2 style/cosmetic items mostly already raised in prior threads.

No files require special attention; radio_luz_logo.xml has minor cosmetic issues already flagged in previous threads.

Important Files Changed

Filename Overview
android/app/src/main/AndroidManifest.xml Correctly adds the android.app.shortcuts meta-data inside the existing AudioServiceActivity declaration, matching the activity that owns the deep-link intent filter.
android/app/src/main/res/xml/shortcuts.xml Defines three static shortcuts (parkings, radio, map) using correct targetClass / targetPackage values; intents fire HTTPS deep-link URLs handled by Flutter's deep-linking layer. Short and long labels are identical (already flagged). Missing EOF newline.
android/app/src/main/res/drawable/radio_luz_logo.xml Vector drawable for the Radio LUZ shortcut icon; previously flagged issues include unused xmlns:aapt namespace and a path subcommand (H-0.1) that slightly exits the left viewport boundary.
android/app/src/main/res/values/strings.xml English string resources for shortcut labels; minor mixed-indentation style (tab on first entry, spaces on others).
android/app/src/main/res/values-pl/strings.xml Polish translations for the three shortcut labels; minor mixed-indentation issue already flagged in a previous thread.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([Android Launcher long-press]) --> B{Static Shortcuts}
    B --> C[Parkings shortcut\nhttps://topwr.solvro.pl/parkings]
    B --> D[Radio LUZ shortcut\nhttps://topwr.solvro.pl/radio-luz]
    B --> E[Map shortcut\nhttps://topwr.solvro.pl/buildings]
    C --> F[AudioServiceActivity\ncom.solvro.topwr]
    D --> F
    E --> F
    F --> G[flutter_deeplinking_enabled\nroutes intent URL to Flutter]
    G --> H[Parkings screen]
    G --> I[Radio LUZ screen]
    G --> J[Buildings/Map screen]
    K[values/strings.xml\nEnglish labels] --> B
    L[values-pl/strings.xml\nPolish labels] --> B
Loading

Reviews (5): Last reviewed commit: "fix: changed quick shortcuts icons" | Re-trigger Greptile

@simon-the-shark simon-the-shark changed the title feat: quick shortcuts feat: add quick shortcuts on Android Mar 29, 2026
@github-project-automation github-project-automation bot moved this to Todo in ToPWR Mar 29, 2026
@simon-the-shark simon-the-shark moved this from Todo to In review in ToPWR Mar 29, 2026
Copy link
Copy Markdown
Member

@simon-the-shark simon-the-shark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah nice, but can we use the same icons we already have in the app for these to have consistently feeling UI?

Image

@MarmoPL
Copy link
Copy Markdown
Member Author

MarmoPL commented Mar 30, 2026

Can I leave Radio Luz icon or change it to general radio icon?

@MarmoPL
Copy link
Copy Markdown
Member Author

MarmoPL commented Mar 31, 2026

it's good to go
Screenshot_20260331_130343_Niagara Launcher
and i don't think that build failure is an issue on my end, they are only icons after all... (it's something with device_info_plus)

@MarmoPL MarmoPL requested a review from simon-the-shark March 31, 2026 11:09
@simon-the-shark simon-the-shark merged commit cf4dc1b into main Apr 3, 2026
7 of 8 checks passed
@simon-the-shark simon-the-shark deleted the quick-shortcuts branch April 3, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants