Android Question Access to third party Jar

lkching7

Member
Licensed User
Longtime User
I Was Read Through The Tutorial
Accesing third party Jar with #Additionaljar and JavaObject - Picasso , AdditionalRes Method, Way of Wrapper

But Still Don't Know Which One is The Correct Way I Should Follow.

I Have a airpos-api-v1.0.0.jar From My Third Party Payment Gateway. And I Have The Sample Code (Android Studio) Also.
Download Link (Too Large For Upload To Forum)

Can Someone Give me a Correct Direction or Tip. :(:(:(:(:(
The Payment Gateway (GHL) is Very Popular in Asia especially in South East Asia. If B4X Can Use This Payment Gateway, I Think It Will Help A lot Other User Also.

B4X:
package com.ghl.ghlairposphone;

import com.App.GHL.main.RequestParam;
import com.App.GHL.main.RespParam;
import com.App.GHL.main.airposMain;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

@Override
    public void onClick(View v) {
        //Toast.makeText(GHLMainActivity.this,"call ghl airpos ....",Toast.LENGTH_LONG).show();
        Intent intent = new Intent(GHLMainActivity.this,airposMain.class);
        //Intent intent = new Intent("com.App.GHL.main.airposMain");
        RequestParam tranparam = new RequestParam(selectCardType, selectTranType, textAmount.getText().toString(), textTips.getText().toString(), textTxnno.getText().toString(), true);
        intent.putExtra(airposMain.REQPARAMTAG, tranparam);
        startActivityForResult(intent, REQUEST_CODE);
    }
    
    
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
        switch (requestCode) {
            case REQUEST_CODE:               
                if (resultCode == airposMain.TRAN_SUCCESS) {
                    RespParam respparam = (RespParam)intent.getSerializableExtra(airposMain.RESPPARAMTAG);
                    Log.i("airpos", "TotalAmount: " + respparam.getTotalAmount());
                    Log.i("airpos", "PayType    : " + respparam.getPayType());
                    Log.i("airpos", "TranType   : " + respparam.getTranType());
                    Log.i("airpos", "CardNo     : " + respparam.getCardNo());
                    Log.i("airpos", "CardType   : " + respparam.getCardType());
                    Log.i("airpos", "AuthNo     : " + respparam.getAuthNo());
                    Log.i("airpos", "RefNo      : " + respparam.getRefNo());
                    Log.i("airpos", "TxnNo      : " + respparam.getTxnNo());
                    Log.i("airpos", "DateTime   : " + respparam.getDateTime());
                    Log.i("airpos", "CardHolder : " + respparam.getCardHoldername());
                    textTxnno.setText(respparam.getTxnNo());
                }else if(resultCode == airposMain.TRAN_FAIL){
                    Log.i("airpos", "transaction failed.");
                }else if(resultCode == airposMain.TRAN_CANCEL){
                    Log.i("airpos", "transaction cancel.");
                }
                break;
            default:
        }
    }
 
Top