How to show stock pan activity with action bar

Need help on what I tried to do from the last few days.

I am trying to open an image using the Google Panorama API

@Override
    public void onConnected(Bundle bundle){
        Panorama.PanoramaApi.loadPanoramaInfo(GOOGLE_CLIENT,Uri.parse(url)).setResultCallback(
                new ResultCallback<PanoramaApi.PanoramaResult>(){
                    @Override
                    public void onResult(PanoramaApi.PanoramaResult result){
                        if (result.getStatus().isSuccess()){
                            Intent intent = result.getViewerIntent();
                            if (intent != null){
                                startActivity(intent);
                            }
                        }
                    }
                });
    }

I have the above code to open a panorama in a url. It all works, but I can’t get any API in the Google Play Services arsenal to open a panoramic image in a fragment or add an action bar to an open action, since I have no control over it.

Would it be very helpful if someone could point me in the right direction?

http://developer.android.com/reference/com/google/android/gms/panorama/package-summary.html

+4
source share

No one has answered this question yet.

Source: https://habr.com/ru/post/1569362/


All Articles