mirror of
https://github.com/markqvist/Sideband.git
synced 2025-09-25 19:00:53 -04:00
Included local plyer
This commit is contained in:
parent
25f0d52260
commit
f23855fb68
166 changed files with 15862 additions and 0 deletions
25
sbapp/plyer/platforms/android/sms.py
Normal file
25
sbapp/plyer/platforms/android/sms.py
Normal file
|
@ -0,0 +1,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()
|
Loading…
Add table
Add a link
Reference in a new issue