title: Callback From Activity on Cordova
body: <p>I have an activity Called 'Signature' and i call it from CordovaPlugin;</p>
  
  <p>Plugin.java</p>
  
  <pre><code>public boolean execute(String action, JSONArray args,
              CallbackContext callbackContext) throws JSONException
      {
      Intent i = new Intent(context, Signature.class);
      i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
      cordova.startActivityForResult(this,i,90);
  }
      public void onActivityResult(int requestCode, int resultCode, Intent intent) {
          Log.d(TAG, "activity result in plugin: requestCode(" + requestCode + "), resultCode(" + resultCode + ")");
          if(requestCode == 90) {
               if (resultCode == this.cordova.getActivity().RESULT_OK) {
                   Bundle res = intent.getExtras();
                   String result = res.getString("results");
                   Log.d("FIRST", "result:"+result);
                   this.callbackContext
                   .success(result.toString());
               } else {
                   this.callbackContext.error("Error");
               }
       }
  </code></pre>
  
  <p>Signature.java</p>
  
  <pre><code>private void finishWithResult(String result,int status)
  {
      Bundle conData = new Bundle();
      conData.putString("results", result);
      Intent intent = new Intent();
      intent.putExtras(conData);
      setResult(status, intent);
      finish();
  }
  </code></pre>
  
  <p>However when i call "cordova.startActivityForResult" function "onActivityResult" immediately invokes it self. I  cannot callback from Activity via finishWithResult. Any advices. Thanks</p>