Ok, there are a few prerequisites. - The user must have a custom ringtone. - There are possibly more that I don't know about. When the ringtone is a user defined ringtone, after one iteration, KDE Connect stops playing the ringtone. I tested with a custom ringtone, and it didn't loop. When I reverted back to the default 'Over the Horizon' (which sounds pretty good!) the sound looped. I had this problem when I was coding this thing called theLink for Android, I fixed this issue by creating an object of type MediaPlayer, setting the Data Source to the URI of the default ringtone, setting the Looping property to true and starting it. When the activity was destroyed, I would stop the media player. MediaPlayer mp = new MediaPlayer(); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); mp.setDataSource(getApplicationContext(), RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE)); mp.setLooping(true); mp.prepare(); mp.start();
https://cgit.kde.org/kdeconnect-android.git/commit/?id=c05f13afac3eaefa1759fb3c074dd9d8d7f38a95