Manual     Reference     Scripting  
  
Scripting > Runtime Classes > AndroidJavaObject   
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Attributes
  • Enumerations
  • History
  • Index
  • AndroidJavaObject
  • All Members
  • Constructors
  • AndroidJavaObject
  • Functions
  • Call
  • CallStatic
  • Dispose
  • Get
  • GetRawClass
  • GetRawObject
  • GetStatic
  • Set
  • SetStatic

AndroidJavaObject.Get  

function Get.<FieldType> (fieldName : String) : FieldType

Parameters

NameDescription
fieldName The name of the field (e.g. int counter; would have fieldName = "counter")

Description

Get the value of a field in an object (non-static).

The generic parameter determines the field type.

// Create a android.os.Message object, and retrieve the default value of the field 'what'.
function Start() {
var jo = new AndroidJavaObject("android.os.Message");
var valueString = jo.Get.<int>("what");
}