Skip to content

Commit d7b79ed

Browse files
Merge pull request #21 from googlemaps/arsalaza/fix-sample-app-continuation
fix: address a couple of issues on the Android side
2 parents 7d238d1 + 859a2a5 commit d7b79ed

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

SampleApp/src/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const App: React.FC = (): ReactElement => {
8383
const checkPermissions = async () => {
8484
const result = await request(
8585
Platform.OS == 'android'
86-
? PERMISSIONS.ANDROID.ACCESS_COARSE_LOCATION
86+
? PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION
8787
: PERMISSIONS.IOS.LOCATION_ALWAYS,
8888
);
8989

components/navigation/navigationView/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,14 @@ export default class NavigationView extends React.Component<NavigationViewProps>
294294
}
295295
};
296296

297+
logDebugInfo = (message: string) => {
298+
if (
299+
this.props.navigationViewCallbacks != null &&
300+
this.props.navigationViewCallbacks.logDebugInfo != null) {
301+
this.props.navigationViewCallbacks.logDebugInfo(message);
302+
}
303+
};
304+
297305
/**
298306
* Callback invoked when tapping on marker's info window.
299307
* @platform Android only
@@ -345,6 +353,7 @@ export default class NavigationView extends React.Component<NavigationViewProps>
345353
NavModuleEvt.addListener('onPolylineClick', this.onPolylineClick);
346354
NavModuleEvt.addListener('onPolygonClick', this.onPolygonClick);
347355
NavModuleEvt.addListener('onCircleClick', this.onCircleClick);
356+
NavModuleEvt.addListener('logDebugInfo', this.logDebugInfo);
348357
};
349358

350359
/**

components/navigation/navigationView/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,13 @@ export interface NavigationViewCallbacks {
201201
* @param errorCode - indicates the reason why navigation failed to initialize.
202202
*/
203203
onNavigationInitError?(errorCode: NavigationInitErrorCode): void;
204+
205+
/**
206+
* Allows developers to listen for relevant debug logs.
207+
*
208+
* @param message relevant log message
209+
*/
210+
logDebugInfo?(message: string): void;
204211
}
205212

206213
/**

0 commit comments

Comments
 (0)