开发者

PyS60 : An always running app.. Hanging the Phones UI ? (How to tackle that ?)

I am testing my application in the Python Shell on Symbian S60 Platform.

Functionally, the application just runs great on the shell.. but its seems so hang the interface ?

Even when : It does not include heavy processing !!

The loop looks like :

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)

Suggest the way how the Q开发者_JAVA百科uality Applications do it.. Because Quality matters !!

I have to proceed to the final application, but this way my simple application will kill the usability of the phone..

So, I am definitely doing something wrong ? What is it.. Please Help !!


You are preventing the process scheduler from switching to UI thread by calling the native python sleep. It doesn't do what you think it does on PyS60. You should use e32.ao_yield or e32.Ao_timer to manage application loop. RTFM carefully or you won't get any responsive UI.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