diff --git a/SampleApp/src/app.tsx b/SampleApp/src/app.tsx index a3cbc2f9..1f1fe297 100644 --- a/SampleApp/src/app.tsx +++ b/SampleApp/src/app.tsx @@ -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, ); diff --git a/components/navigation/navigationView/index.tsx b/components/navigation/navigationView/index.tsx index 48b3eeab..79061200 100644 --- a/components/navigation/navigationView/index.tsx +++ b/components/navigation/navigationView/index.tsx @@ -294,6 +294,14 @@ export default class NavigationView extends React.Component } }; + 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 @@ -345,6 +353,7 @@ export default class NavigationView extends React.Component NavModuleEvt.addListener('onPolylineClick', this.onPolylineClick); NavModuleEvt.addListener('onPolygonClick', this.onPolygonClick); NavModuleEvt.addListener('onCircleClick', this.onCircleClick); + NavModuleEvt.addListener('logDebugInfo', this.logDebugInfo); }; /** diff --git a/components/navigation/navigationView/types.ts b/components/navigation/navigationView/types.ts index 4da105bc..59ee8db7 100644 --- a/components/navigation/navigationView/types.ts +++ b/components/navigation/navigationView/types.ts @@ -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; } /**