Android Question Using a Jar Kibrary

Discussion in 'Android Questions' started by Antonio Contesti Coll, May 30, 2015.

  1. Antonio Contesti Coll

    Antonio Contesti Coll Member Licensed User

    I've a Jar file called IvrJackU1.jar with some methods
    I attach the documentation.

    I also have a demo for android and the part of the code that call the method open

    reader = new IvrJackService();
    // reader = new IvrJackService();, this);

    I can call the method close with no error but i cant call the method open because uses 2 arguments and i dont know how to send in V4A

    my code

    #AdditionalJar: IvrJackU1

    Sub Activity_Create(FirstTime As Boolean)
    Dim b As Boolean
    Dim aa As Int
    Dim wdj As JavaObject
    Dim adp As JavaObject
    aa=wdj.RunMethod ("readEPC",Array(b))

    End Sub
  2. Antonio Contesti Coll

    Antonio Contesti Coll Member Licensed User

    sorry there is one mistake on line
    wdj.RunMethod("open",Array(GetContext,adp)) and doesn't work
  3. Erel

    Erel Administrator Staff Member Licensed User

    Please use [code]code here...[/code] tags when posting code.

    Based on the java code you should pass: Array(GetContext, GetContext)
  4. Antonio Contesti Coll

    Antonio Contesti Coll Member Licensed User

    I also tried and i 've the same error
    The library tells that open has 2 arguments
    arg 0= Context Activity Example
    arg 1= adapter used for event interface
    Here you have the example of the app in java

    public class Demo extends Activity  implements IvrJackAdapter {
    private boolean bFirstLoad = true;
    private ImageView imgPlugout = null;
    private TextView txtStatus = null;
    private TextView txtTotal = null;
    private TextView txtDate = null;
    private TextView lblEPC = null;
    private TextView lblTimes = null;
    private Button btnQuery = null;
    private Button btnSetting = null;
    private Button clearScreen;
    private ListView epclist;
    private ProgressDialogEx pd;
    private boolean bSuccess;
    private String cMsg;
    private boolean bCancel = false;
    private boolean bOpened = false;
    private MHandler handler = null;
    private CustomListAdapter seqAdapter;
    private ArrayList<seqTag> seqArray = new ArrayList<seqTag>();
    private ArrayList<String> tagArray = new ArrayList<String>();
    private boolean bUpdateRequired = false;
    public static IvrJackService reader = null;
    public void onCreate(Bundle savedInstanceState) {
            imgPlugout = (
            btnQuery = (
            btnSetting = (
    public void onClick(View paramView)
    if (bOpened) {
    "Please stop the inventory tag action.");
                    Intent intent1 = new Intent();
                  intent1.setClass(Demo.this, activity_Setting.class);
            lblEPC = (TextView)findViewById(;
            lblTimes = (TextView)findViewById(;
            txtTotal = (TextView)findViewById(;
            txtStatus = (TextView)findViewById(;
            txtDate = (TextView)findViewById(;
            clearScreen = (Button) findViewById(;
            clearScreen.setOnClickListener(new View.OnClickListener()
             public void onClick(View paramView)
            epclist = ((ListView)findViewById(;
            epclist.setOnItemClickListener(new epclistItemClick());
           seqAdapter = new CustomListAdapter(this, R.layout.customlistview, this.seqArray);
            btnQuery.setOnClickListener(new btnQuery_Click());
            handler = new MHandler(this);
            reader = new IvrJackService();
  , this);

    Thanks for the Help
  5. Erel

    Erel Administrator Staff Member Licensed User

    You can use JavaObject.CreateEvent to create the object that implements this interface and handle its callback.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice