我知道有像 SphereShare.net 这样的画廊可以打开和分享球体形式的全景照片。但是,在我的应用程序中加载球体的方法应该是什么?
问问题
2051 次
1 回答
3
您必须使用PanoramaClient(它是Google Play Services的一部分)来打开 PhotoSphere 照片。
可以在此 Android 开发人员博客文章中找到如何执行此操作的示例:
// 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);
于 2013-05-06T03:11:48.767 回答