Skip to content

Is it possible to use pysmb with kivy on android platform? #225

Open
@thmsts88

Description

Hi,
I've been trying to build a android app that connect to a Samba Server and copy into it some files.
Using kivy and buildzer I've been able build the app that succesfully locate all wanted files (using os), and it works fine.
However, as soon as I add reference to pysmb app stop working (as it was missing android permissions)

buildozer.spec
# (list) Application requirements
requirements = python3,kivy,android,pysmb

# (list) Permissions
android.permissions = android.permission.INTERNET, android.permission.WRITE_EXTERNAL_STORAGE, android.permission.READ_EXTERNAL_STORAGE, android.permission.MANAGE_EXTERNAL_STORAGE

main.py
from smb.SMBConnection import SMBConnection
def on_button3_press(self, instance):
try:
conn = SMBConnection(self.username_input.text, self.password_input.text, use_ntlm_v2=True)
conn.connect(self.server_input.text, 139)
self.status_label.text = 'Connected!'
except Exception as e:
self.status_label.text = f'Error: {str(e)}'

I've also made the recipe for buildozer
from pythonforandroid.recipe import PythonRecipe
class PySMBRecipe(PythonRecipe):
version = '1.2.10'
url = 'https://files.pythonhosted.org/packages/source/p/pysmb/pysmb-{version}.tar.gz'
depends = ['python3', 'pyasn1', 'tqdm']
site_packages_name = 'pysmb'
recipe = PySMBRecipe()

Is there any known issues when pysmb is used with kivy on android?

Thanks for the support

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions