6
from jnius import autoclass
7
from plyer.facades import Call
8
from plyer.platforms.android import activity
10
Intent = autoclass('android.content.Intent')
11
uri = autoclass('android.net.Uri')
14
class AndroidCall(Call):
16
def _makecall(self, **kwargs):
18
intent = Intent(Intent.ACTION_CALL)
19
tel = kwargs.get('tel')
20
intent.setData(uri.parse("tel:{}".format(tel)))
21
activity.startActivity(intent)
23
def _dialcall(self, **kwargs):
24
intent_ = Intent(Intent.ACTION_DIAL)
25
activity.startActivity(intent_)