![](/img/trans.png)
[英]Automate or send kepresses to application running in background with PyS60
[英]PyS60 : An always running app.. Hanging the Phones UI ? (How to tackle that ?)
我正在 Symbian S60 平台上的 Python Shell 中測試我的應用程序。
從功能上講,該應用程序在 shell 上運行良好。但它似乎如此掛起界面?
即使:它不包括繁重的處理!
循環看起來像:
while 1:
// Application Functions called here.
// Nothing processor intensive but has to run all the time.
// It basically needs to track the phone and remain connected to the web over GPRS !
time.sleep(5)
建議質量應用程序如何做到這一點。因為質量很重要!
我必須進行最終的應用程序,但是這樣我的簡單應用程序會破壞手機的可用性..
所以,我肯定做錯了什么? 它是什么..請幫助!
您正在通過調用本機 python sleep 來阻止進程調度程序切換到 UI 線程。 它不會像你認為的那樣在 PyS60 上做。 您應該使用 e32.ao_yield 或 e32.Ao_timer 來管理應用程序循環。 小心 RTFM,否則你不會得到任何響應式 UI。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.