Skip to content

Commit

Permalink
fixed android example project
Browse files Browse the repository at this point in the history
  • Loading branch information
LeowWH committed Jun 7, 2018
1 parent 1155971 commit 2ab607f
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package com.molpayreactexampleproject;

import com.facebook.react.ReactActivity;
//add these three
import com.molpayxdk.MOLPayReact;
import com.molpayxdk.MOLPayReactActivity;
import android.content.Intent;

public class MainActivity extends ReactActivity {

Expand All @@ -16,15 +12,4 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() {
return "MOLPayReactExampleProject";
}

//add activity result in here
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data)
{
if (requestCode == MOLPayReactActivity.MOLPayReactXDK && resultCode == RESULT_OK){
if(MOLPayReact.successCallback != null){
MOLPayReact.successCallback.invoke(data.getStringExtra(MOLPayReactActivity.MOLPayTransactionResult));
}
}
}
}

0 comments on commit 2ab607f

Please sign in to comment.