-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android 10/Q] Ring isn't working #692
Comments
Hmm, not sure what to say here. It looks like GSConnect is doing everything correctly and this is the simplest plugin there is. I guess the easiest thing to start with is double checking that the plugin is enabled on your phone (probably it is), and try force stopping the app and reopening it. If that doesn't work, we'll have to try using |
@andyholmes I am also having problems with this. Made sure the plugin is enabled on both devices. Perhaps it is an android 10 issue. Both the ring and photo options work when you are in the kdeconnect app on your phone. However, they don't work if you exit out of the app on your phone and try to use those features from your pc. Maybe another change by Google? |
Mm, it's quite conceivable that Android locked the permissions down so they apply only to foreground processes. Any "find my phone" type app I've ever had always had to be configured as a Device Administrator (in the Security settings) in order to perform its function, which is something I notice KDE Connect doesn't ask for (at least on Android 7). The only permission it requests in the 'security' category is the ability to read text messages. ...Actually, looking at the full KDE Connect permissions list on my phone, I can't figure out how it's actually able to activate the ringer at all. It only requests two Phone permissions:
While it does also ask for "control vibration", that's the ONLY permission it requests that would seem to involve any sort of noise-making ability at all. So, maybe Android 10 just finally started requiring some sort of permission for apps (or at least background apps) that want to be able to activate the ringer. And AFAICT... KDE Connect may not have it? Probably worth bringing up with the KDE Connect developers at https://bugs.kde.org/enter_bug.cgi?product=kdeconnect if it hasn't already been reported. (Even better if someone were able to confirm whether or not the same issues occur when using the official Linux |
Just wanted to post that their is a current bug report on this issue and here is the link if anyone else wants to chime in. |
I don't think there are any extra permissions required for this, because KDE Connect doesn't actually "ring" the phone, it just uses an intent to open a window and @Override
public boolean onPacketReceived(NetworkPacket np) {
Intent intent = new Intent(context, FindMyPhoneActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
return true;
} mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource(this, ringtone);
mediaPlayer.setAudioStreamType(AudioManager.STREAM_ALARM);
mediaPlayer.setLooping(true);
mediaPlayer.prepare();
mediaPlayer.start(); It would probably help if someone experiencing this problem can debug the Android app, while activating the feature: $ adb logcat --pid=$(adb shell pidof -s org.kde.kdeconnect_tp) |
@andyholmes I'll try debugging it later today when I get some time. |
Huh! Sneaky. And clever. ...Still, that makes it auto-playing media being launched from a background task. Kind of feels like there should be some sort of permission required, to me. |
@andyholmes Finally got around to doing a quick debug.
|
@andyholmes Here is another one after going back and forth having kdeconnect in foreground and background.
|
@andyholmes Last one from logcat
|
@andyholmes After further testing here is what I found If I share a file from my phone to my computer, I can then ring my phone as many times as I want as long as I don't let the screen turn off or use nay other app. |
@andyholmes Here is a bunch of stuff pertaining to kdeconnect from a bug report I generated from within android developer settings. This is in reverse order from my clipboard manager.
|
Just formatted some of your comments :) Looking through them now. |
Alight thanks I was just copying and pasting. I have no idea how formatting works on here. |
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. In any case, I think it's fair to say this is an issue in If you add a link to this bug in that one, and post the new bug here, then we can track them both in parallel. |
Alright, will do. |
Looks like you're going to be the Android 10 canary for this cycle 😉 |
Cool, and here is that bug report url: |
I was looking at the Soooo, I kind of took a shot at rewriting it. As I wrote in my GitHub PR (which was insta-closed because the KDE mirror there doesn't accept PRs, which is fine as I just wanted to get the code posted somewhere...)
That APK I built from the code is here on Google Drive, if anyone is brave/foolish enough to download an unsigned APK from an unknown source and install it on their device. (I wouldn't personally recommend it, unless you have a sacrificial device that you don't rely on as your primary means of mobile communication. Of course, I ignored that advice and installed it on mine anyway...) In my experience, you have to first unpair the device and uninstall the official KDE Connect app, then install the new APK and re-pair. If you don't uninstall KDE Connect the APK will fail to install because they use the same identifier, and if you don't unpair and repair you'll get nothing but "AuthenticationError" messages when the device tries to communicate using the pairing credentials from the previous KDE Connect version. |
Your PR looks mostly good to me, although I don't have an Android 10 phone either and my laptop can barely lift Android Studio :P You should submit your PR to invent.kde.org where someone might be able to test it. They follow the standard fork, branch, merge approach. |
Done. (With a little extra cleanup, in looking at it again I let Android Studio talk me into some pretty sloppy code.) |
Is this one still valid, or did the upstream patch fix it? |
In my opinion it's fixed |
@andyholmes Yes it is fixed. |
Describe the bug
the ring function isn't working
Steps To Reproduce:
· Click on "Ring" on the menu
OR
· select your device from the window, open the overflow menu, click on "Ring" there too
Expected behavior
the phone shows the FOUND screen and rings
Support Log
System Details (please complete the following information):
The text was updated successfully, but these errors were encountered: