Questions tagged [pyjnius]

Pyjnius is a Python library for accessing Java classes.

Pyjnius is a library for accessing classes.

References:

170 questions
8
votes
2 answers

Pyjnius import jar file

Pyjnius allows you to create a python wrapper for java classes like: Hardware = autoclass('org.myapp.Hardware') Is there a way to import an existing *.jar file like that? What does the syntax look like?
Thorin Schiffer
  • 2,818
  • 4
  • 25
  • 34
7
votes
2 answers

kivy android share image

I want to create share button that will use android ACTION_SEND intent for sharing image. It's my code: from kivy.setupconfig import USE_SDL2 def share(path): if platform == 'android': from jnius import cast from jnius import…
Dima Kudosh
  • 7,126
  • 4
  • 36
  • 46
6
votes
1 answer

Why is pyjnius setting the wrong JVM options?

I'm running some Java code through Python's pyjnius package, version 1.2.0. There are several Python processes that each call the same Java class with different inputs, so each one initializes its own JVM. The problem I'm having is a memory issue,…
Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
6
votes
7 answers

pyjnius "Class not found" when importing jar file

I'm trying to make pyjnius work with a jar file I built from java application, but I keep getting the "Class not found" error: >>> import os >>> os.environ['CLASSPATH'] = "~/workspace/myapp-Tools/Admin/Console/couchdb/myapp-web.jar" >>> from jnius…
FaustoW
  • 632
  • 7
  • 15
6
votes
2 answers

Send email with attachment from Kivy app on Android, preferably by opening email client

I have tried a few ways to send an email using Python in the Kivy app on Android. The closest I've come is using Plyer's email function (https://plyer.readthedocs.org/en/latest/#plyer.facades.Email), however it doesn't appear to support…
kitch6041
  • 113
  • 2
  • 6
5
votes
0 answers

How to fix a jnius.JavaException when using Pyjnius

I am trying to get this example for importing importing TensorFlow in Java to run: https://github.com/deeplearning4j/tf-import I have managed to get the Java import in Mnist.java to work after some modifications. However, I am unable to get …
packoman
  • 1,230
  • 1
  • 16
  • 36
5
votes
1 answer

Creating an Android Activity Context in python with pyjnius

I'm working on importing braintrees drop-in UI payment method into my python kivy app with the following code. from jnius import autoclass from jnius import cast from android import activity Intent =…
GoBig06
  • 255
  • 2
  • 13
5
votes
2 answers

How To Bundle .jar Files with Pyinstaller

How do you get pyinstaller to bundle .jar files as archives for a python project that utilizes them? For instance, to make an exe with (I am using pyjnius for handling the sikuli-standalone jar): # test.py import os import sys # set the classpath…
ecoe
  • 4,994
  • 7
  • 54
  • 72
5
votes
3 answers

creating apk using Kivy showing some error

When after I give the command: buildozer android debug deploy run I am getting the following error. Its showing syntax error ? # Install distribute # Run 'curl http://python-distribute.org/distribute_setup.py | venv/bin/python' # Cwd…
user
  • 87
  • 8
4
votes
0 answers

Cryptic error when I try to initialize android Visualizer via Buildozer

I have some existing code on Python and want to port it to android using Kivy and Buildozer. However I have a dependency on native android class 'Visualizer'. My application starts up correctly, but when I click on 'Run' button in my application…
JaktensTid
  • 272
  • 2
  • 5
  • 20
4
votes
0 answers

PyInstaller - WARNING: lib not found: api-ms-win-crt*.dll

I am trying to execute PyInstaller main.py on my windows 10 machine, I am getting the following warning: 3536 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\users\dlee\appdata\local\programs\python\python36\python.exe 3701…
4
votes
4 answers

How to handle android runtime permission with kivy

I found that kivy is very nice framework to build cross platform application and I am very interested in kivy just to do android application as I think is easy and comfortable in kivy. After trying few examples, I am interested to know how should…
Natwar Singh
  • 2,197
  • 4
  • 26
  • 42
4
votes
1 answer

Kivy and android sharedpreferences

I am looking for a method to store settings persistently on android device, from Kivy framework. I found Kivy documentation, overall informative, vague in this particular area. It mentions three methods (sorry, dont have enough reputation to…
kivy_student
  • 150
  • 1
  • 9
4
votes
1 answer

webbrowser.open() doesn't work on Android

webbrowser.open() works on Windows 7; Python 2.7 opens my default web browser (Chrome) on my Windows machine no problem. My simple code to analyze CSV data works perfectly on both Windows and Android (4.1). webbrowser.open() or .get() does not work…
pieThong
  • 41
  • 1
  • 3
3
votes
0 answers

Streaming audio from microphone using Pyjnius for android

I am developing cross-platforms using Kivy and I want to use Pyjnius to push and get bytes to the speaker or microphone for android(for windows and Linux Pyaudio works fine),I have tried Plyer and audiostream, but both them are not well…
user name
  • 165
  • 1
  • 8
1
2 3
11 12