krs
krs

Reputation: 599

How to prevent ANR when showing full-screen progress

We have an app where at synchronization we are showing full-screen progress. On that screen there is an animated icon and description what is synchronized. Synchronization can take minutes.

When the user randomly taps on the full-screen progress, application gets ANR message despite app is not frozen and progress is updated correctly.

Is there any way how to prevent ANR when showing full-screen progress?

Note: For the user, there is no possibility to use the while synchronizing data as user can create a new data in the app and cause data integrity failure.

EDIT: The logs show:

[split_config.arm64_v8a.apk!libe_sqlite3.so] sqlite3_exec
Input dispatching timed out

[split_config.arm64_v8a.apk!libe_sqlite3.so] sqlite3_step
Input dispatching timed out

Native method - android.os.MessageQueue.nativePollOnce
Input dispatching timed out

It is true that we are using EntityFramework with SQLite 2.2.6 and we are stuck with this as this is the latest supported by .NET Standard 2.0

Upvotes: 0

Views: 86

Answers (1)

岳剑钟
岳剑钟

Reputation: 1

When you are synchronizing, the synchronization operation should not be in the UI thread, notify the UI thread of the progress, and display the current progress. At this time, your UI thread is not blocked and will not cause ANR.

Upvotes: 0

Related Questions