title: How to create Android Handler in a Java plugin called from Unity
body: <p>So, let's say you have a Unity Java plugin, you call into the Java plugin like so</p>
  
  <pre><code>private static readonly AndroidJavaClass m_somePlugin = new AndroidJavaClass("com.unity3d.Plugin.blah.SomePlugin");
  
  using (var unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
  {
      using (var currentActivity = unityPlayer.GetStatic&lt;AndroidJavaObject&gt;("currentActivity"))
      {
          m_somePlugin.CallStatic("onInitialise", currentActivity);
      }
  }
  </code></pre>
  
  <p>and the plugin looks something like this</p>
  
  <pre><code>public class SomePlugin 
  {
      static public void onInitialise(final Activity currentActivity) 
      {
          Handler someHandler = new Handler();
      }
  }
  </code></pre>
  
  <p>All quite simple.  Except it will crash.  Creating a Handler is the cause.  I&#39;m guessing it&#39;s a thread issue.</p>
  
  <p>So the question is, how does one create a handler in a Java plugin, in the activity that I'm passing in?  Anyone know?</p>