bladox.com Forum Index bladox.com
Turbo SIM Toolkit Adapter Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Timers and display_text

 
Post new topic   Reply to topic    bladox.com Forum Index -> Development
View previous topic :: View next topic  
Author Message
dgallo



Joined: 02 Dec 2009
Posts: 16

PostPosted: Wed Jan 13, 2010 12:02 pm    Post subject: Timers and display_text Reply with quote

Hi all,

I'm trying to use timers to update/change some text message periodically. I looked at the timer.c example, but in that case the display_text_raw is used with the Q_DISPLAY_TEXT_DELAY_CLEAR flag, that "dismiss" the text after some delay (defined by the ME I guess).

What I would like to have is some "text box", always being displayed (until the user "quit", but with its content being changed when the timer expire. I've tried to use the flag Q_DISPLAY_TEXT_USER_CLEAR, but than I notice that when the timer expire if I call another display_text_raw the app will hang waiting for the user to dismiss the first display text, and only after that will display the new text and keep the execution.

Is it possible to dismiss the "text box" programmatically?! Or, even better, is it possible to change/update the text being displayed somehow?

Any other way to achieve the behavior I want?!

Thanks!
Diego
ps. I've trying using priorities (NORMAL / HIGH) as well, but since I want to have periodical updates, messages would have the same priority, and the same behavior described above was obtained with high priority messages.
Back to top
View user's profile Send private message
pz
Guest





PostPosted: Fri Jan 15, 2010 10:27 am    Post subject: Re: Timers and display_text Reply with quote

dgallo wrote:
Hi all,

I'm trying to use timers to update/change some text message periodically. I looked at the timer.c example, but in that case the display_text_raw is used with the Q_DISPLAY_TEXT_DELAY_CLEAR flag, that "dismiss" the text after some delay (defined by the ME I guess).


Yes, this is left to phone to close the text. Time is phone/vendor depending,
usually about 30 sec.

Quote:


What I would like to have is some "text box", always being displayed (until the user "quit", but with its content being changed when the timer expire. I've tried to use the flag Q_DISPLAY_TEXT_USER_CLEAR, but than I notice that when the timer expire if I call another display_text_raw the app will hang waiting for the user to dismiss the first display text, and only after that will display the new text and keep the execution.



So why not Q_DISPLAY_TEXT_DELAY_CLEAR in a loop?
How often you want to change the text?

[quote[

Is it possible to dismiss the "text box" programmatically?! Or, even better, is it possible to change/update the text being displayed somehow?

Any other way to achieve the behavior I want?!

Thanks!
Diego
ps. I've trying using priorities (NORMAL / HIGH) as well, but since I want to have periodical updates, messages would have the same priority, and the same behavior described above was obtained with high priority messages.[/quote]

Btw. have you checked the IDLE_TEXT?
Back to top
dgallo



Joined: 02 Dec 2009
Posts: 16

PostPosted: Fri Jan 15, 2010 12:35 pm    Post subject: Re: Timers and display_text Reply with quote

pz wrote:
dgallo wrote:
Hi all,

I'm trying to use timers to update/change some text message periodically. I looked at the timer.c example, but in that case the display_text_raw is used with the Q_DISPLAY_TEXT_DELAY_CLEAR flag, that "dismiss" the text after some delay (defined by the ME I guess).


Yes, this is left to phone to close the text. Time is phone/vendor depending,
usually about 30 sec.


That's what I have imagined. I've tested in a Nokia 2660 and it takes only 3-5s to close the DELAY_CLEAR message...

Quote:
Quote:

What I would like to have is some "text box", always being displayed (until the user "quit", but with its content being changed when the timer expire. I've tried to use the flag Q_DISPLAY_TEXT_USER_CLEAR, but than I notice that when the timer expire if I call another display_text_raw the app will hang waiting for the user to dismiss the first display text, and only after that will display the new text and keep the execution.


So why not Q_DISPLAY_TEXT_DELAY_CLEAR in a loop?
How often you want to change the text?


I want to update the message every ~30s... I've tried that, but the problem is that the message disappears before the next message is about to be displayed, and I wanted to have some text being displayed all the time when the user is in this specific point of the menu/app.

Quote:
Quote:

Is it possible to dismiss the "text box" programmatically?! Or, even better, is it possible to change/update the text being displayed somehow?

Any other way to achieve the behavior I want?!

Thanks!
Diego
ps. I've trying using priorities (NORMAL / HIGH) as well, but since I want to have periodical updates, messages would have the same priority, and the same behavior described above was obtained with high priority messages.


Btw. have you checked the IDLE_TEXT?


Just took a look in the IDLE_TEXT, but as far as I understood/tested (stkcmd.c example) the "stk_cmd(STK_CMD_SET_UP_IDLE_MODE_TEXT, ...)" command will set the text that the ME will show at the "idle screen" (when no app is selected... in my test phone the idle text replaces the date field)... And what I need/want is to show this text only when the user "requests" it, i.e., only when the user goes to/select a specific menu in my app... And when the user is at that point, the text might have to be updated after some time exhibiting the text.

Any other idea?
Back to top
View user's profile Send private message
pz
Guest





PostPosted: Sun Jan 17, 2010 7:55 pm    Post subject: Reply with quote

Maybe I was wrong it takes 30 sec, something like this is implemented in autoalarm app, see measurement and you are right, it's faster, about 5 sec. So why just not loop the message more times?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    bladox.com Forum Index -> Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group