Debian Codegraph @

plyer/platforms/android/sms.py

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