C# 클래스 AndroidHelper, project-tango-poc

Helper functions for common android functionality.
파일 보기 프로젝트 열기: stetro/project-tango-poc 1 사용 예제들

공개 메소드들

메소드 설명
AndroidFinish ( ) : void

Calls finish on the Unity Activity.

AndroidQuit ( ) : void

Calls quit on the Unity Activity.

ApplicationHasTangoPermissions ( string permissionType ) : bool

Check if the application has a Tango permission.

GetCurrentApplicationLabel ( ) : string

Gets the current application label.

GetCurrentPackageName ( ) : string

Gets the name of the current package.

GetPackageInfo ( string packageName ) : AndroidJavaObject

Gets the package info.

GetScreenOrientation ( ) : int

Get native android orientation index.

GetTangoDeviceOrientation ( ) : TangoDeviceOrientation

Get the devices current and default orientations.

GetTangoHelperObject ( ) : AndroidJavaObject

Gets the Java tango helper object.

GetUnityActivity ( ) : AndroidJavaObject

Gets the unity activity.

GetVersionCode ( string packageName ) : int

Gets the version code.

GetVersionName ( string packageName ) : string

Gets the name of the version.

IsTangoCorePresent ( ) : bool

Check if the Tango Core package is installed.

IsTangoCoreUpToDate ( ) : bool

Check if the Tango Core package is up to date.

PerformanceLog ( string message ) : void

Used for performance logging from the Android side.

RegisterOnActivityResultEvent ( OnActivityResultEventHandler onActivityResult ) : void

Registers for the Android on activity result event.

RegisterOnScreenOrientationChangedEvent ( OnScreenOrientationChangedEventHandler onChanged ) : void

Registers for on orientaiton change event.

RegisterPauseEvent ( OnPauseEventHandler onPause ) : void

Registers for the Android pause event.

RegisterResumeEvent ( OnResumeEventHandler onResume ) : void

Registers for the Android resume event.

ShowAndroidToastMessage ( string message ) : void

Shows the android toast message.

ShowAndroidToastMessage ( string message, ToastLength length ) : void

Shows the android toast message.

ShowAndroidToastMessage ( string message, bool callFinish ) : void

Shows the android toast message.

StartActivity ( string className ) : void

Starts the activity for the provided class name.

StartTangoPermissionsActivity ( string permissionsType ) : void

Start the Tango permissions activity, requesting that permission.

비공개 메소드들

메소드 설명
ConnectCloud ( ) : bool

Connects to the TangoCloudService.

DisconnectCloud ( ) : bool

Disconnects from the TangoCloudService.

StartExportADFActivity ( string srcAdfUuid, string exportLocation ) : void

Call export ADF permission activity.

StartImportADFActivity ( string adfPath ) : void

Call import ADF permission activity.

_RegisterCallbacks ( ) : void

Inializes the AndroidJavaProxy for the Android lifecycle callbacks.

_ShowAndroidToastMessage ( string message, ToastLength length ) : void

Shows the android toast message.

메소드 상세

AndroidFinish() 공개 정적인 메소드

Calls finish on the Unity Activity.
public static AndroidFinish ( ) : void
리턴 void

AndroidQuit() 공개 정적인 메소드

Calls quit on the Unity Activity.
public static AndroidQuit ( ) : void
리턴 void

ApplicationHasTangoPermissions() 공개 정적인 메소드

Check if the application has a Tango permission.
public static ApplicationHasTangoPermissions ( string permissionType ) : bool
permissionType string String for the permission.
리턴 bool

GetCurrentApplicationLabel() 공개 정적인 메소드

Gets the current application label.
public static GetCurrentApplicationLabel ( ) : string
리턴 string

GetCurrentPackageName() 공개 정적인 메소드

Gets the name of the current package.
public static GetCurrentPackageName ( ) : string
리턴 string

GetPackageInfo() 공개 정적인 메소드

