Huawei Panorama Kit: Unleashed

Huawei Panorama Kit delivers an immersive and interactive viewing experience

Neha Jeswani
3 min readNov 11, 2020

By integrating Panorama Kit, apps can present users with interactive, 360-degree spherical or cylindrical panoramic images, so they can immerse in exciting 3D environments.

Features

· 360-degree spherical panorama, partially 360-degree spherical panorama, and cylindrical panorama

· Parsing and display of panorama images in JPG, JPEG, and PNG formats

· Interactive viewing of panoramic videos

· Panorama view adjustment by swiping the screen or rotating the mobile phone to any degree

· Interactive viewing of 360-degree spherical panoramas shot by mainstream panoramic cameras

· Flexible use of panorama services, such as displaying panoramas in a certain area of your app made possible with in-app panorama display API’s.

Note: The size of a 2D image to be view is not greater than 20 MB, and the resolution is less than 16384 x 8192.

Development Overview

Prerequisite

1. Must have a Huawei Developer Account

2. Must have Android Studio 3.0 or later

3. Must have a Huawei phone with HMS 4.0.0.300 or later.

Software Requirements

1. Java SDK 1.7 or later

2. Android 5.0 or later

Preparation

1. Create an app or project in the Huawei app gallery connect.

2. Provide the SHA Key and App Package name of the project in App Information Section and enable the required API.

3. Create an Android project.

Note: Panorama SDK can be directly called by devices, without connecting to AppGallery Connect and hence it is not mandatory to download and integrate the agconnect-services.json.

Integration

  1. Add below to build.gradle (project)file, under buildscript/repositories and allprojects/repositories.

Maven {url ‘http://developer.huawei.com/repo/'}

2. Add below to build.gradle (app) file, under dependencies.

implementation “com.huawei.hms:videokit-player:1.0.1.300”

Adding permissions

Development Process

The sample application is Tourism application.

It lists all the glorious places to visit around the world and provide 360 degree view of their beauty using HMS Ring API of Panorama kit.

The application has only 1 module as of now which is to display the 7 wonders of the World.

To achieve it below classes are created.

View Classes : activity.xml

This class is responsible to hold the Recycler view and to list all the 7 Wonders of the world.

card_Layout.xml

This class is responsible to hold the card view design which is integrated within the Recycler view.

MainActivity.java
This class is the launching activity for this module of the application and holds the implementation for Recycler View and Item click.
Also responsible to launch the panorama view of the selected item.

TourRecyclerAdapter.java
This is an adapter class for the created recycler view. It holds the implementation for the data.

Results

--

--

No responses yet