Bitcoin Forum
December 13, 2024, 09:41:06 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Please give us back the option to disable Sync on Power  (Read 6379 times)
Krellan (OP)
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
July 22, 2013, 08:29:13 PM
 #1

If you look in Google Play, you will see a lot of other people reporting the same problem.

https://play.google.com/store/apps/details?id=de.schildbach.wallet

Previous versions of this app used to have checkboxes, "Sync on Power" and "Sync on Wi-Fi".

The current version of this app no longer has these choices exposed to the user.  Instead, it adds a nice feature, that is, the ability to have these checkboxes be cumulative (requiring BOTH power AND wireless in order to sync).  However, there's no way to disable this.

Please, please, please, restore the ability of the user to disable the sync, so that the user can stop the app from syncing automatically.

You are very lucky in Germany, but here in the USA, unlimited data plans on cellphones seem to be disappearing.  I want to be able to charge my phone without fear that a peer-to-peer app is going to start up whenever it sees power, and start burning up my bandwidth outside my control.

Please, please, please.

Nobody likes apps that do things behind their back.

Thank you for listening!

If developer is unable/unwilling to restore this feature, then I would be curious to hear suggestions for a workaround.  The "Trusted Peer" feature might work, I could set a peer of 127.0.0.1 (thus preventing it from connecting it anywhere), and using the "Skip Regular Peer Discovery" checkbox to control whether or not I want it to search for additional peers or not.  Also, the "Autorun Manager" app looks promising, I could revoke the event listeners of Bitcoin Wallet and thus prevent it from seeing events that would cause it to begin syncing.

Josh

1JUZr4TZ5zuB4WdEv4mrhZMaM7yttpJvLG Smiley
Andreas Schildbach
Moderator
Hero Member
*
Offline Offline

Activity: 483
Merit: 551


View Profile
July 22, 2013, 09:59:48 PM
 #2

First of all, there never was a "Sync on Wifi" checkbox.

If you want to spare your data plan, I suggest disabling mobile data in the Android settings. The "Sync on Power" setting was never good at that. Besides, the apps data usage is negliable nowadays (if you don't do a lot of blockchain replays).
Krellan (OP)
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
July 22, 2013, 10:14:21 PM
 #3

First of all, there never was a "Sync on Wifi" checkbox.

If you want to spare your data plan, I suggest disabling mobile data in the Android settings. The "Sync on Power" setting was never good at that. Besides, the apps data usage is negliable nowadays (if you don't do a lot of blockchain replays).


I don't want to disable mobile data entirely.

Would it be too hard to add a checkbox to disable sync from ever being automatically started?  I don't mind sync being done if the user explicitly opens the app, that's a good thing.

I don't like the idea of connections always being opened in the background (especially P2P connections which are banned on many corporate networks and could get me into trouble if I take my phone in there).

Thanks for listening.  I'm not the only one who is unhappy about the app's background connections, with no way to disable them, just look at the recent reviews on the Google Play store.

Josh

1JUZr4TZ5zuB4WdEv4mrhZMaM7yttpJvLG Smiley
Andreas Schildbach
Moderator
Hero Member
*
Offline Offline

Activity: 483
Merit: 551


View Profile
July 23, 2013, 07:26:28 AM
 #4

Sounds like you might want to try the "Restrict background data" option in the Android settings. That can be set on a per-app basis I think.

Let me know the app behaves using that. If something fails badly, I'll try to fix.

In the same prefs, you even have the choice to add specific Wifis to a list of Mobile hotspots which can get a special treatment. You might want to explore into that feature for your corporate network.
Mike Hearn
Legendary
*
Offline Offline

Activity: 1526
Merit: 1134


View Profile
July 23, 2013, 01:58:37 PM
 #5

Great suggestions from Andreas - please don't take it the wrong way, he's not blowing you off Wink Your requirements are best met at the operating system layer and Android does these days provide the tools you need to achieve it.

Normally, corporate networks will block outbound connections on ports the admins aren't comfortable with, so the app will never successfully connect over wifi. If you get into trouble over that, well, your admins need to chill out a bit. I'm sure all kinds of mobile apps talk on all kinds of non-web ports so I doubt they would care.

For bandwidth usage, check out the data usage settings page (if you're on ICS+). You should find it's completely trivial. I have a 1GB/month plan and Bitcoin Wallet doesn't make any difference to my aggregate usage. It downloads kilobytes of data, not megabytes.
Krellan (OP)
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
July 23, 2013, 09:50:57 PM
 #6

Thanks.  I want to restrict this app's usage, though, not set a global setting in Android which would apply to all apps.

I think I found a reasonable workaround:

Go into "Settings", enter Trusted Peer of "127.0.0.1", and check the checkbox "Skip Regular Peer Discovery".

This will keep it from making any unwanted connections whenever it wakes up.

You can use the "Skip Regular Peer Discovery" checkbox as a toggle.  Uncheck it when you want it to sync up (takes less than a minute).  Then, before closing the app, check that checkbox again, and it will obediently stop using the network again.

Josh

1JUZr4TZ5zuB4WdEv4mrhZMaM7yttpJvLG Smiley
Andreas Schildbach
Moderator
Hero Member
*
Offline Offline

Activity: 483
Merit: 551


View Profile
July 23, 2013, 11:05:57 PM
 #7

I want to restrict this app's usage, though, not set a global setting in Android which would apply to all apps.

As I said, it's not global.

Quote
Go into "Settings", enter Trusted Peer of "127.0.0.1", and check the checkbox "Skip Regular Peer Discovery".
This will keep it from making any unwanted connections whenever it wakes up.

It will drain your battery, as it will endlessly try to connect. Also see:

http://code.google.com/p/bitcoinj/issues/detail?id=296
Krellan (OP)
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
July 24, 2013, 01:46:21 AM
 #8

It will drain your battery, as it will endlessly try to connect. Also see:

http://code.google.com/p/bitcoinj/issues/detail?id=296

Damn.  That's unfortunate.

Thought I had found a good workaround.

That's a nasty bug, that it will just loop the app and try again in an infinite loop upon failure to connect, draining the battery.  I verified that in "OS Monitor": it wasn't using 100% CPU, but it was using more than any other process.  Really frustrating that it would have that behavior.  Was this intentional, perhaps as a punishment to discourage people from trying to prevent the app from making connections?

Can't set "Restrict background data" on a per-app basis, it's global.  Unless there's a mod/tweak somewhere that I don't have.  And, besides, if the data is restricted, wouldn't that just cause the app to be thrown in a loop also?

Getting really discouraged by this.  Seeing no choice but to send away my bitcoins and uninstall.  Sucks, because that's one of the reasons I bought an Android phone instead of an iPhone.


1JUZr4TZ5zuB4WdEv4mrhZMaM7yttpJvLG Smiley
Mike Hearn
Legendary
*
Offline Offline

Activity: 1526
Merit: 1134


View Profile
July 24, 2013, 08:41:24 AM
 #9

It's not intentional, it's just never been a priority to fix.

I will say this again - why do you care about this? Bitcoin Wallet is likely to use less bandwidth than your email syncing does. If you have any kind of mobile internet plan at all, you can afford this app.

Do you actually observe it use significant amounts of your bandwidth quota, or is this some psychological thing where you just can't stand the idea of it talking to the network in the background?
Andreas Schildbach
Moderator
Hero Member
*
Offline Offline

Activity: 483
Merit: 551


View Profile
July 24, 2013, 09:36:16 AM
 #10

Can't set "Restrict background data" on a per-app basis, it's global.  Unless there's a mod/tweak somewhere that I don't have.

I'm on stock Android 4.2.2 (Galaxy Nexus).

Quote
And, besides, if the data is restricted, wouldn't that just cause the app to be thrown in a loop also?

Not necessarly. If Android correctly notifies the app that network is down, the app will act appropriately and not fire up Peers/PeerGroup.

I've never tried because I think it's worth to invest 1 MB of my 200 MB monthly mobile quota in being synched with the chain as much as possible. But since you're so convinced about the usecase - why don't you try?

Btw. was just thinking about the looping connect bug again. I was exaggerating. It will not connect endlessly but only for 2-3 minutes at a time - there is a timeout built into the app. Still you want to avoid running into that bug if possible.
Krellan (OP)
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
July 24, 2013, 11:59:44 PM
 #11

It's not intentional, it's just never been a priority to fix.

I will say this again - why do you care about this? Bitcoin Wallet is likely to use less bandwidth than your email syncing does. If you have any kind of mobile internet plan at all, you can afford this app.

Do you actually observe it use significant amounts of your bandwidth quota, or is this some psychological thing where you just can't stand the idea of it talking to the network in the background?

A little of both.

I haven't noticed it using a lot of bandwidth, which is good.  I rather like the per-app metering of bandwidth that Android provides.  Still haven't found a way to constrain "Restrict background data" to a single app, though.  When checking this checkbox, it then applies to every app that I have.

Other apps in the background I have running because I want them, they do useful things to me.  However, when I'm not running Bitcoin, I don't want that running.  Not at all.  Not even in the background behind my back.  Also, because it's a peer-to-peer protocol, Bitcoin will be making all sorts of connections to random IP addresses everywhere, and that could look suspicious.  Unlike my computer at home, I often bring my phone into corporate environments and whatnot, where they look suspiciously at activity, especially P2P.

I don't like being forced to deal with a carrot and stick approach, where in order to get a carrot (plug my phone into power in order to recharge it), I have to also take a stick (mandatory starting-up of the Bitcoin app and its background connections).  Really makes me feel like I'm being manipulated.

Again, I'm not the only one who feels this way, although you might think it strange.  Just take a look at the recent reviews on the Google App Store.

1JUZr4TZ5zuB4WdEv4mrhZMaM7yttpJvLG Smiley
Krellan (OP)
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
July 25, 2013, 12:06:42 AM
 #12

I'm on stock Android 4.2.2 (Galaxy Nexus).

I'm also on 4.2.2.  Got a Samsung Galaxy S4 Active (I would have preferred the stock Google ROM, no Samsung or AT&T bloat, but didn't know that at the time).

Quote
Not necessarly. If Android correctly notifies the app that network is down, the app will act appropriately and not fire up Peers/PeerGroup.

Does 127.0.0.1 count as "network is down"?  That address should always be reachable, even if device is completely isolated, since it's talking to itself then.

Quote
I've never tried because I think it's worth to invest 1 MB of my 200 MB monthly mobile quota in being synched with the chain as much as possible. But since you're so convinced about the usecase - why don't you try?

I'm trying it now.  Even if the app takes more battery life, at least I'll be able to recharge my phone at work again!

Quote
Btw. was just thinking about the looping connect bug again. I was exaggerating. It will not connect endlessly but only for 2-3 minutes at a time - there is a timeout built into the app. Still you want to avoid running into that bug if possible.

Thanks for the update.  I noticed that CPU usage did increase, but not enough to be a real concern.  I'll let it go for a while, though, and see how it makes a difference.

1JUZr4TZ5zuB4WdEv4mrhZMaM7yttpJvLG Smiley
Mike Hearn
Legendary
*
Offline Offline

Activity: 1526
Merit: 1134


View Profile
July 25, 2013, 12:43:02 PM
 #13

The background syncing IS useful - it ensures that next time you open the app, it can catch up very fast (in a few seconds). Otherwise if you didn't open it for a month there'd be a short delay until it could see payments to you. Also, it only spends a moment or two syncing and then shuts down. It's not running the whole time you're charging, nowhere near.

So this leaves your fear that the app will make the people where you work mad at you. Although I hate to say it, this is not a very common problem to have. Maybe the fix is to just see if they notice, and if they do, explain that you have a P2P app on your phone? If for some reason they have a big problem with that, they can just block port 8333 and it's done.

Alternatively, you can put riker.plan99.net into your trusted peer setting, and then it'll only make a single connection, so the "p2p-ness" of it won't be so obvious.
Andreas Schildbach
Moderator
Hero Member
*
Offline Offline

Activity: 483
Merit: 551


View Profile
August 13, 2013, 09:22:42 PM
 #14

I just released version 3.16 which does not trigger a sync operation by plugging your device to power any more.

Note this does not mean it won't sync in background. If you want to restrict that, go to the Android "Data usage" prefs and enable "Restrict background data" (either globally, or just for the app). But its really not needed - both traffic and battery usage is negliable since version 3.
Krellan (OP)
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
August 15, 2013, 10:02:18 PM
 #15

I just released version 3.16 which does not trigger a sync operation by plugging your device to power any more.

Note this does not mean it won't sync in background. If you want to restrict that, go to the Android "Data usage" prefs and enable "Restrict background data" (either globally, or just for the app). But its really not needed - both traffic and battery usage is negliable since version 3.

Nice!

Thanks for not hooking the "charger connected" event any more.

I also see you added a direct link in the app's settings menu to the Android "Data usage" panel.  Touché.

It still syncs at reboot, though.

Ultimately, checkboxes would be the best approach:

[ ] Sync when charger connected
[ ] Sync when rebooted
[ ] Sync automatically in background every [ ] minutes

I really don't like the idea of carrying around a device which makes unwanted connections behind my back every so often.  Does anybody else feel bothered by this?  Sometimes, I think I'm alone.  Am I the only one who doesn't want apps making all sorts of connections everywhere in the background?

Josh

1JUZr4TZ5zuB4WdEv4mrhZMaM7yttpJvLG Smiley
Krellan (OP)
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
August 15, 2013, 11:20:38 PM
 #16

I just released version 3.16 which does not trigger a sync operation by plugging your device to power any more.

Note this does not mean it won't sync in background. If you want to restrict that, go to the Android "Data usage" prefs and enable "Restrict background data" (either globally, or just for the app). But its really not needed - both traffic and battery usage is negliable since version 3.

Ouch, I just noticed something new: the synchronization now starts happening on its own, on a timer, even when the device is running on battery!

WHY are you doing this?  What is your motivation?

Bitcoin Wallet is such a good app, why do you add these malware-like things in the background?  Why do you hook reboots?  Why do you restart the network synchronizations on a timer?  Can't I just run the app when it's open, and leave it at that?  Please behave like a well-behaved app, and do not consume resources in the background.  Simply shut down.  Do nothing.  When the user leaves the app, close the connections, and allow your process to exit.

I looked at Battery usage and Bitcoin Wallet has taken a full 5% of my battery.  That might not sound like a lot, but I'm trying to save as much as I can.

This latest update is worse, instead of better, because now instead of acting only at reboot and only when the charger is first connected, it now acts on its own in the background, without any way for the user to stop this from happening.

Damn it, it just popped up again, and I thought I had just killed it!  What's the timer frequency?  It seems to be firing every few minutes or so.

Reluctantly, I just sent a payment to zero out my wallet, and I am now DELETING this fine app.  It makes me sad, because this app is truly great.. when it's up and running in the foreground!

I don't understand why making network connections in the background, on a timer, and at startup are not concerns of yours.  It seems that many people would be leery of an app that consumes their network and battery even when the app is closed, and not wanted.  At the minimum this should be a configurable option.

1JUZr4TZ5zuB4WdEv4mrhZMaM7yttpJvLG Smiley
Mike Hearn
Legendary
*
Offline Offline

Activity: 1526
Merit: 1134


View Profile
August 16, 2013, 10:05:01 AM
 #17

You guys ARE NOT READING WHAT IS WRITTEN.

Andreas has already told you how to disable this. Maybe you can't see the option because you have to scroll down on the data usage screen to get it. At the bottom of the app specific data usage screen is a tick box that says "Restrict background data usage". Tick it and your issue will go away.

Krellan (OP)
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
August 20, 2013, 10:29:35 PM
 #18

You guys ARE NOT READING WHAT IS WRITTEN.

Andreas has already told you how to disable this. Maybe you can't see the option because you have to scroll down on the data usage screen to get it. At the bottom of the app specific data usage screen is a tick box that says "Restrict background data usage". Tick it and your issue will go away.

You guys are NOT UNDERSTANDING the fundamental problem.

Checking the "Restrict background data" box:

1) It will only turn off cellular data, and will not affect Wi-Fi data.

2) The problem isn't data, it's that the app keeps waking up, taking battery life.

