TelegramMessenger / Telegram-iOS

Telegram-iOS
5.86k stars 1.56k forks source link

Background activity drains battery very fast #81

Open atapin opened 5 years ago

atapin commented 5 years ago

Telegram always keeps 1st place among all my apps as a power consumer. During the night it consumes energy exclusively (95-100%).

arturohrv commented 2 years ago

I have a problem with incoming voice calls. My scenario:

I have my Telegram account on two devices. One of these devices is an iPad 7th with iOS 15.1 and Telegram Messenger 8.2.2

  1. I receive a call on two of them
  2. I answer the call on one of them (Android)
  3. I end the call on that one (Android)
  4. The second device (iPad 7th) has its screen on until I close the call. It is on even with smart cover covering the screen

This issue has dropped the entire battery for a few nights. I could even see the light behind the cover then.

I don't know If it is a problem of mine or not. Thanks for your support.

philipptempel commented 2 years ago

I have a problem with incoming voice calls. My scenario:

I have my Telegram account on two devices. One of these devices is an iPad 7th with iOS 15.1 and Telegram Messenger 8.2.2

  1. I receive a call on two of them
  2. I answer the call on one of them (Android)
  3. I end the call on that one (Android)
  4. The second device (iPad 7th) has its screen on until I close the call. It is on even with smart cover covering the screen

This issue has dropped the entire battery for a few nights. I could even see the light behind the cover then.

I don't know If it is a problem of mine or not. Thanks for your support.

Same issue here, however, on iOS 15.1 and iPadOS 15.1.

Call comes in on iPhone and iPad mini, answer it on iPhone, iPad mini still displays the incoming call overlay which I cannot get rid of. The funny part is, I can always accept the call later and telegram does actually show an ongoing call (as in the call timer increases), yet after like 30 seconds or so telegram figures out that the “call failed”. And this “feature” drained my battery today from almost 100% down to 10% in less than 8h.

Weirdly enough though, I don’t experience the issue on my iPad Pro, presumably because I have notifications turned off there?!

Ordauq commented 2 years ago

I'm facing this problem too. iOS 15.1, Telegram 8.2.2 Background app refresh is turned off. image

Jungo495 commented 2 years ago

telegram burn battery in 8 hours IMG_0350 ipad pro, ipadOS 15.1

deleted it

ddnomad commented 2 years ago

@Jungo495 Same here, during NY commute Telegram was draining my iPad Pro battery like crazy. It is roughly 54% Telegram background activity, 40% Find My and 6% the rest.

Background app refresh is turned off.

I guess I'm purging it from my tablet for now.

npulidomateo commented 2 years ago

Same issue.

iPadOS 15.3 Telegram 8.5.1

apanloco commented 2 years ago

This issue is just terrible 💀 I have WhatsApp, Signal, Google Chat, Telegram, iOS Messages. And Telgram is there in the background sucking all my battery over night. The other ones are no-trace Ninjas. I sent a message to qa@telegram.org aswell, why not.

vlw commented 2 years ago

Same issue. iOS 15.3, iphone 13 pro. Incoming telegram call cause iphone heating and very fast battery drain... outgoing calls okay

broomerrctr commented 2 years ago

I also have Telegram drain battery. May be some ideas to configure network or some else?

theimaginationless commented 2 years ago

Drain battery if incoming call answered on other device

andrianyablonskyy commented 2 years ago

The telegram drains the battery after the call was received on another device. This happens because on the iPad telegram continues ringing as the ring screen does not disappear on the iPad. D7287A9F-DDFF-4C0E-9C2D-36EFB4D132EB 2DED7726-2C93-4574-9CA7-D763A303E110

veselcraft commented 2 years ago

aaaand the problem comes in again

image

evanre commented 2 years ago

Try this: Settings > Privacy and Security > Disable: iOS Call integration

vlw commented 2 years ago

Try this: Settings > Privacy and Security > Disable: iOS Call integration

And you will get many missed calls when phone locked :/

navid-zamani commented 2 years ago

May I make an educated guess, that Telegram doesn’t use Google’s push service and hence has to go and stay online a lot more?

And no, it’s still not acceptable in 8.6.2.0.

I can prevent it, by setting the energy options for the app to ”manual“ and ”never“ for all sub-settings, and then force-terminating the app. That way it won’t be started again. With Telegram started even once, it results in 40-50% instead of 70-80% battery at the end of a normal day!! Of course with it being disabled like that, I won’t get any messages. unless I actively open it, and wait for it to sync. But then I have to remember to stop it again afterwards, or I will be angry at the end of the day whe i notice I have to recharge again.


That is the reason, Signal uses Google’s push service (GMS) anyway. Of course they found a way to use push but still stay anonymous, leak no info, and in the newer versions also don’t allow creating social graphs from metadata. (Essentially, anonymous tokens are sent from Signal’s servers to GMS, GMS notifies the recipient, and then the recipient can get the actual metadata and message from the Signal servers. Which is not how GMS was meant to be used, but fuck Google. :) I wonder why Telegram doesn’t implement/copy such stuff from Signal. It’s open source, and high-quality code from actual security researchers. Even WhatsApp copied stuff from Signal. (Of course, with WA, the actual app is not trustworthy to begin with, so a secure channel between the app installs is not any more secure at all but simply more monopolization/lock-in. ;)

NickSun commented 2 years ago

iOS 12.5.5, the same issue. Telegram just kills the battery

patkepa commented 1 year ago

iOS 16.0.1 and Telegram still drains the majority of battery on my device, even though the background refresh is off.

navid-zamani commented 1 year ago

My current workaround is, to always go to the app properties after using Telegram, and stop it from there. (In the app switcher, I tap and hold on the app icon, to get there quickly, without going to the system settings.) I also have auto-starting, background-running and getting started by other apps disabled in the (Huawei) energy settings, so it can’t start “by itself”. I have verified that that works. My battery doesn’t drain anymore, unless I forget to stop it after using it. But I only check it once every other day, since I only subscribe to groups that post about once a week, so that might no be useful to you. Telegram is not secure anyway. Normal chats are not end-to-end encrypted, and it’s not open source, which is a killer criterion. It’s only good as a social media platform. For actual privacy, I use Signal, where I can actually verify the security myself. So if you’re using it for security, another workaround would be to switch too.

MiloLug commented 1 year ago

Looking at the problem now, and from what I can see (it is still present since years...), maybe I should consider a replacement. I just left my phone with Telegram opened for this night and it has consumed almost 10% on its own.

Android 12, Nothing OS

shatulsky commented 1 year ago

Samsung s22 ultra Latest telegram veesion Telegram background consumption is always the top 1 battery consumer. Screenshot_20221219_221009_Device care Screenshot_20221219_221016_Device care

navid-zamani commented 1 year ago

Guys, this will never change,

as long as Telegram doesn’t use a double ratchet mechanism and the phone’s built-in push service!

Because your phone’s push service already is the number one battery drainer. That fact is just hidden by the OS.
And since Telegram doesn’t want to use those (e.g. Google’s Play Services/GMS, or Huawei’s HMS Core), it has to run its own. Which of course takes a lot of battery, as there is no such thing as push services on modern smartphones. It’s all just polling internally. This faxt can not magically be changed.

Of course, Signal managed to use GMS without actually revealing anything but the recipient. (Not the sender, not any metadata, nor the contents, as it only sends a token to use to check Signal’s own servers, so GMS only acts as a wakeup trigger and nothing more.)
But also of course, strictly, with that setup, Google can still see people receiving (meaningless) Signal tokens at specific timestamps. Which is probably Telegram’s reason not to use them.

But in the end, it is your choice:
Do you find battery usage OK, if it is to avoid using GMS: Use Telegram. Do you want to save battery, and find GMS tokens acceptable: Use Signal. Do you want to avoid GMS, and save battery: Get an open phone with your own OS! (E.g. a Fairphone with LineageOS.) Then you can have your own push services, and have a modified Telegram use those, and only use battery once!

