title: Calling Android Activity from exported Unity project, NullPointerException
body: <p>I have exported an Android Unity project to create and Android Studio project (as detailed here: <a href="https://stackoverflow.com/questions/38980792/exporting-and-running-unity3d-project-to-android-studio">Exporting and running Unity3D project to Android Studio</a>) </p>
  
  <p>While, the project will now run through Android Studio, I am unable to load an Activity which I created after importing the project.</p>
  
  <p>I am wondering is this possible?</p>
  
  <p>I have checked other solution for NullPointerException when calling a new class in android and was unable to see any relating issues, making me question if my approach to this problem is correct</p>
  
  <p>The unity project is a simlple button that will access a method in the <em>UnityPlayerActivity</em> (proved through Log), before attempting to load the new activity <em>AndroidTestActivity</em>, which just contains a TextView.</p>
  
  <p>Code is as follows</p>
  
  <p>Unity C#:</p>
  
  <pre><code>public void Click () {
  
      Debug.Log("Clicked");
  
      AndroidJavaObject jo = new AndroidJavaObject("com.Test.AndroidTest.UnityPlayerActivity");
      jo.Call("Created");
  }
  </code></pre>
  
  <p>UnityPlayerActivity.java</p>
  
  <pre><code>public void Created(){
      Log.e("tag", "Created");
  
      Intent i = new Intent(this, AndroidTestActivity.class);
      this.startActivity(i);
  }
  </code></pre>
  
  <p>LogCat Output:</p>
  
  <pre><code>E/tag: Created
  E/Unity: AndroidJavaException: java.lang.NullPointerException: Attempt to 
  invoke virtual method 'android.app.ActivityThread$ApplicationThread android.app.ActivityThread.getApplicationThread()' on a null object reference
       java.lang.NullPointerException: Attempt to invoke virtual method 'android.app.ActivityThread$ApplicationThread android.app.ActivityThread.getApplicationThread()' on a null object reference
           at android.app.Activity.startActivityForResult(Activity.java:4400)
           at android.app.Activity.startActivityForResult(Activity.java:4358)
           at android.app.Activity.startActivity(Activity.java:4682)
           at android.app.Activity.startActivity(Activity.java:4650)
           at com.Test.AndroidTest.UnityPlayerActivity.Created(UnityPlayerActivity.java:39)
           at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
           at com.unity3d.player.UnityPlayer.c(Unknown Source)
           at com.unity3d.player.UnityPlayer$c$1.handleMessage(Unknown Source)
           at android.os.Handler.dispatchMessage(Handler.java:98)
           at android.os.Looper.loop(Looper.java:154)
  </code></pre>
  
  <p>I have also ensured that the new activity is declared in the android manifest and it has been imported in UnityPlayerActivity</p>