Search in sources :

Example 6 with TaskManager

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

the class AppService method getAccountData.

public static void getAccountData(Context context, Seeds.Seed seed, boolean force) {
    if (Validator.isValidCaller() && Store.getCurrentSeed() != null) {
        if (SERVICE != null && countSeedRunningTasks(seed) == 0 && !isGetAccountDataRunning(seed)) {
            if (force || SERVICE.lastAccountCall < System.currentTimeMillis() - 10000) {
                SERVICE.lastAccountCall = System.currentTimeMillis();
                TaskManager rt = new TaskManager(SERVICE);
                GetAccountDataRequest gna = new GetAccountDataRequest(seed);
                gna.setForce(force);
                runTask(rt, gna);
            }
        }
    }
}
Also used : TaskManager(run.wallet.iota.api.TaskManager) GetAccountDataRequest(run.wallet.iota.api.requests.GetAccountDataRequest)

Example 7 with TaskManager

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

the class AppService method sendMessageToAddress.

public static void sendMessageToAddress(Context context, Seeds.Seed seed, String toAddress, String amountIOTA, String message, String tag) {
    if (Validator.isValidCaller() && Store.getCurrentSeed() != null) {
        TaskManager rt = new TaskManager(SERVICE);
        MessageSendRequest tir = new MessageSendRequest(seed, toAddress, message, tag);
        runMessageTask(rt, tir);
    }
}
Also used : TaskManager(run.wallet.iota.api.TaskManager) MessageSendRequest(run.wallet.iota.api.requests.MessageSendRequest)

Example 8 with TaskManager

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

the class AppService method sendNewTransfer.

public static void sendNewTransfer(Context context, Seeds.Seed seed, String toAddress, String amountIOTA, List<Address> fromAddress, Address remainder, String message, String tag) {
    if (Validator.isValidCaller() && Store.getCurrentSeed() != null) {
        TaskManager rt = new TaskManager(SERVICE);
        SendTransferRequest tir = new SendTransferRequest(seed, toAddress, amountIOTA, fromAddress, remainder, message, tag);
        runTask(rt, tir);
    }
}
Also used : SendTransferRequest(run.wallet.iota.api.requests.SendTransferRequest) TaskManager(run.wallet.iota.api.TaskManager)

Example 9 with TaskManager

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

the class AppService method checkUsedAddresses.

private static void checkUsedAddresses() {
    Store.init(SERVICE, false);
    if (!Store.getSeedList().isEmpty() && Store.getLastUsedCheck() < System.currentTimeMillis() - Cal.HOURS_24_IN_MILLIS) {
        TaskManager rt = new TaskManager(SERVICE);
        RefreshUsedAddressesRequest tir = new RefreshUsedAddressesRequest(null);
        runTask(rt, tir);
    }
}
Also used : RefreshUsedAddressesRequest(run.wallet.iota.api.requests.RefreshUsedAddressesRequest) TaskManager(run.wallet.iota.api.TaskManager)

Example 10 with TaskManager

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

the class AppService method sendNewTransfer.

public static void sendNewTransfer(Context context, Seeds.Seed seed, List<PayPacket.PayTo> payTos, List<Address> fromAddress, Address remainder, String message, String tag) {
    if (Validator.isValidCaller() && Store.getCurrentSeed() != null) {
        TaskManager rt = new TaskManager(SERVICE);
        SendTransferRequest tir = new SendTransferRequest(seed, payTos, fromAddress, remainder, message, tag);
        runTask(rt, tir);
    }
}
Also used : SendTransferRequest(run.wallet.iota.api.requests.SendTransferRequest) TaskManager(run.wallet.iota.api.TaskManager)

Aggregations

TaskManager (run.wallet.iota.api.TaskManager)24 SendTransferRequest (run.wallet.iota.api.requests.SendTransferRequest)4 AuditAddressesRequest (run.wallet.iota.api.requests.AuditAddressesRequest)2 AutoNudgeRequest (run.wallet.iota.api.requests.AutoNudgeRequest)2 GetAccountDataRequest (run.wallet.iota.api.requests.GetAccountDataRequest)2 NodeInfoRequest (run.wallet.iota.api.requests.NodeInfoRequest)2 RefreshUsedAddressesRequest (run.wallet.iota.api.requests.RefreshUsedAddressesRequest)2 AddressSecurityChangeRequest (run.wallet.iota.api.requests.AddressSecurityChangeRequest)1 GetFirstLoadRequest (run.wallet.iota.api.requests.GetFirstLoadRequest)1 GetNeighborsRequest (run.wallet.iota.api.requests.GetNeighborsRequest)1 GetNewAddressRequest (run.wallet.iota.api.requests.GetNewAddressRequest)1 MessageFirstLoadRequest (run.wallet.iota.api.requests.MessageFirstLoadRequest)1 MessageNewAddressRequest (run.wallet.iota.api.requests.MessageNewAddressRequest)1 MessageSendRequest (run.wallet.iota.api.requests.MessageSendRequest)1 NudgeRequest (run.wallet.iota.api.requests.NudgeRequest)1 ReplayBundleRequest (run.wallet.iota.api.requests.ReplayBundleRequest)1 WebGetExchangeRatesHistoryRequest (run.wallet.iota.api.requests.WebGetExchangeRatesHistoryRequest)1 WebGetExchangeRatesRequest (run.wallet.iota.api.requests.WebGetExchangeRatesRequest)1