360 degree images with Panorama

HUAWEI Panorama Kit through the HMS Core Panorama SDK, your app can quickly present interactive viewing of 360-degree spherical or cylindrical panoramic images in simulated 3D space on Android phones, delivering an immersive experience to users.

HUAWEI Panorama Kit through the HMS Core Panorama SDK, your app can quickly present interactive viewing of 360-degree spherical or cylindrical panoramic images in simulated 3D space on Android phones, delivering an immersive experience to users.

Features of Panorama

Panorama support

Android versions later than 6.0 or EMUI 4.0.

HMS Core (APK) 4.0.0.300 or later.

Does Panorama supports non Huawei phones?

Answer is yes. It supports non Huawei phone like MI, VIVO, OPPO, Samsung, Coolpad, and ZTE. But HMS Core (APK) 4.0.0.300 or later needs to be installed first in the non-Huawei phone.

Should follow the flowchart

Create Huawei developer account

Cloud debugging without real time device

To-Do List

How to generate SHA key

Permissions

Panorama Presentation

· Panorama presented outside an app: The app obtains an intent by calling the API of the HMS Core Panorama SDK and redirects to Activity in HUAWEI Panorama Kit to present panoramas. In this mode, HUAWEI Panorama Kit uses the loadImageInfo or loadImageInfoWithPermission API to create a window outside the app.

· Panorama presented inside an app: The app presents panoramas in its own process by calling getLocalInstance and PanoramaLocalInterface of the HMS Core Panorama SDK. In this mode, HUAWEI Panorama Kit returns a panoramic layer, and the app determines the position to display the layer and whether to superimpose other information (such as ads) on the layer.

Let’s move to example.

In this example we will see the finding the office without paying broker. And also user can see 360 degree of the office view when user select particular office.

Let’s create list offices activity. Which show all the available office for rent or sale.

Create activity_offices.xml

Office list item adapter

Wnen the user click on office item below methods sends to outside an with resource uri and without panorama type

Wnen the user click on office item below methods sends to outside an with resource uri and with panorama type

Below code is load an 360 image within/inside an app with resource URI and panorama type. Which image will be loaded in LocaInterfaceActivity of app

Load panorama images with local.

This actitivity displays the 360 degree images with the local interface instead of sending to outside of and app.

Create activity_local_interface.xml

Result

Happy coding

References

Sr Android developer @Huawei