But frankly, given that Telegram isn’t open source and isn’t even end-to-end encrypting by default, and E2E is IMHO quite the hassle to use with it, I don’t think using a push service can make it any less secure than it already is anyway. ;)

sicaboy commented 1 year ago

Because the background battery consumption is higher than that of almost all apps on the market. I just guess that they are deliberately shelving this problem, and dare to guess that the reason may be that it has to stay awake to do some "tasks" in the background. Just a guess. I didn't look at the code.

cypok commented 1 year ago

iPhone mini with Telegram dies in less than 16 hours. Please make an option to limit background activity sacrificing instant notifications about new messages.

buzzdev commented 1 year ago

iOS 16.5, iPhone 13 Pro. Telegram drains battery overnight without using the phone. Are the developers ignoring it? Just leave them bad review in the AppStore, as i just did.

telegram-cloud-photo-size-4-5794018128093624951-y

dionisvl commented 1 year ago

same issue

kuznetsss commented 1 year ago

Yesterday evening I turned off location access for telegram app and it solved the issue for me. This night I had no background activity for telegram. Also long time ago I turned off background app refresh in settings and background updates in telegram settings.

Casuallynoted commented 1 year ago

Y’all this issue is four years old. Telegram has made it very clear they do not give a shit.

Casuallynoted commented 1 year ago

Guys, this will never change,

as long as Telegram doesn’t use a double ratchet mechanism and the phone’s built-in push service!

Because your phone’s push service already is the number one battery drainer. That fact is just hidden by the OS.

And since Telegram doesn’t want to use those (e.g. Google’s Play Services/GMS, or Huawei’s HMS Core), it has to run its own. Which of course takes a lot of battery, as there is no such thing as push services on modern smartphones. It’s all just polling internally.

This faxt can not magically be changed.

Of course, Signal managed to use GMS without actually revealing anything but the recipient. (Not the sender, not any metadata, nor the contents, as it only sends a token to use to check Signal’s own servers, so GMS only acts as a wakeup trigger and nothing more.)

But also of course, strictly, with that setup, Google can still see people receiving (meaningless) Signal tokens at specific timestamps. Which is probably Telegram’s reason not to use them.

But in the end, it is your choice:

Do you find battery usage OK, if it is to avoid using GMS: Use Telegram.

Do you want to save battery, and find GMS tokens acceptable: Use Signal.

Do you want to avoid GMS, and save battery: Get an open phone with your own OS! (E.g. a Fairphone with LineageOS.) Then you can have your own push services, and have a modified Telegram use those, and only use battery once!

But frankly, given that Telegram isn’t open source and isn’t even end-to-end encrypting by default, and E2E is IMHO quite the hassle to use with it, I don’t think using a push service can make it any less secure than it already is anyway. ;)

Also this is the GitHub repo for the iOS version of Telegram.

k1zn commented 10 months ago

still on 26 oct 2023

qinyuhang commented 9 months ago

I have the same situation here. Now 28th November 2023.

MaciejK2 commented 6 months ago

still on 10 feb 2024, iphone 13 ios 17.2.1. forgot to turn off app for night, was in background without notifications, this is the only app that was in background at the night (except for 3% random siri between 3:00 and 4:00 xd) it isnt even funny

its a shame that communicator this good needs to be used without notifications and always closed after use (even when im just using it drains battery asf). someone needs to see if any fix is possible, with custom version of telegram app (could be installed with trollstore or altstore), because people that created this surely dont care.

xybl3 commented 3 months ago

Well, as 01 june 24 the issue is still present. Both on iPhone XS and iPhone XR. Also on android version issue is still there.

Really it is just frustrating, phone battery drains very fast also it overheats so much it is pain to hold the phone.

please fix that ASAP...

changheluor007 commented 1 week ago

I also encountered the same problem, iPhone 13pro, the battery consumption is very fast, and the background permissions are often resident. I have turned on the power saving method that comes with Telegram, and turned on the background application refresh that comes with iPhone 13 pro, but it still doesn't work. The battery is drained very quickly. I can't stand it anymore and want to uninstall it