Skip to content

Android setup

Guideway is verified on Android (button and gesture navigation). There is one thing to get right: pass safe-area insets to the provider.

Android 15 forces edge-to-edge layout. Under it, measureInWindow reports a view’s y relative to below the status bar, while the overlay is drawn from the very top of the screen. Without correction, the spotlight lands too high - offset upward by roughly the status-bar height.

Guideway corrects for this by adding the top inset back on Android, but it needs to know the inset value. So pass it.

Wrap your app in SafeAreaProvider and pass useSafeAreaInsets() to TourProvider:

import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context';
import { TourProvider } from 'guideway';
function Root() {
const insets = useSafeAreaInsets();
return (
<TourProvider tours={tours} insets={insets}>
<App />
</TourProvider>
);
}
export default function Main() {
return (
<SafeAreaProvider>
<Root />
</SafeAreaProvider>
);
}

With insets provided, the spotlight lines up with its target on both navigation modes, and tooltips clear the status bar and the gesture/nav bar. On iOS the same insets keep tooltips clear of the notch and home indicator, so passing them is good practice on both platforms.