Commit graph libervia-backend/sat/plugins/plugin_misc_android.py
Author SHA1 Message Date
Goffi
120289f08f plugin android: attach an action dict to notification:
instead of calling plyer's generic notify, AndroidNotification is now inherited to add a
SàT specific behaviour: a "sat_action" dictionary is now attached, to indicate to the
frontend what to do when the notification is opened.
2020-02-03 13:49:45 +01:00
Goffi
e1a44cf4e4 fixed shebangs 2020-01-29 10:07:00 +01:00
Goffi
a39349fe64 dates update 2020-01-29 09:50:54 +01:00
Goffi
c951c67698 plugin android: reconnect profiles with autoconnect if network is activated:
if network is activated, we check that all profiles with autoconnect are indeed connected,
and reconnect them if necesssary.
2020-01-26 18:08:09 +01:00
Goffi
a485709173 plugin android: added a profileAutoconnectGet method:
this method will be called by frontend to know which profile to connect automatically
(when the frontend has been closed and is reopened, this will avoid to have to go through
the profileManager again).
2020-01-25 21:08:41 +01:00
Goffi
2555649dfb plugin android: sound notification + change settings:
- new notification sound
- vibration and notification sound are now activated depending on ringer mode (normal,
  vibrate or silent)
- notification sound/vibration can be configured in settings.
2020-01-03 13:21:27 +01:00
Goffi
3e07cd6c01 plugin android: removed comment on vibrator bug as it is fixed in dev version of plyer 2019-12-20 12:28:04 +01:00
Goffi
5bfb675a29 plugin android: fixed encoding in states after Python 3 port 2019-10-16 08:39:52 +02:00
Goffi
fbfe96c505 Python 3 port:
/!\ this is a huge commit
/!\ starting from this commit, SàT is needs Python 3.6+
/!\ SàT maybe be instable or some feature may not work anymore, this will improve with time

This patch port backend, bridge and frontends to Python 3.

Roughly this has been done this way:

- 2to3 tools has been applied (with python 3.7)
- all references to python2 have been replaced with python3 (notably shebangs)
- fixed files not handled by 2to3 (notably the shell script)
- several manual fixes
- fixed issues reported by Python 3 that where not handled in Python 2
- replaced "async" with "async_" when needed (it's a reserved word from Python 3.7)
- replaced zope's "implements" with @implementer decorator
- temporary hack to handle data pickled in database, as str or bytes may be returned,
  to be checked later
- fixed hash comparison for password
- removed some code which is not needed anymore with Python 3
- deactivated some code which needs to be checked (notably certificate validation)
- tested with jp, fixed reported issues until some basic commands worked
- ported Primitivus (after porting dependencies like urwid satext)
- more manual fixes
2019-08-13 19:08:41 +02:00
Goffi
303f82d012 plugin android: catch and log exception when using the vibrator:
vibrator is currently not working with plyer, this patch avoid a crash and log the issue.

rel 332
2019-07-20 20:53:52 +02:00
Goffi
30bf1362bb plugin android: check connectivity
use Android API to retrieve connectivity informations (connection availability + kind of connection).
Register to connectivity change broadcast, new client.networkEnabled/client.networkDisabled are called when suitable.
2019-04-06 19:05:58 +02:00
Goffi
7faaa9691b plugin android: fixed csi_timer reset in setActive + crash on call of isActive before session initialisation 2019-04-05 21:22:03 +02:00
Goffi
598f4e465e plugin android: use XEP-0352 to indicate (in)active state:
Client State Indication plugin is used to set state when pause/resume is called.
The state is changed on pause only after a delay (currently 30s), to avoid changing state if use is only checking something quickly on an other app.
2019-03-25 07:08:26 +01:00
Goffi
d58fbe6170 plugin android: workaround to seek() bug, fixing file upload:
seek() is bugged on current version of P4A, arguments are inverted.
More details can be found at https://github.com/kivy/python-for-android/issues/1768
2019-03-25 07:06:41 +01:00
Goffi
8ce1861529 plugin android: don't send notification if message comes from ourself (from an other device) 2019-03-16 14:39:02 +01:00
Goffi
248d771176 plugin android: improved state handling:
state handling is not using mmap anymore but an unix socket instead.
State change can now be managed.
Bridge signals are disabled when frontend is paused.
2019-03-09 16:23:01 +01:00
Goffi
8e338bf913 date update 2019-01-12 12:25:31 +01:00
Goffi
e3f279e718 plugin android: fixed path for .cagou_status 2019-01-04 19:12:43 +01:00
Goffi
744cb0c503 code style reformatting using black 2018-06-27 20:14:46 +02:00
Goffi
80ef13612b core, setup: huge cleaning:
- moved directories from src and frontends/src to sat and sat_frontends, which is the recommanded naming convention
- move twisted directory to root
- removed all hacks from setup.py, and added missing dependencies, it is now clean
- use https URL for website in setup.py
- removed "Environment :: X11 Applications :: GTK", as wix is deprecated and removed
- renamed sat.sh to sat and fixed its installation
- added python_requires to specify Python version needed
- replaced glib2reactor which use deprecated code by gtk3reactor

sat can now be installed directly from virtualenv without using --system-site-packages anymore \o/
2018-04-02 19:44:50 +02:00
Renamed from src/plugins/plugin_misc_android.py (Browse further)