AndroidJavaProxy
AndroidJavaProxy
class in UnityEngine
Description
This class can be used to implement any java interface. Any java vm method invocation matching the interface on the proxy object will automatically be passed to the c# implementation.
// Opens an android date picker dialog and grabs the result using a callback.
using UnityEngine;
using System;
class ExampleClass : {
private static DateTime selectedDate = DateTime.Now;
class DateCallback : {
public DateCallback() : base("android.app.DatePickerDialog$OnDateSetListener") { }
void onDateSet( view, int year, int monthOfYear, int dayOfMonth)
{
selectedDate = new DateTime(year, monthOfYear+1, dayOfMonth);
}
}
void OnGUI ()
{
if ((new (15, 15, 450, 75), string.Format("{0