nextcloud / nextcloud/notes-android

Crash when using the "New Note" quick settings tile: `UnsupportedOperationException: startActivityAndCollapse: Starting activity from TileService using an Intent is not allowed`

Open
#2,125 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug
Dominant language
Java
Stars
1.1k
Forks
168
Avg merge
1d 17h
Merged PRs (30d)
31

Description

This issue respects the following points:
Describe the bug
  1. Pull down the shade.
  2. Tap "New Note" tile.
  3. Notes does not open.
  4. After several seconds a crash occurs.
Expected behavior

This always used to go straight to the "New Note" intent.

Notes Android version

4.2.0

Notes server version

4.9.0

Nextcloud Android version

3.28.1

Nextcloud version

28.0.4

Device

ASUS Zenfone 10

Android Version

14

App Store
  • Google Play Store
  • F-Droid
  • Huawei App Gallery
Stacktrace
App Version: 4.2.0
App Version Code: 40020090
App Flavor: play

Files App Version Code: 30280190 (PROD)

---

OS Version: 5.15.94-android13-8-00003-g2ac3c8c88d7f-ab10835385(34.1004.0204.128)
OS API Level: 34
Device: ASUS_AI2302
Manufacturer: asus
Model (and Product): ASUS_AI2302 (WW_AI2302)

---

java.lang.UnsupportedOperationException: startActivityAndCollapse: Starting activity from TileService using an Intent is not allowed.
	at android.service.quicksettings.TileService.startActivityAndCollapse(TileService.java:355)
	at it.niedermann.owncloud.notes.quicksettings.NewNoteTileService.lambda$onClick$0(NewNoteTileService.java:28)
	at it.niedermann.owncloud.notes.quicksettings.NewNoteTileService.$r8$lambda$BH0XsYJVdPGqpiaACS8tJGfTX0c(Unknown Source:0)
	at it.niedermann.owncloud.notes.quicksettings.NewNoteTileService$$ExternalSyntheticLambda0.run(Unknown Source:4)
	at android.service.quicksettings.TileService$H.handleMessage(TileService.java:499)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:245)
	at android.os.Looper.loop(Looper.java:364)
	at android.app.ActivityThread.main(ActivityThread.java:8427)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:977)

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

Start with quicksettings/NewNoteTileService.java at line 28 and the Android API 34 stacktrace, then reproduce the crash by tapping the New Note quick settings tile. Done means the tile opens the New Note screen without crashing on Android 14 while preserving the existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.