Accesing signal strength indicator in taskbar windows mobile 6

U

Ulises Vega.

Hi,

I would like to access the top status bar elements (task bar, where
the start icon, battery metter, signal strength indicator relies) so
that I can modify their value, e.g. signal strength indicator as I
desire.

Any ideas on how to do this are welcome.

Thanks.

Ulises
 
P

Paul G. Tobey [eMVP]

Sorry, huh? What OS are you talking about?! Why would you want to give
incorrect information to the user?

Paul T.
 
U

Ulises Vega.

I'm talking about Windows mobile OS 6. I don't pretend to give
erroneous information to the user.
Part of the challenge is to use my own dialer in my application no
windows default dialer. I've been able to do it but
the signal strength indicator gets "!" sign, o i guess there must be
a way to communicate with this icon, o shell32.exe, so that it loads
the appropriate value for the signal strenght indicator and tis signal
bars are displayed.

Thanks for your help, any idea or alternatives are useful, and highly
appreciated.

Ulises
 
P

Paul G. Tobey [eMVP]

The problem is that it's Windows Mobile; there's less information about
system components there than in Windows CE itself. The "dialer" is
connecting via the phone radio, GPRS or something, creating a network data
connection? I guess I'm confused about how you can be doing something that
doesn't use RAS to make the connection. If you give us as much of the story
of how this works as possible, includinng what standard calls you're using,
we'll have a better chance of figuring out what you should do.

Paul T.
 
U

Ulises Vega.

Hi Paul,

Thanks for your reply.

Originally, cprog.exe is the default dialer in windows mobile, I've
been able to find the way to disable the startup of this program. So
that I can use my own dialer and when the user presses the green key,
the red key, any number to establish a call, or there is an incoming
call the default dialer does not appear.

We migth assume that killing or not starting up the cprog.exe will
stop us from receiving incoming calls, because it seems like the cell
phone doesn't have signal, however for what i have found the software
that handle connections to the modem is apart from cprog.exe and
signal and voice calls are still detected.

As a consequence of this I'm able to answer phone calls with TAPI
wrapper provided in codeplex (http://tapi.codeplex.com/).

However, it seems like cprog.exe has some influence on the signal
strength indicator. There are three basic behaviors here:
a) cprog.exe is running, we can see a signal strength indicator has 4
or 3 bars depending on signal strength, just as it should be.

b) If we erase the key of cprog.exe from the registry, when we reboot
the cell phone will have a message that cprog.exe couldn't be started
up.
And the signal strength indicator gets a no signal sign on it. Look at
the third symbol in here.
http://www.microsoft.com/windowsmobile/en-us/help/v6-5/Status-indicator-icons-touch.aspx

c) If we don't erase the key of cprog.exe in the registry, and
substitute that with our program,
the signal strength indicator gets a "Your phone has no service".
Notice it is not a your phone's cellular capability is off.

I have found a couple of solutions to this (alternative options):
ao1) I made some experiments to add my own notification using
Microsoft.WindowsCE.Forms.Notification as pointed out in
http://www.christec.co.nz/blog/archives/104. This might be an option
it is no the best. Because it leaves the "cell phone with no service"
icon on the taskbar, and notifies you with window, and I would like an
icon on the taskbar.

ao2) There is another solution adding a item to the today screen, but
it leaves you with the "cellphone with no service" icon.

I order to implement this one i would have ideally to (pending issue):
p1) Erase the cellphone icon from taskbar, maybe with ITaskBarList.
Which I haven't found the way to use it in the compact .NET Framework.
p2) Ideal and best solution: Forget about ao1, ao2, and focus on
manipulating the behavior of the signal strentgh indicator as comented
at the begining of this thread.
p3) Finding other way to disable cprog.exe from answering or showing
its windows,when an incoming call arrives so that I can handle them
instead of cprog.exe (which is the very original problem that i have
to solve, At this moment i have solved almost everything but the
signal strength indicator).

