Plyer installation didn’t work, how to make it?

Asked

Viewed 59 times

-2

I’m trying to make an app that can send a notification to the user on his phone. For this I found the plyer package, so I used the linux commands to do the installation:

`git clone https://github.com/kivy/plyer.git`
 `cd plyer`
 `python setup.py build`
 `sudo pip install -e .`

and within the file . py wrote the following command lines to call the method to send:

`from kivy.app import App 
 from kivy.uix.screenmnager import ScreenManager, Screen
 from plyer import notification      
 class Gerenciador(ScreenManager):
      pass
 class Tela(Screen):
     def notify(self, *args):
           notification.notify(title="Notificação",message="Mensagem enviada"
 class app(App):
      def build(self):
            return Gerenciador()
 if __name__ == '__main__':
      app().run()`

In this case I used a file. Kv to build a button inside, and set an event for when pressing the button it calls the notify() method of the root widget. So far so good, I can run on the computer within the virtual environment and everything, but when I step to the mobile the app does not even open. Thanks for your help!!

1 answer

0

You came to look at the file setup py.? it has written that:

For Android install additional dependency PyJNIus::
    pip install https://github.com/kivy/pyjnius/zipball/master

I don’t know if it solves your problem, but take a look and try to install this dependency.

  • I confess that I did not look, I did the installation and put it in the requirements, but still it wasn’t, buildozer compiles, and I can even do the installation, only when opening and running the app it doesn’t happen.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.