~ubuntu-branches/debian/stretch/electrum/stretch

« back to all changes in this revision

Viewing changes to gui/kivy/tools/.buildozer/android/platform/python-for-android/dist/kivy/python-install/lib/python2.7/site-packages/plyer/platforms/android/call.py

  • Committer: Package Import Robot
  • Author(s): Tristan Seligmann
  • Date: 2016-04-04 03:02:39 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20160404030239-0szgkio8yryjv7c9
Tags: 2.6.3-1
* New upstream release.
  - Drop backported install-wizard-connect.patch.
* Add Suggests: python-zbar and update the installation hint to suggest
  apt-get instead of pip (closes: #819517).
* Bump Standards-Version to 3.9.7 (no changes).
* Update Vcs-* links.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'''
 
2
Android Call
 
3
-----------
 
4
'''
 
5
 
 
6
from jnius import autoclass
 
7
from plyer.facades import Call
 
8
from plyer.platforms.android import activity
 
9
 
 
10
Intent = autoclass('android.content.Intent')
 
11
uri = autoclass('android.net.Uri')
 
12
 
 
13
 
 
14
class AndroidCall(Call):
 
15
 
 
16
    def _makecall(self, **kwargs):
 
17
 
 
18
        intent = Intent(Intent.ACTION_CALL)
 
19
        tel = kwargs.get('tel')
 
20
        intent.setData(uri.parse("tel:{}".format(tel)))
 
21
        activity.startActivity(intent)
 
22
 
 
23
    def _dialcall(self, **kwargs):
 
24
        intent_ = Intent(Intent.ACTION_DIAL)
 
25
        activity.startActivity(intent_)
 
26
 
 
27
 
 
28
def instance():
 
29
    return AndroidCall()