mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 05:37:43 +00:00
Fixing sent SMS not appearing in the SMS app on old phones
BUG: 368069
This commit is contained in:
parent
23648a03e5
commit
40c9b67033
@ -24,6 +24,7 @@
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_SMS" android:required="false" />
|
||||
<uses-permission android:name="android.permission.SEND_SMS" android:required="false" />
|
||||
<uses-permission android:name="android.permission.WRITE_SMS" android:required="false" />
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
@ -20,6 +20,9 @@
|
||||
|
||||
package org.kde.kdeconnect.Plugins.TelepathyPlugin;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.net.Uri;
|
||||
import android.provider.Telephony;
|
||||
import android.telephony.SmsManager;
|
||||
import android.util.Log;
|
||||
|
||||
@ -73,6 +76,11 @@ public class TelepathyPlugin extends Plugin {
|
||||
// properly handles that case
|
||||
smsManager.sendMultipartTextMessage(phoneNo, null, parts, null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
values.put("address", phoneNo);
|
||||
values.put("body", sms);
|
||||
context.getContentResolver().insert(Uri.parse("content://sms/sent"), values);
|
||||
|
||||
//TODO: Notify other end
|
||||
} catch (Exception e) {
|
||||
//TODO: Notify other end
|
||||
|
Loading…
x
Reference in New Issue
Block a user