blob: 8650968cf18e20caf1c150a4f888c36608a52f0b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
'''
Android SMS
-----------
'''
from jnius import autoclass
from plyer.facades import Sms
SmsManager = autoclass('android.telephony.SmsManager')
class AndroidSms(Sms):
def _send(self, **kwargs):
sms = SmsManager.getDefault()
recipient = kwargs.get('recipient')
message = kwargs.get('message')
if sms:
sms.sendTextMessage(recipient, None, message, None, None)
def instance():
return AndroidSms()
|