Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am successfully showing a spherical image using the Google Panorama API

I am using the same code as most tutorials do:

@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);
                            }
                        }
                    }
                });
    }

Actually, I do not only have one sphere but around 5. I would like to be able to switch between the images clicking on menu items overlayed over the images.

Since the actual activity showing the sphere is not defined by me but started through an intent received in the success callback I have no idea how I can achieve this and the API does not seem to offer much more possibilities.

I guess I can not even show a dialog on top of the sphere.

Does anybody have any ideas for me? I'd appreciate it a lot

Note: This question purposely is phrased very similarly to this SO post.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
131 views
Welcome To Ask or Share your Answers For Others

1 Answer

Solution: Switch to the more recent Google API –?Google VR – with which it is possible to embed spherical 360° images in a view instead of starting an activity through an intent, which one has no control of.

Note: The API is still labeled experimental but being part of the VR API this looks like the library being actively developed. Another advantage: This is open source while the older Google Panorama API is part of google play services, which is not.

PS: Before I looked into these libraries I tested PanoramaGL and OpenPanodroid. Both libraries are not maintained for years and it was no big suprise the results could not keep up with the Google libraries.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...