plyer icon indicating copy to clipboard operation
plyer copied to clipboard

AndroidCamera fix ambiguity

Open michaelu123 opened this issue 4 years ago • 0 comments

I had a hard time finding out why I got an "PythonActivity has no unbind attribute" error. In plyer/platforms/android/camera.py there are these two lines:

import android.activity
from plyer.platforms.android import activity

I.e. activity is a module name and the name of a PythonActivity instance. These should be changed to e.g.

import android.activity as activity1
from plyer.platforms.android import activity as activity2

and then call activity1.bind/unbind and activity2.getApplication/startActivityForResult.

michaelu123 avatar Apr 27 '20 05:04 michaelu123