3) Due to unfixed bugs in the app, if it can't reach its peers, it gets unhappy, and spins in a loop, taking 100% CPU.  This will further drain battery life.

4) The app shouldn't be doing things behind the user's back anyway, but this is a philosophical design issue, one that we absolutely and fundamentally disagree on.  You believe that apps should be free to wake up whenever they want, hook whatever events they want, make whatever connections they want, consume finite resources (battery) as much as they want, and at whatever times they want.  We don't.  Thus, this makes it impossible to further reason or compromise about this issue.

Josh

1JUZr4TZ5zuB4WdEv4mrhZMaM7yttpJvLG Smiley
Andreas Schildbach
Moderator
Hero Member
*
Offline Offline

Activity: 483
Merit: 551


View Profile
August 20, 2013, 11:18:03 PM
 #19

4) The app shouldn't be doing things behind the user's back anyway

If computers wouldn't do things behind users backs, we would not have any use for them.

An app has got an UI. Anything that happens beyond it is happening "behind the users backs".

So yes, we have a fundamental disagreement here.
Mike Hearn
Legendary
*
Offline Offline

Activity: 1526
Merit: 1134


View Profile
August 21, 2013, 04:39:23 PM
 #20

5% battery usage is too high indeed, but that doesn't seem to be normal. Is this after you've tried things to restrict background data usage? There might be CPU looping bugs that can occur in such a mode that could be fixed.

