Loading and displaying a photosphere image
So far, we've been handling all the images in the same manner. But some of them may be 360-degree images. These should be displayed on the photosphere and not on the virtual screen.
If you do not have any 360-degree photos in your device's camera folder yet, you can create them using the Google Camera app.
Note
If the default camera app on your phone does not include a Photosphere mode, you may need to download the Google Camera app from the Play Store. Third-party cameras might use a different name. For example, Samsung calls their photosphere feature Surround Shot.
Some images include the XMP metadata that will include information of whether the image is distorted for an equirectangular projection. This can be useful to distinguish spherical images from flat ones. However, the Android API doesn't include an XMP interface, so integrating XMP header parsing is beyond the scope of this book.
For now, we'll just check whether the filename is prefixed...