Skip to main content

Some Android tools for Kivy developments

Project description

Kvdroid

Some Android tools for Kivy developments

Dependencies

Android min-api21

Requirements

kivy, android, jnius

Installation

pip install kvdroid

Usage

To detect if app is installed from Play Store or not

from kvdroid import app_source
print(app_source)

To get absolute screen size in dp-pixel and detect current orientation

from kvdroid import screen
print(screen.orientation())
print(screen.width_dp())
print(screen.height_px())

To check if device has a data connection both for wifi and cellular

from kvdroid import network_state
print(network_state)

To check if device is in dark mode or not

from kvdroid import dark_mode
print(dark_mode)

To get device's informations Available options 'model','brand','manufacturer','version','sdk','product','base','rom','security','hardware','tags','sdk_int'

from kvdroid import device_info
print(device_info("model"))

To enable immersive mode

from kvdroid import immersive_mode
immersive_mode(True) # default is False

To launch a specific app

from kvdroid import launch_app  
launch_app(<app_package>,<app_activity>)

To open target app's details page

from kvdroid import app_details
app_details(<app_package>)

To detect current device's language

from kvdroid import device_lang
print(device_lang)

To set statusbar color

from kvdroid import statusbar_color
statusbar_color("#FFFFFF","black")

To set navigationbar color

from kvdroid import navbar_color
navbar_color("#FFFFFF")

To display a toast message

from kvdroid import toast
toast("hello world")

To get absolute sdcard path

from kvdroid import sdcard
print(sdcard)

To get path of working app folder

from kvdroid import app_folder
print(app_folder)

To change default wallpaper

from kvdroid import wallpaper
set_wallpaper("/sdcard/test.jpg")

To use text-to-speech

from kvdroid import speech
speech("hello world", "en")

To use default Download Manager

from kvdroid import download_manager
download_manager(<title>,<description>,<URL>,<path>,<file>)

To restart the app

from kvdroid import restart_app
restart_app(True) # default is false

To share text via Android Share menu

from kvdroid import share_text
share_text("hello world")

To share any file via Android Share menu

from kvdroid import share_file
share_file(<path-to-file>)
share_file("/sdcard/test.pdf")

To play suported music format or radio stream through Android Media Player player.mPLayer = Android Media PLayer

from kvdroid import player
player.play(<path-to-music-file>)
player.stream(Url) # radio
player.pause()
player.resume()
player.seek(value)
player.do_loop(True) # default is False
player.is_playing()
player.get_duration()
player.current_possition()

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kvdroid-0.1.4.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file kvdroid-0.1.4.tar.gz.

File metadata

  • Download URL: kvdroid-0.1.4.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.3

File hashes

Hashes for kvdroid-0.1.4.tar.gz
Algorithm Hash digest
SHA256 75fde26b7f0274255735661074fc948d4872544539853a213e72e9e9f652bd10
MD5 226263ccaefc30d7bb1f796aa1ffb1fe
BLAKE2b-256 c247d4343c51948d0a78ddd501ae5b1ba39451add73ea0a1e11b882c7c287fd1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page