Tencent-RTC / Tencent-RTC/TUICallKit

[iOS] Call duration timer pauses after app enters background

Open
#495 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
249
Forks
170
PR merge metrics
No merged PRs in 30d

Description

Environment

  • Plugin: tencent_calls_uikit
  • Current version: 4.1.1
  • Also reproduced in: atomic_x_core 4.1.0
  • iOS device: [please fill in, e.g. iPhone 15 Pro]
  • iOS version: [please fill in]
  • Flutter version: [please fill in]
  • Dart version: [please fill in]

Description

The call duration displayed in the built-in TUICallKit UI stops updating after the app enters the background on iOS.

The call itself remains active and the audio/video connection continues normally. However, after returning to the foreground, the duration remains at the value shown before entering the background and does not include the time spent in the background.

Steps to Reproduce

  1. Start or accept a one-to-one audio/video call.
  2. Wait until the call duration timer is visible.
  3. Put the app into the background by pressing the Home button or locking the device.
  4. Keep the call active for a while.
  5. Return to the app.

Actual Behavior

The call duration timer pauses when the app enters the background and does not reflect the elapsed background time after returning to the foreground.

Expected Behavior

The call duration should continue based on the actual call start time, including the time while the app is in the background.

Technical Details

The issue appears to be related to the duration implementation in atomic_x_core, which currently increments the duration using a Dart periodic timer:

Timer.periodic(const Duration(seconds: 1), (timer) {
  _duration += 1;
});

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the duration implementation in atomic_x_core and inspect the Dart Timer.periodic logic described in the issue. Verify the timer's behavior when the app backgrounds, then confirm that the displayed duration includes time since the call started after returning to the foreground.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter, ios
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.