Gets the package info.
public static GetPackageInfo ( string packageName ) : AndroidJavaObject
packageName string Package name.
리턴 UnityEngine.AndroidJavaObject

GetScreenOrientation() 공개 정적인 메소드

Get native android orientation index.
public static GetScreenOrientation ( ) : int
리턴 int

GetTangoDeviceOrientation() 공개 정적인 메소드

Get the devices current and default orientations.
public static GetTangoDeviceOrientation ( ) : TangoDeviceOrientation
리턴 TangoDeviceOrientation

GetTangoHelperObject() 공개 정적인 메소드

Gets the Java tango helper object.
public static GetTangoHelperObject ( ) : AndroidJavaObject
리턴 AndroidJavaObject

GetUnityActivity() 공개 정적인 메소드

Gets the unity activity.
public static GetUnityActivity ( ) : AndroidJavaObject
리턴 AndroidJavaObject

GetVersionCode() 공개 정적인 메소드

Gets the version code.
public static GetVersionCode ( string packageName ) : int
packageName string Package name.
리턴 int

GetVersionName() 공개 정적인 메소드

Gets the name of the version.
public static GetVersionName ( string packageName ) : string
packageName string Package name.
리턴 string

IsTangoCorePresent() 공개 정적인 메소드

Check if the Tango Core package is installed.
public static IsTangoCorePresent ( ) : bool
리턴 bool

IsTangoCoreUpToDate() 공개 정적인 메소드

Check if the Tango Core package is up to date.
public static IsTangoCoreUpToDate ( ) : bool
리턴 bool

PerformanceLog() 공개 정적인 메소드

Used for performance logging from the Android side.
public static PerformanceLog ( string message ) : void
message string Message string to log.
리턴 void

RegisterOnActivityResultEvent() 공개 정적인 메소드

Registers for the Android on activity result event.
public static RegisterOnActivityResultEvent ( OnActivityResultEventHandler onActivityResult ) : void
onActivityResult OnActivityResultEventHandler On activity result.
리턴 void

RegisterOnScreenOrientationChangedEvent() 공개 정적인 메소드

Registers for on orientaiton change event.
public static RegisterOnScreenOrientationChangedEvent ( OnScreenOrientationChangedEventHandler onChanged ) : void
onChanged OnScreenOrientationChangedEventHandler Delegate to call when the screen orientation changes.
리턴 void

RegisterPauseEvent() 공개 정적인 메소드

Registers for the Android pause event.
public static RegisterPauseEvent ( OnPauseEventHandler onPause ) : void
onPause OnPauseEventHandler On pause.
리턴 void

RegisterResumeEvent() 공개 정적인 메소드

Registers for the Android resume event.
public static RegisterResumeEvent ( OnResumeEventHandler onResume ) : void
onResume OnResumeEventHandler On resume.
리턴 void

ShowAndroidToastMessage() 공개 정적인 메소드

Shows the android toast message.
public static ShowAndroidToastMessage ( string message ) : void
message string Message string to show in the toast.
리턴 void

ShowAndroidToastMessage() 공개 정적인 메소드

Shows the android toast message.
public static ShowAndroidToastMessage ( string message, ToastLength length ) : void
message string Message string to show in the toast.
length ToastLength Toast message time length.
리턴 void

ShowAndroidToastMessage() 공개 정적인 메소드

Shows the android toast message.
public static ShowAndroidToastMessage ( string message, bool callFinish ) : void
message string Message string to show in the toast.
callFinish bool If set to true call finish on the unity activity.
리턴 void

StartActivity() 공개 정적인 메소드

Starts the activity for the provided class name.
public static StartActivity ( string className ) : void
className string Class name.
리턴 void

StartTangoPermissionsActivity() 공개 정적인 메소드

Start the Tango permissions activity, requesting that permission.
public static StartTangoPermissionsActivity ( string permissionsType ) : void
permissionsType string String for the permission to request.
리턴 void