nextcloud / nextcloud/android

Widget data not updated on Android 16

Open
#14,998 2 comments 0 reactions 0 assignees View on GitHub
0. Needs triage bug
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### ⚠️ Before posting ⚠️

- [x] This is a **bug**, not a question or an enhancement.
- [x] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [x] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).

### Steps to reproduce

I upgraded my Pixel 6 to Android 16 and found that several widgets I use no longer display updates - and one of them is the nextcloud widget.

( I did already dig into it in sources of a different app - hence I only leave the identified root cause here... )

Google has deprecated setRemoteAdapter (int viewId, intent) in API level 35 (Android 15) and obviously also removed the compatibility in Android 16.

See https://developer.android.com/reference/android/widget/RemoteViews#setRemoteAdapter(int,%20android.content.Intent)

This is still used in https://github.com/nextcloud/android/blob/master/app/src/main/java/com/nextcloud/client/widget/DashboardWidgetUpdater.kt#L58

The proposed official solution is to use RemoteViews.RemoteCollectionItems (see original link).

A smokle check with other / older android devices reveals that everything still works fine there - I checked with versions 13 and 14.

### Expected behaviour

After adding a widget to the home screen it should display the corresponding data.

### Actual behaviour

After adding a widget to the home screen it does not shaw data - instead it displays the initial empty state with "No Items".

### Android version

16

### Device brand and model

Google Pixel 6

### Stock or custom OS?

Stock

### Nextcloud android app version

3.31.4

### Nextcloud server version

30.0.8

### Using a reverse proxy?

Yes

### Android logs

since I already pointed to the root cause in sources, I did not extract logs again

### Server error logs

```bash

```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.