However you have to understand that Android phones are doing things in the background all the time. Just run adb logcat and watch for a while. They sync mail, calendar, check for app updates, they tear down and re-establish push connections, they search for wifi hotspots, they optimise applications, they check for OS updates and so on. None of these apps or services have a "don't run in background" option in their UI, rather, they're just expected to make maximally efficient use of the device resources.

Now some apps are pretty bad at that and use a lot of resources for no real reason, that's certainly true, and if you're seeing 5% battery usage then I'd say that needs to be fixed. But if it was 1% or less then I'd think there's no real issue here.

Why not just introduce a setting? Because it's bad software design. If you add a setting every time someone complains about something on a forum you end up with a million obscure settings. Bitcoin Wallet already has too many settings - heck, why is there a toggle for the connectivity indicator and the disclaimer? The connectivity indicator should probably be a part of the main app screen (or not there at all - it's obsolete now there's the network monitor), and there's probably no use case for reactivating the disclaimer after you read it.

The vast majority of Android apps keep themselves fresh and up to date in the background. That's just how the platform works. If you're upset about that, you're upset about how modern platforms function. Requesting settings in every app you use to try and fight that trend isn't the way to go. Power user versions of Android itself are the right place to add that feature - so perhaps Cyanogen allows you to manually manage app lifecycles.

Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!