1 year ago
#387361
mss051
Make a call with your application in python3 kivy
Hi does anyone know how to make a function to call a phone number using intents in kivy? Thank you in advance.
Here is an attempt of mine to do this exact thing, is it right or do I have to add something else?
from jnius import autoclass
Intent = autoclass('android.content.Intent')
Uri = autoclass('android.net.Uri')
call = None
def call_number(self):
call = self.Intent()
call.setAction(self.Intent.ACTION_CALL)
call.setData(self.Uri.parse("tel:%s" % int(host_number)))
self.startActivity(call)
python
python-3.x
kivy
kivy-language
0 Answers
Your Answer