UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FAndroidInputInterface Class Reference

#include <AndroidInputInterface.h>

+ Inheritance diagram for FAndroidInputInterface:

Public Member Functions

 ~FAndroidInputInterface ()
 
void SetMessageHandler (const TSharedRef< FGenericApplicationMessageHandler > &InMessageHandler)
 
void Tick (float DeltaTime)
 
void SendControllerEvents ()
 
virtual void SetForceFeedbackChannelValue (int32 ControllerId, FForceFeedbackChannelType ChannelType, float Value) override
 
virtual void SetForceFeedbackChannelValues (int32 ControllerId, const FForceFeedbackValues &values) override
 
virtual void SetHapticFeedbackValues (int32 ControllerId, int32 Hand, const FHapticFeedbackValues &Values) override
 
virtual void SetLightColor (int32 ControllerId, FColor Color) override
 
virtual void ResetLightColor (int32 ControllerId) override
 
void SetGamepadsAllowed (bool bAllowed)
 
void SetGamepadsBlockDeviceFeedback (bool bBlock)
 
virtual bool IsGamepadAttached () const
 
virtual void AddExternalInputDevice (TSharedPtr< class IInputDevice > InputDevice)
 
const TSharedPtr< ICursorGetCursor () const
 
ControllerClassType GetControllerClass (int32 ControllerId) const
 
- Public Member Functions inherited from IInputInterface
virtual ~IInputInterface ()
 
virtual void SetDeviceProperty (int32 ControllerId, const FInputDeviceProperty *Property)
 

Static Public Member Functions

static TSharedRef< FAndroidInputInterfaceCreate (const TSharedRef< FGenericApplicationMessageHandler > &InMessageHandler, const TSharedPtr< ICursor > &InCursor)
 
static void QueueTouchInput (const TArray< TouchInput > &InTouchEvents)
 
static void ResetGamepadAssignments ()
 
static void ResetGamepadAssignmentToController (int32 ControllerId)
 
static bool IsControllerAssignedToGamepad (int32 ControllerId)
 
static const FInputDeviceId GetMappedInputDeviceId (int32 ControllerId)
 
static const FName GetGamepadControllerName (int32 ControllerId)
 
static void HandleInputDeviceStateEvent (int32 DeviceId, InputDeviceStateEvent StateEvent, InputDeviceType DeviceType)
 
static void JoystickAxisEvent (int32 deviceId, int32 axisId, float axisValue)
 
static void JoystickButtonEvent (int32 deviceId, int32 buttonId, bool buttonDown)
 
static int32 GetAlternateKeyEventForMouse (int32 deviceId, int32 buttonId)
 
static void MouseMoveEvent (int32 deviceId, float absoluteX, float absoluteY, float deltaX, float deltaY)
 
static void MouseWheelEvent (int32 deviceId, float wheelDelta)
 
static void MouseButtonEvent (int32 deviceId, int32 buttonId, bool buttonDown)
 
static void DeferMessage (const FDeferredAndroidMessage &DeferredMessage)
 
static void QueueMotionData (const FVector &Tilt, const FVector &RotationRate, const FVector &Gravity, const FVector &Acceleration)
 

Detailed Description

Interface class for Android input devices

Constructor & Destructor Documentation

◆ ~FAndroidInputInterface()

FAndroidInputInterface::~FAndroidInputInterface ( )

Member Function Documentation

◆ AddExternalInputDevice()

virtual void FAndroidInputInterface::AddExternalInputDevice ( TSharedPtr< class IInputDevice InputDevice)
virtual

◆ Create()

static TSharedRef< FAndroidInputInterface > FAndroidInputInterface::Create ( const TSharedRef< FGenericApplicationMessageHandler > &  InMessageHandler,
const TSharedPtr< ICursor > &  InCursor 
)
static

◆ DeferMessage()

static void FAndroidInputInterface::DeferMessage ( const FDeferredAndroidMessage DeferredMessage)
static

◆ GetAlternateKeyEventForMouse()

static int32 FAndroidInputInterface::GetAlternateKeyEventForMouse ( int32  deviceId,
int32  buttonId 
)
static

◆ GetControllerClass()

ControllerClassType FAndroidInputInterface::GetControllerClass ( int32  ControllerId) const

◆ GetCursor()

const TSharedPtr< ICursor > FAndroidInputInterface::GetCursor ( ) const
inline

◆ GetGamepadControllerName()

static const FName FAndroidInputInterface::GetGamepadControllerName ( int32  ControllerId)
static

◆ GetMappedInputDeviceId()

