Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_android_sdk_maven_plugin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Panagiotis Triantafyllou
2024-02-23 17:21:31 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0db47f7b67e4bed285b05d229dce1f80c6c012d4
0db47f7b
1 parent
a8757570
steps fixes
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
View file @
0db47f7
...
...
@@ -128,6 +128,7 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
private
Activity
WarpActivity
;
private
String
geolocationOrigin
=
""
;
private
Callback
geolocationCallback
;
private
static
boolean
mWebviewLoaded
=
false
;
// ===========================================================
// Constructors
...
...
@@ -146,6 +147,7 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
super
(
context
,
null
);
ProcessLifecycleOwner
.
get
().
getLifecycle
().
addObserver
(
this
);
WarpActivity
=
activity
;
mWebviewLoaded
=
false
;
init
();
}
...
...
@@ -416,6 +418,13 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
DefaultLifecycleObserver
.
super
.
onStart
(
owner
);
if
(!
EventBus
.
getDefault
().
isRegistered
(
this
))
EventBus
.
getDefault
().
register
(
this
);
if
(
mWebviewLoaded
)
{
String
scriptSourceInit
=
"webviewDidFocus(true);"
;
WarpView
.
this
.
evaluateJavascript
(
scriptSourceInit
,
s
->
{
});
}
}
@Override
...
...
@@ -771,6 +780,12 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
@Override
public
void
onPageFinished
(
WebView
view
,
String
url
)
{
mWebviewLoaded
=
true
;
String
scriptSourceInit
=
"webviewDidFocus(true);"
;
view
.
evaluateJavascript
(
scriptSourceInit
,
s
->
{
});
String
scriptSource
=
"passParams("
+
WarpUtils
.
getWebviewParams
(
getContext
())
+
");"
;
view
.
evaluateJavascript
(
scriptSource
,
s
->
{
...
...
Please
register
or
login
to post a comment