Im making a moblie app which will use kivy UrlRequests, on ubuntu and macos the app works but when i make a apk with buildozer and run it on my android (OnePlus 5: android 9.0.8) via android studios the application works until the UrlRquest part where it crashes.
Ive made a test apk just to isolate and test the UrlRequest and it works on my pc/laptop and kivy launcher but not as a apk on android.
I also have the buildozer.spec and logcat file let me know if you need
Ive tried and changed the Buildozer.spec permisions and requirements to: android.permissions = INTERNET,ACCESS_NETWORK_STATE
requirements = kivy,android,openssl,pyopenssl,httplib2
I have also tried to change https to http but still no luck
I expect the output to be a value fro btc when the "Make Request" button is pressed, but the actual output is nothing
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.network.urlrequest import UrlRequest
from kivy.uix.boxlayout import BoxLayout
Builder.load_string('''
<DemoLayout>:
orientation: "vertical"
padding: 50
spacing: 50
Button:
size_hint: (0.3, 0.3)
pos_hint: {"center_x": 0.5}
text: "Make Request"
on_press: app.make_request()
Label:
id: result_label
''')
class DemoLayout(BoxLayout):
pass
class Demo(App):
def build(self):
return DemoLayout()
def on_request_success(self, request, result):
self.root.ids.result_label.text = str(result["data"][0]["amount"])
def make_request(self, *args):
UrlRequest(
url = "https://api.coinbase.com/v2/prices/GBP/spot?",
on_error = None,
on_failure = None,
on_progress = None,
on_redirect = None,
on_success = self.on_request_success,
timeout = 5,
)
Demo().run()
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/1cc404fa-716d-4a31-a92f-e21d0533759d%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.