Samo Poláček Samo Poláček - 1 month ago 4x
Java Question

Method calling issue

I came into this whilst spending my night programming.

//Reader class isn't but it's from third party library
public class ACR122U extends Reader {
// This method is called from outside
// This method overrides method of the Reader class
public void open(UsbDevice device) {
new OpenTask().execute(device);

private class OpenTask extends AsyncTask<UsbDevice, Void, Exception> {
protected Exception doInBackground(UsbDevice... params) {
Exception result = null;

try {
// There the problem (recursion) happens
// I don't want to call but
// I cannot call /super of OpenTask class is AsyncTask/
} catch (Exception e) {
result = e;

return result;

and I'm wondering if it's possible to solve the problem without changing name of open() method.
Any idea?

PS: Newbie here.


The syntax for what you want to do is:[0]);

However, if you're talking about, this isn't going to work because the Reader class doesn't define an open() method; certainly not an open(UsbDevice) method.