UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AndroidJavaWebBrowser.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#pragma once
4
5
#include "
CoreMinimal.h
"
6
7
#if USE_ANDROID_JNI
8
9
#include "
AndroidJniWebViewControl.h
"
10
#include "
Android/AndroidPlatform.h
"
11
#include "
Android/AndroidJava.h
"
12
#include "
RHI.h
"
13
#include "
RHIResources.h
"
14
15
// Wrapper for com/epicgames/unreal/WebViewControl.java.
16
class
FJavaAndroidWebBrowser
:
public
UE::Jni::TClassObject<UE::Jni::FWebViewControl>
17
{
18
public
:
19
FJavaAndroidWebBrowser
(
bool
swizzlePixels
,
bool
vulkanRenderer
,
int32
width,
int32
height,
jlong
widgetPtr
,
bool
bEnableRemoteDebugging
,
bool
bUseTransparency,
bool
bEnableDomStorage,
bool
bShouldUseBitmapRender
,
const
FString&
UserAgentApplication
,
bool
bEnableFloatingCloseButton
);
20
virtual
~FJavaAndroidWebBrowser
();
21
void
Release
();
22
bool
GetVideoLastFrameBitmap
(
void
*
outPixels
,
int64
outCount
);
23
bool
GetVideoLastFrameData
(
void
* &
outPixels
,
int64
&
outCount
,
bool
*
bRegionChanged
);
24
bool
GetVideoLastFrame
(
int32
destTexture
);
25
bool
DidResolutionChange
();
26
bool
UpdateVideoFrame
(
int32
ExternalTextureId
,
bool
*
bRegionChanged
);
27
void
ExecuteJavascript(
const
FString&
Script
);
28
void
LoadURL(
const
FString&
NewURL
);
29
void
LoadString(
const
FString& Contents,
const
FString&
BaseUrl
);
30
void
StopLoad();
31
void
Reload
();
32
void
Close
();
33
void
ShowFloatingCloseButton(
bool
bShow,
bool
bDraggable
);
34
void
GoBack();
35
void
GoForward();
36
void
SendTouchDown
(
float
x,
float
y);
37
void
SendTouchUp
(
float
x,
float
y);
38
void
SendTouchMove
(
float
x,
float
y);
39
bool
SendKeyDown
(
int32
KeyCode);
40
bool
SendKeyUp
(
int32
KeyCode);
41
void
SetAndroid3DBrowser
(
bool
InIsAndroid3DBrowser
);
42
void
SetVisibility(
bool
InIsVisible
);
43
void
Update
(
const
int
posX
,
const
int
posY
,
const
int
sizeX
,
const
int
sizeY
);
44
private
:
45
static
FName
GetClassName();
46
47
FJavaClassMethod
ReleaseMethod
;
48
FJavaClassMethod
GetVideoLastFrameBitmapMethod
;
49
FJavaClassMethod
GetVideoLastFrameDataMethod
;
50
FJavaClassMethod
GetVideoLastFrameMethod
;
51
FJavaClassMethod
DidResolutionChangeMethod
;
52
FJavaClassMethod
UpdateVideoFrameMethod
;
53
FJavaClassMethod
UpdateMethod;
54
FJavaClassMethod
ExecuteJavascriptMethod
;
55
FJavaClassMethod
LoadURLMethod
;
56
FJavaClassMethod
LoadStringMethod
;
57
FJavaClassMethod
StopLoadMethod
;
58
FJavaClassMethod
ReloadMethod
;
59
FJavaClassMethod
CloseMethod
;
60
FJavaClassMethod
ShowFloatingCloseButtonMethod
;
61
FJavaClassMethod
GoBackOrForwardMethod
;
62
FJavaClassMethod
SendTouchEventMethod
;
63
FJavaClassMethod
SendKeyEventMethod
;
64
FJavaClassMethod
SetAndroid3DBrowserMethod
;
65
FJavaClassMethod
SetVisibilityMethod
;
66
67
// FrameUpdateInfo member field ids
68
jclass
FrameUpdateInfoClass
;
69
jfieldID
FrameUpdateInfo_Buffer
;
70
jfieldID
FrameUpdateInfo_Bitmap
;
71
jfieldID
FrameUpdateInfo_FrameReady
;
72
jfieldID
FrameUpdateInfo_RegionChanged
;
73
74
FTextureRHIRef
VideoTexture
;
75
bool
bVideoTextureValid
;
76
77
public
:
78
FTextureRHIRef
GetVideoTexture
()
79
{
80
return
VideoTexture
;
81
}
82
83
void
SetVideoTexture
(
FTextureRHIRef
Texture
)
84
{
85
FPlatformMisc::LowLevelOutputDebugStringf
(
TEXT
(
"Fetch RT: SetVideoTexture: %d"
),
Texture
.IsValid());
86
87
VideoTexture
=
Texture
;
88
}
89
90
void
SetVideoTextureValid
(
bool
Condition)
91
{
92
bVideoTextureValid
= Condition;
93
}
94
95
bool
IsVideoTextureValid
()
96
{
97
return
bVideoTextureValid
;
98
}
99
100
};
101
102
#endif
// USE_ANDROID_JNI
EAnalyticsBuildType::Release
@ Release
AndroidJava.h
AndroidJniWebViewControl.h
AndroidPlatform.h
CoreMinimal.h
TEXT
#define TEXT(x)
Definition
Platform.h:1272
int64
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition
Platform.h:1127
int32
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition
Platform.h:1125
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
EDataValidationUsecase::Script
@ Script
EDatasmithElementType::Texture
@ Texture
Close
JsonWriter Close()
EWebTransitionSource::Reload
@ Reload
EAccelerationStructureBuildMode::Update
@ Update
RHIResources.h
RHI.h
FName
Definition
NameTypes.h:617
TRefCountPtr< FRHITexture >
FGenericPlatformMisc::LowLevelOutputDebugStringf
static CORE_API void VARARGS LowLevelOutputDebugStringf(const TCHAR *Format,...)
Definition
GenericPlatformMisc.cpp:940
Engine
Source
Runtime
WebBrowser
Private
Android
AndroidJavaWebBrowser.h
Generated by
1.9.8