Internet connection impossible with kivy app on android

1,182 views
Skip to first unread message

Laurent Estieve

unread,
May 8, 2018, 5:51:42 PM5/8/18
to Kivy users support

Hello,


I've developped a kivy app with Python2. It works good on my PC, but when I make the .apk with buildozer, the app works on my mobile phone until the first internet connection. Then, the app is blocked.

I've add every requirements about internet : requests, pyopenssl, openssl, hostpython2...
and Android permissions (INTERNET).
But it still doesn't work. I tried to find errors in the adb logcat, but nothing about connection issue...
I don't know what to do. I saw others developers who had the same problem but I didn't find any resolution about this.

Is there any other requirement or android permission I should add in the buildozer.spec ?


Thanks for your help

buildozer.spec.txt
logcat.txt

Alexander Taylor

unread,
May 9, 2018, 5:09:49 PM5/9/18
to Kivy users support
When you say the app is 'blocked', do you mean it crashes?

Laurent Estieve

unread,
May 9, 2018, 6:40:02 PM5/9/18
to Kivy users support
No, it doesn't crash. The screen is freezed. I can't do anything, only kill the app.

The only messages about that I could find is (but not resolved) :

Laurent Estieve

unread,
May 10, 2018, 8:04:49 PM5/10/18
to Kivy users support
I've used Urlrequest (async). I could catch a message error with the "on_error" result :
global name 'HTTPSConnection' is not defined.

So, I found the next message :


I changed my buildozer.spec with new requirements and permissions :

requirements = kivy, android, openssl, pyopenssl, httplib2 

android.permissions = INTERNET, ACCESS_NETWORK_STATE


But, when I try it after on android, I still have the same message : "global name 'HTTPSConnection' is not defined"...

When I try with another URL without SSL, I have the next error message :
"[Errno 104] Connection reset by peer"


Le 10/05/2018 à 00:53, Alexander Taylor a écrit :

It sounds like maybe the main thread is blocked by a function that never returns. What happens if you use something async, like a Kivy Urlrequest?

That would explain why there's no error in the log, although I don't know what's actually wrong. Have you tried different websites?

Reply all
Reply to author
Forward
0 new messages