Example:
from plyer import tts
tts.speak('text')
Note
This will work only on versions before android 6.0 .
For android 6.0 + the coder needs to explictly ask permissions.
Here is an example of the usage of gps:
from plyer import gps
coordinate = 0
def print_locations(**kwargs):
global coordinate
coordinate = kwargs
gps.configure(on_location=print_locations)
gps.start()
# later
print coordinate
gps.stop()
Example:
from plyer import notification
notication.notify('Text')
Example:
from plyer import sms
sms.send(recipient=self.sms_recipient, message=self.sms_message)
Example:
from plyer import uniqueid
uniqueid.id
Example:
from plyer import vibrator
vibrator.vibrate(10)
Example:
from plyer import compass
compass.enable()
compass.orientation
compass.disable()
Example:
from plyer import flash
flash.on()
flash.off()
Example:
from plyer import camera
camera.take_picture
Example:
from plyer import email
email.send(recipient='abc@gmail.com', subject='Message')
Example:
from plyer import call
call.makecall('9013159973')
Example:
from plyer import accelerometer
accelerometer.enable()
accelerometer.acceleration
Example:
from plyer import battery
battery.status
Example:
from plyer import gyroscope
gyroscope.enable()
gyroscope.orientation
gyroscope.disable()
Example:
from plyer import orientation
orientation.set_landscape()
orientation.set_portrait()
Example:
from plyer import audio
Example:
from plyer import irblaster