Androids SystemFileChooser with Kivy
Project description
Android's SystemFileChooser with Kivy
A tool that uses Android's SystemFileChooser to process materials with the set of tools from Kivy.
Buildozer
To include these tools with Buildozer just include androidssystemfilechooser in the requirements.
API
For now it's better if you just read the source/code.
JavaStream(input_stream)
SystemFileChooser(mime_type, multiple)
uri_to_extension(uri)
uri_to_filename(uri)
uri_to_stream(uri)
uri_image_to_texture(uri)
Permissions and Runtime-permissions
You don't have to state anything.
Example code of use
from androidssystemfilechooser import (SystemFileChooser,
uri_image_to_texture,
uri_to_extension,
uri_to_stream)
from kivy.app import App
from kivy.core.image import Image as CoreImage
from kivy.lang import Builder
from kivy.properties import StringProperty
from kivy.uix.button import Button
from kivy.uix.image import Image
KV = '''
BoxLayout:
orientation: 'vertical'
MyTriggerButton:
multiple: True
text: 'Choose and execute results!'
on_release: self.trigger()
'''
class MyTriggerButton(SystemFileChooser, Button):
mime_type = StringProperty('image/*')
def on_uris(self, instance, uris):
for nr, uri in enumerate(uris):
if nr % 2 == 0:
with uri_to_stream(uri) as stream:
image = CoreImage(stream, ext=uri_to_extension(uri))
texture = image.texture
else:
texture = uri_image_to_texture(uri)
instance.parent.add_widget(Image(texture=texture))
self.uris = []
class MyApp(App):
def build(self):
return Builder.load_string(KV)
if __name__ == '__main__':
MyApp().run()
License
MIT-Licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file androidssystemfilechooser-1.7.tar.gz.
File metadata
- Download URL: androidssystemfilechooser-1.7.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52abd443903351548cbce1b0b82c04a2d7cc952e3895211c9c31c96986d849bc
|
|
| MD5 |
64508d48657e46f7b16d47a309073312
|
|
| BLAKE2b-256 |
a22e35f8e549cdb352743404435f6c3e1cebaafdad08d1f48a75265c50cc1e1a
|
Provenance
The following attestation bundles were made for androidssystemfilechooser-1.7.tar.gz:
Publisher:
python-publish.yml on kuzeyron/AndroidsSystemFileChooser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
androidssystemfilechooser-1.7.tar.gz -
Subject digest:
52abd443903351548cbce1b0b82c04a2d7cc952e3895211c9c31c96986d849bc - Sigstore transparency entry: 1849654358
- Sigstore integration time:
-
Permalink:
kuzeyron/AndroidsSystemFileChooser@de82700e9220ca267797126ca07f8634bd6b70d0 -
Branch / Tag:
refs/tags/1.7 - Owner: https://github.com/kuzeyron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@de82700e9220ca267797126ca07f8634bd6b70d0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file androidssystemfilechooser-1.7-py3-none-any.whl.
File metadata
- Download URL: androidssystemfilechooser-1.7-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
588eed5fbe2bd8f94b560104d67dc97c0fe2fada9766d10e91bb52b46397cc98
|
|
| MD5 |
21d746c486a5b8b128d8c2036a7b9290
|
|
| BLAKE2b-256 |
cebbfaaab194cf370879d8d0534ff9729857de5b6f94d4bc228b1e9e51f12a1e
|
Provenance
The following attestation bundles were made for androidssystemfilechooser-1.7-py3-none-any.whl:
Publisher:
python-publish.yml on kuzeyron/AndroidsSystemFileChooser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
androidssystemfilechooser-1.7-py3-none-any.whl -
Subject digest:
588eed5fbe2bd8f94b560104d67dc97c0fe2fada9766d10e91bb52b46397cc98 - Sigstore transparency entry: 1849654436
- Sigstore integration time:
-
Permalink:
kuzeyron/AndroidsSystemFileChooser@de82700e9220ca267797126ca07f8634bd6b70d0 -
Branch / Tag:
refs/tags/1.7 - Owner: https://github.com/kuzeyron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@de82700e9220ca267797126ca07f8634bd6b70d0 -
Trigger Event:
push
-
Statement type: