1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
# Plyer
Plyer is a platform-independent api to use features commonly found on various
platforms, notably mobile ones, in Python.
[](https://coveralls.io/r/kivy/plyer?branch=master)
[](#backers)
[](#sponsors)




## How plyer works?
Plyer tries not to reinvent the wheel, and will call for external libraries to
implement the api in the easiest way, depending on the current platform.
- On Android(python-for-android), pyjnius is used
- On iOS(kivy-ios), pyobjus is used
- On windows/mac/linux, commonly found libraries and programs will be used
## Supported APIs
| Platform | Android | iOS | Windows | OS X | Linux |
| ------------------------------ | ------- | --- | ------- | ---- | ----- |
| Accelerometer | ✔ | ✔ | | ✔ | ✔ |
| Audio recording | ✔ | | ✔ | ✔ | |
| Barometer | ✔ | ✔ | | | |
| Battery | ✔ | ✔ | ✔ | ✔ | ✔ |
| Bluetooth | ✔ | | | ✔ | |
| Brightness | ✔ | ✔ | | | ✔ |
| Call | ✔ | ✔ | | | |
| Camera (taking picture) | ✔ | ✔ | | | |
| Compass | ✔ | ✔ | | | |
| CPU count | | | ✔ | ✔ | ✔ |
| Devicename | ✔ | | ✔ | ✔ | ✔ |
| Email (open mail client) | ✔ | ✔ | ✔ | ✔ | ✔ |
| Flash | ✔ | ✔ | | | |
| GPS | ✔ | ✔ | | | |
| Gravity | ✔ | ✔ | | | |
| Gyroscope | ✔ | ✔ | | | |
| Humidity | ✔ | | | | |
| IR Blaster | ✔ | | | | |
| Keystore | ✔ | ✔ | ✔ | ✔ | ✔ |
| Light | ✔ | | | | |
| Native file chooser | ✔ | ✔ | ✔ | ✔ | ✔ |
| Notifications | ✔ | | ✔ | ✔ | ✔ |
| Orientation | ✔ | | | | ✔ |
| Proximity | ✔ | | | | |
| Screenshot | | | ✔ | ✔ | ✔ |
| SMS (send messages) | ✔ | ✔ | | | |
| Spatial Orientation | ✔ | ✔ | | | |
| Speech to text | ✔ | | | | |
| Storage Path | ✔ | ✔ | ✔ | ✔ | ✔ |
| Temperature | ✔ | | | | |
| Text to speech | ✔ | ✔ | ✔ | ✔ | ✔ |
| Unique ID | ✔ | ✔ | ✔ | ✔ | ✔ |
| Vibrator | ✔ | ✔ | | | |
| Wifi | | | ✔ | ✔ | ✔ |
## Installation
To use on desktop: `pip install plyer`
To use in python-for-android/kivy-ios: add `plyer` to your requirements if needed.
## Support
If you need assistance, you can ask for help on our mailing list:
* User Group : https://groups.google.com/group/kivy-users
* Email : kivy-users@googlegroups.com
Discord channel:
* Server : https://chat.kivy.org
* Channel : #dev
## Contributing
We love pull requests and discussing novel ideas. Check out our
[contribution guide](http://kivy.org/docs/contribute.html) and
feel free to improve Plyer.
The following mailing list and IRC channel are used exclusively for
discussions about developing the Kivy framework and its sister projects:
* Dev Group : https://groups.google.com/group/kivy-dev
* Email : kivy-dev@googlegroups.com
IRC channel:
* Server : irc.freenode.net
* Port : 6667, 6697 (SSL only)
* Channel : #kivy-dev
## License
Plyer is released under the terms of the MIT License. Please refer to the
LICENSE file.
## Contributors
This project exists thanks to all the people who contribute. [[Contribute](http://kivy.org/docs/contribute.html)].
<a href="https://github.com/kivy/plyer/graphs/contributors"><img src="https://contrib.rocks/image?repo=kivy/plyer"/></a>
## Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/kivy#backer)]
<a href="https://opencollective.com/kivy#backers" target="_blank"><img src="https://opencollective.com/kivy/backers.svg?width=890"></a>
## Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/kivy#sponsor)]
<a href="https://opencollective.com/kivy/sponsor/0/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/1/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/2/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/3/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/4/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/5/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/6/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/7/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/8/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/9/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/9/avatar.svg"></a>
|