Questions tagged [pyjnius]

Pyjnius is a Python library for accessing Java classes.

Pyjnius is a library for accessing classes.

References:

170 questions
3
votes
0 answers

Python Android, play audio as it's being received from socket server

I'm trying to play a .wav file that is sent via Socket Server on Android live. The following solution works for Linux when I use pyaudio: Client.py p = pyaudio.PyAudio() CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 44100 stream =…
JareBear
  • 467
  • 9
  • 27
3
votes
2 answers

how to make the service continue working after closing the app in python kivy on android

I want to my service continue working after closing the app, but I can't do it. I heard I should use startForeground() but how to do it in python? Code of app: from kivy.app import App from kivy.uix.floatlayout import FloatLayout from jnius import…
pinkcat
  • 327
  • 4
  • 17
3
votes
2 answers

Error when trying to generate simple apk on Kivy Complete VM

Windows 10 x64 VirtualBox 6.1 Kivy Complete VM 0.7 I'm trying to generate a simple apk file and it always returns errors, I've tried to delete the virtual machine and create it again, thinking it was the result of some configuration done…
3
votes
1 answer

pyjnius "cannot find class" error

I am trying to make a Bluetooth app with Kivy so I need to use java classes, I get this error message when I use Pyjnius Traceback (most recent call last): File "C:\Users\Omer Akbas\Desktop\My Apps (Kivy)\First\main.py", line 3, in …
Omer Akbas
  • 31
  • 1
3
votes
2 answers

jnius.find_javaclass , jnius.JavaException: Class not found 'android/webkit/WebView'

I am getting this error while trying to use jnius's autoclass to get the android webview inside Kivy app. What could be the fix? Thanks My code looks like this: import kivy …
Enkum
  • 635
  • 8
  • 22
3
votes
1 answer

JNIUS & TIKA - error trying to parseToString

tried to run the tike-app with jnius but got a problem (macOS Sierra, Java 1.8 JDK, Python 2.7 & Python 3.6) Everything works fine (output for tika.detect is fine) until the parseToString command. It seems there's a pop up showing off if you run…
3
votes
2 answers

JRE_HOME not found on pip jnius installation

Trying to install jnius from pip (it is a requirement to pip install sikuli). This is the error I get when I am trying to install: Are the variables correctly defined? Does anyone understand why it keeps saying that it can't find JRE_HOME? Edit:…
k9b
  • 1,457
  • 4
  • 24
  • 54
3
votes
1 answer

Practical use of Java class/JAR in Python?

I spent significant amount of time looking for this and explore many solutions. This is related to this thread. Calling Java from Python In the end, after testing: Pyjnius : Cannot install in Windows. Py4J: can install on windows, but using Gateway…
user5497885
3
votes
1 answer

Android notifications to the notification bar in kivy

I want to create a notification on android in the notification bar. When i click on the notification i want to open my kivy application. The notification should be made from a background service. How can i do that in kivy? I would prefer pyjnius and…
Faminator
  • 888
  • 1
  • 10
  • 16
3
votes
1 answer

Error installing pyjnius, "jni.h" not found. (OS X 10.10.1)

I have been trying to install pyjnius on OS X 10.10.1. Other dependencies taken care of, I haven't been able to solve the issue of the header file "jni.h" not being found. Here's what happens: $ sudo python setup.py…
Abhinav Garg
  • 51
  • 1
  • 6
3
votes
2 answers

Open a URL with default broswer?

I'm new developer in QPython (experienced with python), I want to open an url with user's default browser. I tried AndroidBrowser().open("...") but, to my surprise, I got Segmentation Fault! So I said OK, let's try to open it manually as activity,…
Ori Seri
  • 917
  • 1
  • 6
  • 14
3
votes
1 answer

How to acquire PARTIAL_WAKE_LOCK in a Kivy app (Android)?

I'm trying to acquire a PARTIAL_WAKE_LOCK for my kivy app. Basically it is a timer app, the timer should continue to run in the background when the screen has turned off. Everything is working fine, except for the wake lock. This is how i would…
droidFreak
  • 51
  • 3
2
votes
1 answer

Access removable SD card

I'm using this code to access SD card: import os from os.path import join from jnius import autoclass #from android.permissions import request_permissions, Permission #request_permissions([Permission.WRITE_EXTERNAL_STORAGE, # …
xralf
  • 3,312
  • 45
  • 129
  • 200
2
votes
1 answer

Python bluetooth device scanning using pyjnius java wrapper

I'm trying to replicate the code below which is in java that's supposed to scan for bluetooth devices on an android device, but I'm trying to write it in python using a the pyjnius java to python wrapper. There is very little documentation on how to…
SegFaulter
  • 21
  • 1
2
votes
0 answers

How to use Android's AlarmManager in kivy to make a *function/class* of kivy program to run at given time?

I believe we can make use of android's AlarmManager to run some code at given time. I want to run one function or one class of my kivy program at given time. Is this possible ? If yes, then please help me out. If no, then atleast help me to run the…
Vishal
  • 71
  • 6
1
2
3
11 12