gpg:: AndroidPlatformConfiguration
#include <android_platform_configuration.h>
在 Android 上建立 GameServices 類別例項時使用的平台設定。
摘要
建構函式和解構函式 |
|
---|---|
AndroidPlatformConfiguration()
|
|
~AndroidPlatformConfiguration()
|
公開類型 |
|
---|---|
IntentHandler
|
typedefstd::function< void(jobject)>
如果不想使用主要 Activity 啟動 Play 遊戲 UI,也可選擇設定 IntentHandler 函式。 |
OnLaunchedWithSnapshotCallback
|
typedefstd::function< void(SnapshotMetadata)>
與 SetOnLaunchedWithSnapshot 搭配使用的回呼類型。 |
公開函式 |
|
---|---|
SetActivity(jobject android_app_activity)
|
您必須將這個屬性設為在應用程式生命週期內有效的 Android 活動。
|
SetOnLaunchedWithSnapshot(OnLaunchedWithSnapshotCallback callback)
|
註冊要在應用程式從 Play 遊戲目的地應用程式啟動後呼叫的回呼,方法是選取快照。
|
SetOptionalIntentHandlerForUI(IntentHandler intent_handler)
|
如果不想使用主要 Activity 啟動 Play 遊戲 UI,也可選擇設定 IntentHandler 函式。
|
SetOptionalViewForPopups(jobject android_view)
|
將 View 設為彈出式視窗的內容檢視區塊。
|
Valid() const
|
bool
如果所有必要值已提供給 AndroidPlatformConfiguration,則傳回 true。
|
公開的靜態函式 |
|
---|---|
DEFAULT_ON_LAUNCHED_WITH_SNAPSHOT(SnapshotMetadata snapshot)
|
void
選取快照,從 Play 遊戲目的地應用程式啟動應用程式時,會呼叫的預設回呼。
|
公開類型
IntentHandler
std::function< void(jobject)> IntentHandler
如果不想使用主要 Activity 啟動 Play 遊戲 UI,也可選擇設定 IntentHandler 函式。
使用 startActivityForResult 提供可隨時啟動所提供 UI 意圖的函式。
用來啟動此意圖的活動必須實作 Activity.onActivityResult()。將結果轉送至 AndroidSupport::OnActivityResult。這個函式已在 android_support.h 中宣告。
OnLaunchedWithSnapshotCallback
std::function< void(SnapshotMetadata)> OnLaunchedWithSnapshotCallback
與 SetOnLaunchedWithSnapshot 搭配使用的回呼類型。
公開函式
AndroidPlatformConfiguration
AndroidPlatformConfiguration()
SetActivity
AndroidPlatformConfiguration & SetActivity( jobject android_app_activity )
您必須將這個屬性設為在應用程式生命週期內有效的 Android 活動。
如果您同時未針對 SetOptionalIntentHandlerForUI 設定內容,該活動也會用於啟動 UI,而且必須實作 Activity.onActivityResult()。將結果轉送至 AndroidSupport::OnActivityResult。這個函式已在 android_support.h 中宣告。
SetOnLaunchedWithSnapshot
AndroidPlatformConfiguration & SetOnLaunchedWithSnapshot( OnLaunchedWithSnapshotCallback callback )
註冊要在應用程式從 Play 遊戲目的地應用程式啟動後呼叫的回呼,方法是選取快照。
SetOptionalIntentHandlerForUI
AndroidPlatformConfiguration & SetOptionalIntentHandlerForUI( IntentHandler intent_handler )
如果不想使用主要 Activity 啟動 Play 遊戲 UI,也可選擇設定 IntentHandler 函式。
使用 startActivityForResult 提供可隨時啟動所提供 UI 意圖的函式。
用來啟動此意圖的活動必須實作 Activity.onActivityResult()。將結果轉送至 AndroidSupport::OnActivityResult。這個函式已在 android_support.h 中宣告。
SetOptionalViewForPopups
AndroidPlatformConfiguration & SetOptionalViewForPopups( jobject android_view )
將 View 設為彈出式視窗的內容檢視區塊。
~AndroidPlatformConfiguration
~AndroidPlatformConfiguration()
公開的靜態函式
DEFAULT_ON_LAUNCHED_WITH_SNAPSHOT
void DEFAULT_ON_LAUNCHED_WITH_SNAPSHOT( SnapshotMetadata snapshot )
選取快照,從 Play 遊戲目的地應用程式啟動應用程式時,會呼叫的預設回呼。
如要覆寫這項設定,請使用 SetOnLaunchedWithSnapshot 設定新的回呼。