static const FInputDeviceId FAndroidInputInterface::GetMappedInputDeviceId ( int32  ControllerId)
static

◆ HandleInputDeviceStateEvent()

static void FAndroidInputInterface::HandleInputDeviceStateEvent ( int32  DeviceId,
InputDeviceStateEvent  StateEvent,
InputDeviceType  DeviceType 
)
static

◆ IsControllerAssignedToGamepad()

static bool FAndroidInputInterface::IsControllerAssignedToGamepad ( int32  ControllerId)
static

◆ IsGamepadAttached()

virtual bool FAndroidInputInterface::IsGamepadAttached ( ) const
virtual

◆ JoystickAxisEvent()

static void FAndroidInputInterface::JoystickAxisEvent ( int32  deviceId,
int32  axisId,
float  axisValue 
)
static

◆ JoystickButtonEvent()

static void FAndroidInputInterface::JoystickButtonEvent ( int32  deviceId,
int32  buttonId,
bool  buttonDown 
)
static

◆ MouseButtonEvent()

static void FAndroidInputInterface::MouseButtonEvent ( int32  deviceId,
int32  buttonId,
bool  buttonDown 
)
static

◆ MouseMoveEvent()

static void FAndroidInputInterface::MouseMoveEvent ( int32  deviceId,
float  absoluteX,
float  absoluteY,
float  deltaX,
float  deltaY 
)
static

◆ MouseWheelEvent()

static void FAndroidInputInterface::MouseWheelEvent ( int32  deviceId,
float  wheelDelta 
)
static

◆ QueueMotionData()

static void FAndroidInputInterface::QueueMotionData ( const FVector Tilt,
const FVector RotationRate,
const FVector Gravity,
const FVector Acceleration 
)
static

◆ QueueTouchInput()

static void FAndroidInputInterface::QueueTouchInput ( const TArray< TouchInput > &  InTouchEvents)
static

◆ ResetGamepadAssignments()

static void FAndroidInputInterface::ResetGamepadAssignments ( )
static

◆ ResetGamepadAssignmentToController()

static void FAndroidInputInterface::ResetGamepadAssignmentToController ( int32  ControllerId)
static

◆ ResetLightColor()

virtual void FAndroidInputInterface::ResetLightColor ( int32  ControllerId)
overridevirtual

Implements IInputInterface.

◆ SendControllerEvents()

void FAndroidInputInterface::SendControllerEvents ( )

Poll for controller state and send events if needed

◆ SetForceFeedbackChannelValue()

virtual void FAndroidInputInterface::SetForceFeedbackChannelValue ( int32  ControllerId,
FForceFeedbackChannelType  ChannelType,
float  Value 
)
overridevirtual

Force Feedback implementation

Implements IInputInterface.

◆ SetForceFeedbackChannelValues()

virtual void FAndroidInputInterface::SetForceFeedbackChannelValues ( int32  ControllerId,
const FForceFeedbackValues Values 
)
overridevirtual

Sets the strength/speed of all the channels for the given controller id. NOTE: Unsupported channels are silently ignored

Parameters
ControllerIdthe id of the controller whose value is to be set
FForceFeedbackChannelValuesstrength or speed of feedback for all channels

Implements IInputInterface.

◆ SetGamepadsAllowed()

void FAndroidInputInterface::SetGamepadsAllowed ( bool  bAllowed)
inline

◆ SetGamepadsBlockDeviceFeedback()

void FAndroidInputInterface::SetGamepadsBlockDeviceFeedback ( bool  bBlock)
inline

◆ SetHapticFeedbackValues()

virtual void FAndroidInputInterface::SetHapticFeedbackValues ( int32  ControllerId,
int32  Hand,
const FHapticFeedbackValues Values 
)
overridevirtual

Sets the frequency and amplitude of haptic feedback channels for a given controller id. Some devices / platforms may support just haptics, or just force feedback.

Parameters
ControllerIdID of the controller to issue haptic feedback for
HandIdWhich hand id (e.g. left or right) to issue the feedback for. These usually correspond to EControllerHands
ValuesFrequency and amplitude to haptics at

Reimplemented from IInputInterface.

◆ SetLightColor()

virtual void FAndroidInputInterface::SetLightColor ( int32  ControllerId,
FColor  Color 
)
overridevirtual

Implements IInputInterface.

◆ SetMessageHandler()

void FAndroidInputInterface::SetMessageHandler ( const TSharedRef< FGenericApplicationMessageHandler > &  InMessageHandler)

◆ Tick()

void FAndroidInputInterface::Tick ( float  DeltaTime)

Tick the interface (i.e check for new controllers)


The documentation for this class was generated from the following file: