Questions tagged [pyjnius]

Pyjnius is a Python library for accessing Java classes.

Pyjnius is a library for accessing classes.

References:

170 questions
2
votes
1 answer

How to pass android context into a java constructor class using pyjnius?

I am building an app with kivy for a android device that have a built-in thermal printer. I already found the API that give me access to the printer and is written in java (so i am using pyjnius) but i cannot make it work. I've seen with a program…
Ivo22
  • 21
  • 2
2
votes
1 answer

How to start service in python kivy on android in background mode?

I need a service for my app on android to receive message from server. Code of my app: from kivy.app import App from kivy.uix.floatlayout import FloatLayout import sys import socket import time, subprocess from kivy.uix.label import Label from jnius…
pinkcat
  • 327
  • 4
  • 17
2
votes
2 answers

How to get audio (Mic) input working on Android with python/kivy

EDIT from a visitor: The current consensus around this situation appears to be that Kivy does not support the microphone at this time, and we are begging people to help port the "audiostream" add-on forward, so that this can work again. Any tiny…
Riku
  • 21
  • 1
  • 3
2
votes
1 answer

How to use the pyjnius read and write arguments for Bluetooth getInputStream and getOutputStream?

I have been fumbling with getting data from a bluetooth RS232 converter using the python for android jnius library. I had thought that it would be as simple as the PySerial library, but as I am still new to java the implementation is quite…
Hmerman6006
  • 1,622
  • 1
  • 20
  • 45
2
votes
0 answers

Open date setting in Kivy/Android app with jnius

I'm trying to translate this Java code startActivity(new Intent(android.provider.Settings.ACTION_DATE_SETTINGS)); to Kivy, so I can open the Android date settings dialog. So far, I tried with from jnius import autoclass from jnius import cast from…
PabloG
  • 21
  • 1
2
votes
1 answer

kivy run_on_ui_thread crash

The application compiles without problems, but when the application is executed it closes version: kivi - 1.10.0 cython: 0.28.6 python: 3.7.1 main.py from kivy.app import App from kivy.uix.widget import Widget from kivy.clock import Clock from…
Francisco
  • 539
  • 2
  • 8
  • 25
2
votes
3 answers

Error with an import module jnius while using imagej in python

I am trying to connect a headless imageJ library to my python application. Unfortunately, the dependency error list goes on endless and I am now stuck at an import error involving the import of a java wrapper called jnius. So far I have installed:…
ABK
  • 145
  • 1
  • 14
2
votes
3 answers

Jnius installation bug, "Unable to determine JDK_HOME"

I tried to install jnius Python module by typing 'pip install jnius' in CMD. This is the message I got: Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File…
Enthusiast
  • 31
  • 1
  • 4
2
votes
1 answer

Error compiling Cython file in buildozer

I have built an android app using kivy and while I was compiling it to build an apk using buildozer, the following error popped up; [INFO]: -> directory context…
Himanshu
  • 29
  • 2
2
votes
2 answers

Kivy: what package name should I use for .jar files added with add_jars?

1) In my kivy's project I created \platforms\android\test.java with following content: class Test { public int test() { return 300; } } And compiled it to .jar file (in same directory). 2) In buildozer.spec I added…
Mikhail Gerasimov
  • 36,989
  • 16
  • 116
  • 159
2
votes
1 answer

How I can use startActivity method from service in python kivy/jnius?

I want to start an activity from a service in my android application (python 2.7 & kivy). I use startActivity method for it but it's not work. When I run the app and type "buildozer android logcat", I see this: File "jnius_export_class.pxi", line…
Alexander
  • 21
  • 3
2
votes
1 answer

how to interrogate ontology with sparql, rdflib in python

I have developed my own ontology (I defined my classes, properties, etc.) and I want to interrogate my ontology with sparql. in protégé 2000 (open-source ontology editor) everything works fine, but when I want to implement my request sparql in…
Mehdi
  • 21
  • 1
  • 6
2
votes
1 answer

How to select java version for pyjnius

I have Java 1.6.0_17 installed in /usr/local/bin. My Java program is compiled with 1.7.0_11. pyjnius fails in a call X = autoclass('HelloWorld') When HelloWorld.java is compiled with 1.6, everything works. I cannot get pyjnius working with…
tixi
  • 23
  • 3
2
votes
3 answers

Error while displaying Toast on Android with Python and jnius

I'm trying to display a toast message using jnius on QPython. I'm not able to use the Py4A library, since the final result should work inside a Kivy application, which doesn't have SL4A's library. from jnius import autoclass activity =…
redevined
  • 772
  • 2
  • 6
  • 23
2
votes
2 answers

kivy android : write public files

I'm coding an Android app using Kivy, and would like the app to write to the android filesystem, some PUBLIC directory/files. Currently, if my app writes a file (using Python), the file CAN be read by the android local File Manager, but CANNOT be…
MoriB
  • 311
  • 1
  • 2
  • 10
1 2
3
11 12