Search in sources :

Example 1 with NodeInfoRequest

use of run.wallet.iota.api.requests.NodeInfoRequest in project run-wallet-android by runplay.

the class AppService method getNodeInfo.

public static void getNodeInfo(Context context) {
    if (SERVICE != null) {
        if (SERVICE.lastNodeInfo < System.currentTimeMillis() - 3000) {
            SERVICE.lastNodeInfo = System.currentTimeMillis();
            TaskManager rt = new TaskManager(SERVICE);
            NodeInfoRequest nir = new NodeInfoRequest();
            runTask(rt, nir);
        }
    }
}
Also used : NodeInfoRequest(run.wallet.iota.api.requests.NodeInfoRequest) TaskManager(run.wallet.iota.api.TaskManager)

Example 2 with NodeInfoRequest

use of run.wallet.iota.api.requests.NodeInfoRequest in project run-wallet-android by runplay.

the class AppService method getNodeInfo.

public static void getNodeInfo(Context context, boolean force) {
    if (SERVICE != null) {
        if (force || (SERVICE.lastNodeInfo < System.currentTimeMillis() - 3000)) {
            SERVICE.lastNodeInfo = System.currentTimeMillis();
            TaskManager rt = new TaskManager(SERVICE);
            NodeInfoRequest nir = new NodeInfoRequest();
            runTask(rt, nir);
        }
    }
}
Also used : NodeInfoRequest(run.wallet.iota.api.requests.NodeInfoRequest) TaskManager(run.wallet.iota.api.TaskManager)

Aggregations

TaskManager (run.wallet.iota.api.TaskManager)2 NodeInfoRequest (run.wallet.iota.api.requests.NodeInfoRequest)2