Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SampleApp/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const App: React.FC = (): ReactElement => {
const checkPermissions = async () => {
const result = await request(
Platform.OS == 'android'
? PERMISSIONS.ANDROID.ACCESS_COARSE_LOCATION
? PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION
: PERMISSIONS.IOS.LOCATION_ALWAYS,
);

Expand Down
9 changes: 9 additions & 0 deletions components/navigation/navigationView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,14 @@ export default class NavigationView extends React.Component<NavigationViewProps>
}
};

logDebugInfo = (message: string) => {
if (
this.props.navigationViewCallbacks != null &&
this.props.navigationViewCallbacks.logDebugInfo != null) {
this.props.navigationViewCallbacks.logDebugInfo(message);
}
};

/**
* Callback invoked when tapping on marker's info window.
* @platform Android only
Expand Down Expand Up @@ -345,6 +353,7 @@ export default class NavigationView extends React.Component<NavigationViewProps>
NavModuleEvt.addListener('onPolylineClick', this.onPolylineClick);
NavModuleEvt.addListener('onPolygonClick', this.onPolygonClick);
NavModuleEvt.addListener('onCircleClick', this.onCircleClick);
NavModuleEvt.addListener('logDebugInfo', this.logDebugInfo);
};

/**
Expand Down
7 changes: 7 additions & 0 deletions components/navigation/navigationView/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ export interface NavigationViewCallbacks {
* @param errorCode - indicates the reason why navigation failed to initialize.
*/
onNavigationInitError?(errorCode: NavigationInitErrorCode): void;

/**
* Allows developers to listen for relevant debug logs.
*
* @param message relevant log message
*/
logDebugInfo?(message: string): void;
}

/**
Expand Down