public class

FioriCamera

extends FrameLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.sap.cloud.mobile.fiori.camera.FioriCamera

Class Overview

FioriCamera is a View, which opens a Camera using Camera 2 apis and presents the preview of the Camera feed in the View Hierarchy. It allows the user to select the desired Camera, attach additional Surface for receiving the Camera feed for further processing, control the CaptureRequest and other facilities. You can add thee FioriCamera in View Group like any other typical Android view.

 <FioriCamera
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="match_parent"
 android:layout_height="match_parent">
 </FioriCamera>
 

Summary

XML Attributes
Attribute Name Related Method Description
com.sap.cloud.mobile.fiori:closeIcon close icon

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name". 

com.sap.cloud.mobile.fiori:flashOffIcon flash icon when flash is off

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name". 

com.sap.cloud.mobile.fiori:flashOnIcon flash icon when flash is on

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name". 

[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
FioriCamera(Context context)
FioriCamera(Context context, AttributeSet attrs)
FioriCamera(Context context, AttributeSet attrs, int defStyleAttr)
FioriCamera(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public Methods
void hideCameraFrame()
Hide the CameraFrameView while using the FioriCamera.
void setCameraConfigurator(CameraConfigurator cameraConfigurator)
void setCameraFrameCropController(CameraFrameCropController cropRectCreator)
void setOnTouchCancelCallback(View.OnClickListener listener)
Set View.OnClickListener on the cross button on FioriCamera.
void showCameraFrame()
Make CameraFrameView visible while using the FioriCamera.
void start()
Open the Camera and start showing the preview of the live Camera feed.
void stop()
Close the camera and perform cleanup.
[Expand]
Inherited Methods
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource

XML Attributes

com.sap.cloud.mobile.fiori:closeIcon

close icon

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

Related Methods

com.sap.cloud.mobile.fiori:flashOffIcon

flash icon when flash is off

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

Related Methods

com.sap.cloud.mobile.fiori:flashOnIcon

flash icon when flash is on

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

Related Methods

Public Constructors

public FioriCamera (Context context)

public FioriCamera (Context context, AttributeSet attrs)

public FioriCamera (Context context, AttributeSet attrs, int defStyleAttr)

public FioriCamera (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public Methods

public void hideCameraFrame ()

Hide the CameraFrameView while using the FioriCamera. By default CameraFrameView is visible.

public void setCameraConfigurator (CameraConfigurator cameraConfigurator)

Parameters
cameraConfigurator CameraConfigurator

public void setCameraFrameCropController (CameraFrameCropController cropRectCreator)

Parameters
cropRectCreator CameraFrameCropController

public void setOnTouchCancelCallback (View.OnClickListener listener)

Set View.OnClickListener on the cross button on FioriCamera.

Parameters
listener View.OnClickListener

public void showCameraFrame ()

Make CameraFrameView visible while using the FioriCamera. By default CameraFrameView is visible.

public void start ()

Open the Camera and start showing the preview of the live Camera feed. This method will perform following activities in the order

It is important to close the camera and perform cleaning when activity is paused or stopped .

See Also

public void stop ()

Close the camera and perform cleanup. Stop the additional thread started while opening the Camera .

See Also