klinker41 / android-smsmms

Library for easily sending SMS and MMS for Android devices
678 stars 249 forks source link

I think it needs more permissions when send Audio Files #185

Closed haesungJoo closed 3 years ago

haesungJoo commented 3 years ago

We want to send WAV files using android-smsmms.

but some reasons it doesn't work so, i was try to reach the end-point of the bug.

Transaction.sendMmsThroughSystem which is in Transaction.java class.

At line 3 starts with SendReq sendReq ...

i got

java.lang.SecurityException: getLine1NumberForDisplay: Neither user 10722 nor current process has android.permission.READ_PHONE_STATE, android.permission.READ_SMS, or android.permission.READ_PHONE_NUMBERS

i had READ_SMS permission but ohters are not so, i added ohters and it worked

obviously it is not a Bug

I just wanted to tell who trying to send audio with MMS

try this below

<uses-permission android:name="android.permission.READ_PHONE_STATE"/> <uses-permission android:name="android.permission.READ_PHONE_NUMBERS"/>