Before I finish, I need to add a couple of comments on the things I've
been able to see about messaging in between cprog.exe, shell32.exe
(HHTaskBar).
I have observed that when the signal is stable at 4 bars of intensity,
the cprog.exe receives the message
Message wPARAM LPARAM
0x00008007(WM_APP+7) 00000001 7C073850(hhtaskbar
handle)

when the signal goes to 3 bars of intesity it gets the following
sequence of messages
0x00008006(WM_APP+6) 00000003 00000000
....it might receive the message or any other
0x00008007(WM_APP+7) 00000001 7C073850(hhtaskbar
handle)
before it recevies the timer message
0x00000113(WM_TIMER) 00000003 00000000

so ti seems to me that once the 4 bars intesity varies cprog sets up a
timer to periodically monitor the signal until is stabilizes again in
4.

I have also determined the set of messages that seem to be handled
when an incoming call,
I tried send this message muyself to the respective programs but make
no difference.

So I'm starting to believe that the icon is internally handle by
cprog.exe, and that there is no message interchange between
the shell32.exe (TaskBAr), and the cprog.exe to display a different
icon. However somebody else must be putting it in the taskbar, how
would you explain that the icon appears in the taskbar even is cprog
is not running from the start? So one guy puts it in the taskbar and
another drives its icon changes, could it be?
That's the mistery to be solved, jejejeje.

So those are my dilemmas (p1, p2, p3). I hope this clarifies the
situation.

Thanks for your help in advance.

Ulises Vega
 
P

Paul G. Tobey [eMVP]

I think that there are probably two possibilities:

1. the dialer program handles the icon directly, or

2. TAPI or some other service handles the icon and calls from the dialer or
other components in the system control which of the icons is actually shown.

The fact that the icon is shown at all when the dialer is not running
suggests that it's not the program that is responsible for the icon.
Generally, taskbar icons need a window to which they send notifications when
things happen to the icon (a tap on the icon by the user, etc.) I suspect
that we're looking at item #2 above and need to figure out how to tell TAPI,
or whatever, what the state of the phone is so that it can show the right
icon. Unfortunately, none of the devices I've built had cell phone
functionality, so I don't have much information. However, Windows CE 6.0
does have cell phone functionality built in, so there's at least a chance
that what would be done there would give you a hint as to what to do
yourself. I think that there's a cell phone dialer application example that
comes with CE6. If so, getting the evaluation version of CE6 from the Web
would give you that and might show you the code that you need to have
yourself to make things look right.

As for calling various APIs from managed code, you can always P/Invoke the
API calls directly. Some are more-difficult than others to build the
declarations for (if they have a lot of pointers in structures that are
passed as parameters, etc.), but I've not found any so far that are
'impossible'.

So, recommendations:

1. Do a search and find one or more alternate dialer samples in C/C++.
Examine their source code for hints.

2. Download the Windows Embedded CE 6.0 evaluation edition from
www.microsoft.com/downloads, install it, and look for dialer samples. Read
what you find and use what you see to rework your own code.

Paul T.

Ulises Vega. said:
Hi Paul,

Thanks for your reply.

Originally, cprog.exe is the default dialer in windows mobile, I've
been able to find the way to disable the startup of this program. So
that I can use my own dialer and when the user presses the green key,
the red key, any number to establish a call, or there is an incoming
call the default dialer does not appear.

We migth assume that killing or not starting up the cprog.exe will
stop us from receiving incoming calls, because it seems like the cell
phone doesn't have signal, however for what i have found the software
that handle connections to the modem is apart from cprog.exe and
signal and voice calls are still detected.

As a consequence of this I'm able to answer phone calls with TAPI
wrapper provided in codeplex (http://tapi.codeplex.com/).

However, it seems like cprog.exe has some influence on the signal
strength indicator. There are three basic behaviors here:
a) cprog.exe is running, we can see a signal strength indicator has 4
or 3 bars depending on signal strength, just as it should be.

b) If we erase the key of cprog.exe from the registry, when we reboot
the cell phone will have a message that cprog.exe couldn't be started
up.
And the signal strength indicator gets a no signal sign on it. Look at
the third symbol in here.
http://www.microsoft.com/windowsmobile/en-us/help/v6-5/Status-indicator-icons-touch.aspx

