Gamebase SDK for Android 2.44.2
NHN Cloud Gamebase Platform
Loading...
Searching...
No Matches
Gamebase.WebView Class Reference

This class implements the Webview call function. More...

Collaboration diagram for Gamebase.WebView:
Collaboration graph

Static Public Member Functions

static void openWebBrowser (@NonNull final Activity activity, @NonNull final String url)
 This method to create the web browser and display it on screen. More...
 
static void showWebView (@NonNull final Activity activity, @NonNull final String url)
 This method to create the webview and display it on screen. More...
 
static void showWebView (@NonNull Activity activity, @NonNull String url, @NonNull GamebaseWebViewConfiguration configuration)
 This method to create the webview and display it on screen. More...
 
static void showWebView (@NonNull Activity activity, @NonNull String url, @Nullable GamebaseWebViewConfiguration configuration, GamebaseCallback onCloseCallback, List< String > schemeList, GamebaseDataCallback< String > onEvent)
 This method to create the webview and display it on screen. More...
 
static void closeWebView (@NonNull Activity activity)
 This method to close the webview in display on a screen. More...
 

Detailed Description

This class implements the Webview call function.

Member Function Documentation

◆ closeWebView()

static void closeWebView ( @NonNull Activity  activity)
static

This method to close the webview in display on a screen.

Since
Added 1.5.0.
Parameters
activityCurrent activity.

◆ openWebBrowser()

static void openWebBrowser ( @NonNull final Activity  activity,
@NonNull final String  url 
)
static

This method to create the web browser and display it on screen.

Since
Added 1.5.0.
Parameters
activityCurrent activity.
urlThe URL of the resource to load.

◆ showWebView() [1/3]

static void showWebView ( @NonNull Activity  activity,
@NonNull String  url,
@NonNull GamebaseWebViewConfiguration  configuration 
)
static

This method to create the webview and display it on screen.

Since
Added 1.5.0.
Parameters
activityCurrent activity.
urlThe URL of the resource to load.
configurationThe initSettings of webview.

Example Usage:

.setTitleText("title")
.setBackButtonImageResource(R.id.back_button)
.setCloseButtonImageResource(R.id.close_button)
.build();
GamebaseWebView.showWebView(MainActivity.this, "http://www.gamebase.com", initSettings);
Builder setCloseButtonImageResource(@DrawableRes int resourceId)
This method sets the image of the close button.
Definition: GamebaseWebViewConfiguration.java:332
Builder setScreenOrientation(int orientation)
This method sets the screen orientation of the webview.
Definition: GamebaseWebViewConfiguration.java:230
Builder setTitleText(String titleText)
This method sets the title of the webview.
Definition: GamebaseWebViewConfiguration.java:297
Builder setBackButtonImageResource(@DrawableRes int resourceId)
This method sets the image of the back button.
Definition: GamebaseWebViewConfiguration.java:308
GamebaseWebViewConfiguration build()
This method creates an instance of GamebaseWebViewConfiguration.
Definition: GamebaseWebViewConfiguration.java:207
Builder setBackButtonVisible(boolean visible)
This method sets the visibility of the back button of the WebView.
Definition: GamebaseWebViewConfiguration.java:264
Builder setNavigationBarHeight(int height)
This method sets the height of the navigation bar.
Definition: GamebaseWebViewConfiguration.java:286
Builder setNavigationBarColor(int navigationBarColor)
This method sets the color of the webview's navigation bar.
Definition: GamebaseWebViewConfiguration.java:253
Definition: GamebaseWebViewConfiguration.java:18
static Builder newBuilder()
Definition: GamebaseWebViewConfiguration.java:129
Definition: ScreenOrientation.java:7
static final int PORTRAIT
Definition: ScreenOrientation.java:9
See also
com.toast.android.gamebase.GamebaseWebViewConfiguration.
Here is the call graph for this function:

◆ showWebView() [2/3]

static void showWebView ( @NonNull Activity  activity,
@NonNull String  url,
@Nullable GamebaseWebViewConfiguration  configuration,
GamebaseCallback  onCloseCallback,
List< String >  schemeList,
GamebaseDataCallback< String >  onEvent 
)
static

This method to create the webview and display it on screen.

Since
Added 1.4.0.
Parameters
activityCurrent activity.
urlThe URL of the resource to load.
configurationThe initSettings of webview.
onCloseCallbackcalled when the browser closed.
schemeListfor receiving events.
onEventfrom Scheme list.

Example Usage:

.setTitleText("title")
.setBackButtonImageResource(R.id.back_button)
.setCloseButtonImageResource(R.id.close_button)
.build();
"http://www.gamebase.com",
initSettings,
@Override
public void onCallback(GamebaseException exception) {
...
}
},
schemeList,
@Override
public void onCallback(String fullURL, GamebaseException exception) {
...
}
});
This class implements the Webview call function.
Definition: Gamebase.java:2314
static void showWebView(@NonNull final Activity activity, @NonNull final String url)
This method to create the webview and display it on screen.
Definition: Gamebase.java:2334
This class is a wrapper class that is provided to use various features of Gamebase platform.
Definition: Gamebase.java:59
An object that contains the success or failure of the execution of the Gamebase function.
Definition: GamebaseException.java:26
Definition: GamebaseCallback.java:9
Generic callback interface that returns data.
Definition: GamebaseDataCallback.java:12
See also
com.toast.android.gamebase.GamebaseWebViewConfiguration.
com.toast.android.gamebase.GamebaseCallback.
com.toast.android.gamebase.GamebaseDataCallback.

◆ showWebView() [3/3]

static void showWebView ( @NonNull final Activity  activity,
@NonNull final String  url 
)
static

This method to create the webview and display it on screen.

Since
Added 1.4.0.
Parameters
activityCurrent activity.
urlThe URL of the resource to load.
Here is the call graph for this function:
Here is the caller graph for this function: