0

Photo Sphere イメージをアクティビティに読み込んで、ギャラリーと同じように表示しようとしています。Web 上のどこにも、この機能の例やサンプルが見つからないようです。

ドキュメンテーション PanoramaClient

これを実現する方法についての考え、例、コード セット、または提案はありますか?

4

1 に答える 1

0

Photo Sphere APIの発表投稿では、URI から PhotoSphere を読み込む方法について詳しく説明しています。

// This listener will be called with information about the given panorama.
OnPanoramaInfoLoadedListener infoLoadedListener =
  new OnPanoramaInfoLoadedListener() {
    @Override
    public void onPanoramaInfoLoaded(ConnectionResult result,
                                 Intent viewerIntent) {
        if (result.isSuccess()) {
            // If the intent is not null, the image can be shown as a
            // panorama.
            if (viewerIntent != null) {
                // Use the given intent to start the panorama viewer.
                startActivity(viewerIntent);
            }
        }

        // If viewerIntent is null, the image is not a viewable panorama.
    }
};

// Create client instance and connect to it.
PanoramaClient client = ...
...

// Once connected to the client, initiate the asynchronous check on whether
// the image is a viewable panorama.
client.loadPanoramaInfo(infoLoadedListener, panoramaUri);

これにより、Photo Sphere がビューアで開かれることに注意してください。Photo Sphere ビューアは組み込まれていませんActivity

于 2013-07-07T00:54:21.280 に答える