rive-app / rive-app/rive-android

Animation gets reset on putting app to background and coming to foreground

Open
#391 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
Kotlin
Stars
538
Forks
66
PR merge metrics
No merged PRs in 30d

Description

Description

I am using rive 10.2.1 in my project wrapped in a composable. But, when I am putting the page to background and coming back, the animation gets reset to zero state. I am using bytearray to set animation.

Expected behavior

Rather, I want it to be in the state where it was

Screenshots

<-- If applicable, add screenshots to help explain your problem. -->

https://github.com/user-attachments/assets/3268e6c3-c813-4180-bf31-8e291f9bf1c8

Device & Versions (please complete the following information)
  • Device: Pixel 4a
  • Android SDK API Level 33

Contributor guide

Open the contributing guide

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

No source file or test is named. Start by reproducing the reset on Android API 33 with Rive 10.2.1, using the composable and bytearray setup described in the issue, then trace background and foreground lifecycle handling. Done means the animation resumes in its prior state instead of returning to zero.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.