Skip to content

feat: dynamic app name and custom navigation app selector#91

Open
PremSharma-Intelegencia wants to merge 2 commits intofleetbase:mainfrom
blockalicious-io:feat/navigation-selector-and-dynamic-appname
Open

feat: dynamic app name and custom navigation app selector#91
PremSharma-Intelegencia wants to merge 2 commits intofleetbase:mainfrom
blockalicious-io:feat/navigation-selector-and-dynamic-appname

Conversation

@PremSharma-Intelegencia

🧭 Summary

This PR enhances Fleetbase Navigator by improving configurability and user experience with two key updates:

  1. Dynamic App Name via Environment Variable (APP_NAME)
    The app name is now configurable via an environment variable for Android and the app header, enabling dynamic branding and easier deployment across environments.

  2. Custom Modal for Navigation App Selection
    Replaces the React Native Alert, which was limited to three options, with a fully custom bottom sheet modal. Users can now view and select from all installed navigation apps.


🔧 Description of Changes

🧱 Dynamic App Name

  • Updated android/app/build.gradle to set the app name dynamically using the APP_NAME environment variable.
  • Removed hardcoded app name from android/app/src/main/res/values/strings.xml.
  • Updated DriverNavigator.tsx to use config('APP_NAME', 'Navigator') for headers and tab labels.

Impact:
The app name now automatically adapts to environment configuration, eliminating the need for manual edits per deployment.


🪟 Custom Navigation App Selector

  • Introduced a new bottom sheet component: NavigationAppSelector.
  • Displays all installed navigation apps, removing the previous 3-option limitation.
  • Ensures key apps like Google Maps and Apple Maps are always visible.
  • Implements Fleetbase-themed styling for a consistent, polished UI.

Impact:
Users enjoy a smoother, more intuitive experience when choosing a navigation app.


🎨 UI / UX Improvements

Before After
Native system Alert limited to 3 options Custom bottom sheet modal listing all available navigation apps

Key Benefits:

  • Flexible app branding per environment.
  • Enhanced user experience with a fully-featured navigation app selector.

Previously, the app used the native React Native Alert to display available
navigation apps, which only supports up to three options. This caused
issues when users had more than three navigation apps installed, as some
apps (like Google Maps) would not appear in the list, leading to confusion.

This update introduces a custom bottom sheet component (`NavigationAppSelector`)
to display all available navigation apps, ensuring users can always select
their preferred app regardless of how many are installed.

Additionally:
- Removed unused imports and reordered imports automatically via lint and Prettier.
- Minor code cleanup from automatic formatting during file save.
- Updated android/app/build.gradle to set app_name from APP_NAME env variable.
- Modified android/app/src/main/res/values/strings.xml to remove hardcoded
app_name.
- Updated DriverNavigator.tsx to use config('APP_NAME', 'Navigator') for
displaying the app name in headers and tab labels.
@roncodes roncodes self-assigned this Oct 17, 2025
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