javareact-nativeandroid-intentgoogle-street-view

Open Google Street View in fullscreen mode via Intent with Java?


I'm trying to open Google Street View in fullscreen mode but it's not working.

This is my code:

String uri = String.format("google.streetview:cbll=%f,%f", latitude, longitude);
Intent streetViewIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
streetViewIntent.setPackage("com.google.android.apps.maps");
if (streetViewIntent.resolveActivity(getReactApplicationContext().getPackageManager()) != null) {
    streetViewIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    getReactApplicationContext().startActivity(streetViewIntent);
}

Please someone help me!-

I tried to use the link google.streetview:cbll=%f,%f but it does not open on fullscreen. The user needs to click on


Solution

  • The issue is already solved. The thing is that it's impossible (In 2024) to open google street view app in full screen mode via android. This is possible only with IOS. Don't ask me why...

    Lost some days searching about this but in the end my code was correct...