diff --git a/wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.java b/wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.java index a1d4e43788..3fb2a2887b 100644 --- a/wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.java +++ b/wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.java @@ -563,6 +563,7 @@ public void onReceive(final Context context, final Intent intent) if (isIdle) { log.info("idling detected, stopping service"); + WalletApplication.scheduleStartBlockchainService(BlockchainServiceImpl.this); stopSelf(); } } @@ -708,6 +709,7 @@ else if (BlockchainService.ACTION_RESET_BLOCKCHAIN.equals(action)) log.info("will remove blockchain on service shutdown"); resetBlockchainOnShutdown = true; + WalletApplication.scheduleStartBlockchainService(this); stopSelf(); } else if (BlockchainService.ACTION_BROADCAST_TRANSACTION.equals(action)) @@ -734,8 +736,6 @@ public void onDestroy() { log.debug(".onDestroy()"); - WalletApplication.scheduleStartBlockchainService(this); - unregisterReceiver(tickReceiver); application.getWallet().removeEventListener(walletEventListener); @@ -792,6 +792,7 @@ public void onDestroy() public void onLowMemory() { log.warn("low memory detected, stopping service"); + WalletApplication.scheduleStartBlockchainService(this); stopSelf(); }