c) If we don't erase the key of cprog.exe in the registry, and
substitute that with our program,
the signal strength indicator gets a "Your phone has no service".
Notice it is not a your phone's cellular capability is off.

I have found a couple of solutions to this (alternative options):
ao1) I made some experiments to add my own notification using
Microsoft.WindowsCE.Forms.Notification as pointed out in
http://www.christec.co.nz/blog/archives/104. This might be an option
it is no the best. Because it leaves the "cell phone with no service"
icon on the taskbar, and notifies you with window, and I would like an
icon on the taskbar.

ao2) There is another solution adding a item to the today screen, but
it leaves you with the "cellphone with no service" icon.

I order to implement this one i would have ideally to (pending issue):
p1) Erase the cellphone icon from taskbar, maybe with ITaskBarList.
Which I haven't found the way to use it in the compact .NET Framework.
p2) Ideal and best solution: Forget about ao1, ao2, and focus on
manipulating the behavior of the signal strentgh indicator as comented
at the begining of this thread.
p3) Finding other way to disable cprog.exe from answering or showing
its windows,when an incoming call arrives so that I can handle them
instead of cprog.exe (which is the very original problem that i have
to solve, At this moment i have solved almost everything but the
signal strength indicator).

Before I finish, I need to add a couple of comments on the things I've
been able to see about messaging in between cprog.exe, shell32.exe
(HHTaskBar).
I have observed that when the signal is stable at 4 bars of intensity,
the cprog.exe receives the message
Message wPARAM LPARAM
0x00008007(WM_APP+7) 00000001 7C073850(hhtaskbar
handle)

when the signal goes to 3 bars of intesity it gets the following
sequence of messages
0x00008006(WM_APP+6) 00000003 00000000
....it might receive the message or any other
0x00008007(WM_APP+7) 00000001 7C073850(hhtaskbar
handle)
before it recevies the timer message
0x00000113(WM_TIMER) 00000003 00000000

so ti seems to me that once the 4 bars intesity varies cprog sets up a
timer to periodically monitor the signal until is stabilizes again in
4.

I have also determined the set of messages that seem to be handled
when an incoming call,
I tried send this message muyself to the respective programs but make
no difference.

So I'm starting to believe that the icon is internally handle by
cprog.exe, and that there is no message interchange between
the shell32.exe (TaskBAr), and the cprog.exe to display a different
icon. However somebody else must be putting it in the taskbar, how
would you explain that the icon appears in the taskbar even is cprog
is not running from the start? So one guy puts it in the taskbar and
another drives its icon changes, could it be?
That's the mistery to be solved, jejejeje.

So those are my dilemmas (p1, p2, p3). I hope this clarifies the
situation.

Thanks for your help in advance.

Ulises Vega

The problem is that it's Windows Mobile; there's less information about
system components there than in Windows CE itself. The "dialer" is
connecting via the phone radio, GPRS or something, creating a network data
connection? I guess I'm confused about how you can be doing something that
doesn't use RAS to make the connection. If you give us as much of the story
of how this works as possible, includinng what standard calls you're using,
we'll have a better chance of figuring out what you should do.

Paul T.



UlisesVega. said:
I'm talking about Windows mobile OS 6. I don't pretend to give
erroneous information to the user.
Part of the challenge is to use my own dialer in my application no
windows default dialer. I've been able to do it but
the signal strength indicator gets "!" sign, o i guess there must be
a way to communicate with this icon, o shell32.exe, so that it loads
the appropriate value for the signal strenght indicator and tis signal
bars are displayed.
Thanks for your help, any idea or alternatives are useful, and highly
appreciated.

On Dec 2, 8:42 pm, "Paul G. Tobey [eMVP]" <paul tobey _AT_ earthlink
_DOT_ net> wrote:
Sorry, huh? What OS are you talking about?! Why would you want to give
incorrect information to the user?
I would like to access the top status bar elements (task bar, where
the start icon, battery metter, signal strength indicator relies) so
that I can modify their value, e.g. signal strength indicator as I
desire.
Any ideas on how to do this are welcome.


.

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top