Fix Google Navigation initialization timing issues

Restructures navigation session initialization to occur after the view is
created, eliminating race conditions. Session initialization now happens in
onViewCreated callback with proper delay before setting destination.

Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jean-Philippe Brule
2025-11-15 20:49:20 -05:00
parent 46af8f55a2
commit 9cb5b51f6d
11 changed files with 558 additions and 192 deletions
+108
View File
@@ -331,6 +331,114 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'{completed}/{total} completed'**
String completedDeliveries(int completed, int total);
/// No description provided for @navigationTcTitle.
///
/// In en, this message translates to:
/// **'Navigation Service'**
String get navigationTcTitle;
/// No description provided for @navigationTcDescription.
///
/// In en, this message translates to:
/// **'This app uses Google Navigation to provide turn-by-turn navigation for deliveries.'**
String get navigationTcDescription;
/// No description provided for @navigationTcAttribution.
///
/// In en, this message translates to:
/// **'Attribution: Maps and navigation services provided by Google Maps.'**
String get navigationTcAttribution;
/// No description provided for @navigationTcTerms.
///
/// In en, this message translates to:
/// **'By accepting, you agree to Google\'s Terms of Service and Privacy Policy for Navigation services.'**
String get navigationTcTerms;
/// No description provided for @accept.
///
/// In en, this message translates to:
/// **'Accept'**
String get accept;
/// No description provided for @decline.
///
/// In en, this message translates to:
/// **'Decline'**
String get decline;
/// No description provided for @locationPermissionRequired.
///
/// In en, this message translates to:
/// **'Location Permission'**
String get locationPermissionRequired;
/// No description provided for @locationPermissionMessage.
///
/// In en, this message translates to:
/// **'This app requires location permission to navigate to deliveries.'**
String get locationPermissionMessage;
/// No description provided for @locationPermissionDenied.
///
/// In en, this message translates to:
/// **'Location permission denied. Navigation cannot proceed.'**
String get locationPermissionDenied;
/// No description provided for @permissionPermanentlyDenied.
///
/// In en, this message translates to:
/// **'Permission Required'**
String get permissionPermanentlyDenied;
/// No description provided for @openSettingsMessage.
///
/// In en, this message translates to:
/// **'Location permission is permanently denied. Please enable it in app settings.'**
String get openSettingsMessage;
/// No description provided for @openSettings.
///
/// In en, this message translates to:
/// **'Open Settings'**
String get openSettings;
/// No description provided for @cancel.
///
/// In en, this message translates to:
/// **'Cancel'**
String get cancel;
/// No description provided for @ok.
///
/// In en, this message translates to:
/// **'OK'**
String get ok;
/// No description provided for @requestPermission.
///
/// In en, this message translates to:
/// **'Request Permission'**
String get requestPermission;
/// No description provided for @navigationArrived.
///
/// In en, this message translates to:
/// **'You have arrived at the destination'**
String get navigationArrived;
/// No description provided for @navigatingTo.
///
/// In en, this message translates to:
/// **'Navigating to'**
String get navigatingTo;
/// No description provided for @initializingNavigation.
///
/// In en, this message translates to:
/// **'Initializing navigation...'**
String get initializingNavigation;
}
class _AppLocalizationsDelegate
+60
View File
@@ -134,4 +134,64 @@ class AppLocalizationsEn extends AppLocalizations {
String completedDeliveries(int completed, int total) {
return '$completed/$total completed';
}
@override
String get navigationTcTitle => 'Navigation Service';
@override
String get navigationTcDescription =>
'This app uses Google Navigation to provide turn-by-turn navigation for deliveries.';
@override
String get navigationTcAttribution =>
'Attribution: Maps and navigation services provided by Google Maps.';
@override
String get navigationTcTerms =>
'By accepting, you agree to Google\'s Terms of Service and Privacy Policy for Navigation services.';
@override
String get accept => 'Accept';
@override
String get decline => 'Decline';
@override
String get locationPermissionRequired => 'Location Permission';
@override
String get locationPermissionMessage =>
'This app requires location permission to navigate to deliveries.';
@override
String get locationPermissionDenied =>
'Location permission denied. Navigation cannot proceed.';
@override
String get permissionPermanentlyDenied => 'Permission Required';
@override
String get openSettingsMessage =>
'Location permission is permanently denied. Please enable it in app settings.';
@override
String get openSettings => 'Open Settings';
@override
String get cancel => 'Cancel';
@override
String get ok => 'OK';
@override
String get requestPermission => 'Request Permission';
@override
String get navigationArrived => 'You have arrived at the destination';
@override
String get navigatingTo => 'Navigating to';
@override
String get initializingNavigation => 'Initializing navigation...';
}
+60
View File
@@ -134,4 +134,64 @@ class AppLocalizationsFr extends AppLocalizations {
String completedDeliveries(int completed, int total) {
return '$completed/$total livrs';
}
@override
String get navigationTcTitle => 'Service de Navigation';
@override
String get navigationTcDescription =>
'Cette application utilise Google Navigation pour fournir une navigation virage par virage pour les livraisons.';
@override
String get navigationTcAttribution =>
'Attribution: Services de cartes et de navigation fournis par Google Maps.';
@override
String get navigationTcTerms =>
'En acceptant, vous acceptez les conditions d\'utilisation et la politique de confidentialit de Google pour les services de navigation.';
@override
String get accept => 'Accepter';
@override
String get decline => 'Refuser';
@override
String get locationPermissionRequired => 'Permission de localisation';
@override
String get locationPermissionMessage =>
'Cette application ncessite la permission de localisation pour naviguer vers les livraisons.';
@override
String get locationPermissionDenied =>
'Permission de localisation refuse. La navigation ne peut pas continuer.';
@override
String get permissionPermanentlyDenied => 'Permission requise';
@override
String get openSettingsMessage =>
'La permission de localisation est dfinitivement refuse. Veuillez l\'activer dans les paramtres de l\'application.';
@override
String get openSettings => 'Ouvrir les paramtres';
@override
String get cancel => 'Annuler';
@override
String get ok => 'OK';
@override
String get requestPermission => 'Demander la permission';
@override
String get navigationArrived => 'Vous tes arriv la destination';
@override
String get navigatingTo => 'Navigation vers';
@override
String get initializingNavigation => 'Initialisation de la navigation...';
}