GCX-HCI / tray

a SharedPreferences replacement for Android with multiprocess support
Apache License 2.0
2.29k stars 273 forks source link

ANR that leads to app crashing, support needed #142

Open Duna opened 3 years ago

Duna commented 3 years ago

Screenshot_20200927-185251_Play Console

See attached picture, is self explanatory

The main issue is when update and migrate your data from one app version to next one with versioned Preferences and a onUpgrade() method - onUpgrade took more than 5 seconds and the foreground service crashes since startForeground() not reached within the 5 seconds.

Duna commented 3 years ago

Is it ok to initialize Tray on separate thread(when onUpdate is called)?

What happens if I read/write data on main thread, and the initialization(onUpdate) not reaches the end, done on the separate thread, different than main looper.

Is it a way to avoid ouUpdate when having new release of the app on the market?