SUMMARY Ring and photo not working in kdeconnect app when app is in background on Android 10. This isn't related to issue 392853 or 368438 however if you haven't saw. There are people reporting on issue 368438 including myself about now having that issue again in android 10. I am however opening a new bug report because the cause is most likely different. STEPS TO REPRODUCE 1. Try to ring or launch camera on phone without having kdeconnect app in focus. 2. Observe nothing happening or it will launch once and then every subsequent call will never launch. OBSERVED RESULT Nothing happens EXPECTED RESULT Phone rings or camera launches. SOFTWARE/OS VERSIONS Asus q325ua Ubuntu 19.10 Android 10 One plus 7 pro Using GSConnect but problem is not with gsconnect Kdeconnect version 1.13.2 as reported by google play store. ADDITIONAL INFORMATION Bug report I filed with gsconnect as well as with tons of debugging information from the app as well as, as much info as I could extract from an android bug report. https://github.com/andyholmes/gnome-shell-extension-gsconnect/issues/692 Relevant quote from andy over at gsconnect regarding what was found: "There are a few warnings in there about deprecated MediaPlayer use, but it looks to me like this could be the culprit. It's possible that the "intent" which should present the activity might not be working, which is preventing the activity from launching correctly."
I took a shot at reworking FindMyPhoneActivity to make use of newer Android APIs (on newer Android devices). The code should be considered a rough draft as it almost certainly needs additional polish, but it at least compiles and runs fine on Android 7 (which doesn't support those newer APIs, which makes it a poor test, but it's the best I can do). The code's in a branch on my GitHub fork of kdeconnect-android: https://github.com/ferdnyc/kdeconnect-android/tree/findmyphone-api-refresh I also created a PR in the KDE GitHub mirror (which was of course auto-closed, but I just wanted to get the code up somewhere): https://github.com/KDE/kdeconnect-android/pull/16 The text of that PR follows. ============================================================================ This is an update to the FindMyPhone plugin, attempting to make use of newer APIs to more correctly manage audio playback on newer Android releases. Highlights: KDE Connect-wide ---------------- * Raise minSdkVersion from 14 to 21 (To access more recent APIs w/o lots of legacy fallback.) * Add WAKE_LOCK to permissions requested in manifest file. FindMyPhoneActivity ------------------- * Use AudioAttributes to replace deprecated SetAudioStreamType() * Request & manage audio focus, on Android 26+ * Prevent screen / CPU sleep during playback (using WAKE_LOCK) * Prepare MediaPlayer asynchronously, and release() when done I'll be honest, I wrote this code working off of API docs and code samples, but I'm not supremely confident that it's all correct. It compiles with no problems, and I built and installed it as an APK on my Android 7 phone, where it worked just the same as the version installed from Google Play. However, running on Android 7 means that most of the newer APIs (including Audio Focus) aren't accessed, and I don't have a newer device to test on. (Trying to run the app in an emulator failed, network-connectivity wise... I ended up with GSConnect trying to pair with itself.) So, I'm submitting this in case it might be useful, but I would be surprised if it doesn't need at least some cleanup. It certainly needs testing on newer devices, something I'm unable to do myself.
can confirm with a pixel2-xl on android 10 It used to work with the same phone on android 8 and 9
Android 10 thing.