from
kivy.app import App
from kivy.uix.label import Label
import asyncio
import time
class ExampleApp(App):
 Â
  def build(self):
    return Label(text = 'Greetings Earthlings')
  def on_start(self):
    print("Kivy app started")
    asyncio.create_task(self.my_async_function())
 Â
  async def my_async_function(self):
    print("woohooo running async function on kivy app")
    result = await self.another_async_function()
    print(result)
  async def another_async_function(self):
    ## long task to get some data from cloud Â
    a=[]
    for i in range(100000000):
      a.append(i)
    print("another async function")
    return a
 Â
   Â
# Start kivy app as an asynchronous task
asyncio.run(ExampleApp().async_run('asyncio'))