Mobile Devices Developer Web Chat

Posted November 27, 2004

Chat Date: November 23, 2004

Please note: Portions of this transcript have been edited for clarity

Introduction

Andy Q (Moderator):
Welcome to today’s chat. Our topic is Mobile Devices Developer Web Chat. Questions, comments, and suggestions are welcome.

Andy Q (Moderator):
We are pleased to welcome our Experts for today’s chat. I will have them introduce themselves now.

JamesPr_MSFT (Expert):
Hi, I'm James Pratt, the Product Manager for the Windows Mobile Development Platform. I get to work with the dev team to figure out what's new and exciting in current/future releases and figure out how we communicate that to the world. I also look after out Mobile Developer Conference.

nwhite_MS (Expert):
Hi, I'm Nick White, Community Lead of the Mobile and Embedded Devices division.

JasonFul_MS (Expert):
Hi, I'm Jason Fuller, Development Lead for the Windows Mobile SDK team.

Andy Q (Moderator):
And I'm Andy, Communities Business Manager

JamesPr_MSFT (Expert):
And today's chat is an open chat on all things Windows Mobile development, be it tools, runtimes, APIs, content, programs etc etc

Andy Q (Moderator):
OK folks, now don't type all at once! :) Any questions?

Start of Chat

JasonFul_MS (Expert):
Does it have to be the IMEI, or do you just need a unique id for the device?

JamesPr_MSFT (Expert):
Q:
...sorry - kept getting clipped... I understand about privileged API, etc. I've written to M2M and haven't gotten a response. Is this the best way to get signed for privileged API's?
A: : Hi Jeff. That's a great question. In the last month or so we've opened up a privileged Mobile2Market signing process. You should check out : https://blogs.msdn.com/windowsmobile/archive/2004/11/02/251298.aspx

JamesPr_MSFT (Expert):
Q:
...sorry - kept getting clipped... I understand about privileged API, etc. I've written to M2M and haven't gotten a response. Is this the best way to get signed for privileged API's?
A: : In addition, you can get the device phone number as an unprivileged applications. JasonFul is just looking up how to do that. Stay tuned...

JasonFul_MS (Expert):
Q:
I've been porting a commercial app to Smartphone for about 8 months. It is almost complete - works really well. Just got real hardware last week. I have some questions about getting the IMEI number for registration protection. (I have more to write)
A: : If you can use the telephone number of the device as a unique id, you can get that by calling the TAPI API lineGetAddressCaps(). I'll be posting a sample on https://blogs.msdn.com/windowsmobile in the next few days.

JamesPr_MSFT (Expert):
Q:
It appears that power management on Smartphone and PPC is very different. From observation it appears that Smartphones never enter a suspend mode and always keep the application processor running - is this true?
A: : Yes, that's true. Hence, applications should be very careful about how they use processor cycles by, for example, not spinning threads.

JasonFul_MS (Expert):
Q:
Is there a preferred way to temporarily turn off these key clicks or should even that not be done?
A: : There's no API to turn off the keyclicks. Only the user can do that through the Settings app.

JasonFul_MS (Expert):
Q:
OK...next Q...with this cursor, I'd like the user to be able to press-and-hold the action key and have a popup menu appear. It seems that pressing-and-holding makes any following popoup immediately terminate no matter what messages I peek out of the queue
A: : Since the top menu item gets highlighted when a menu first opens, I'm guessing that the VK_ACTION messages that are still coming in (because the user is still pressing-and-holding) go to the menu, and select the highlighted item. Could that be what is happening? (Are you using SHRecognizeGesture() to implement the press-and-hold?)

JamesPr_MSFT (Expert):
Q:
Is there a reasonable way to PPC to request the system suspend ASAP to conserve power? The issue we have is we wake the PPC up programmatically to perform a periodic task, the device stays on until the user idle timeout.
A: : In general this kind of polling is a bad thing. Ideally you should make your application interrupt driven so that it is woken up only when it really needs to do something. There are obvious reasons why you wouldn't want developers to be able to suspend the device, for example what happens if another application is running. The idle timeout setting controlled by the user is the most effective mechanism.

JasonFul_MS (Expert):
Q:
I'm not doing SHRecognizeGesture() and not handling it with a notify msg - I'm just grabbing the first keydown and waiting until it is released...then peeking off every key msg...but it still shows the popup and them drops it
A: : When a menu pops up, it has its own message loop, so the peeking that your message loop is doing would not be able to intercept the message.

JasonFul_MS (Expert):
To keep the backlight on, do h=SetPowerRequirement(TEXT("BKL1:"), D0, POWER_NAME, NULL, 0); Then when you're done do ReleasePowerRequirement( h); These APis are in pm.h

JamesPr_MSFT (Expert):
Q:
UI question - Is there any way to control the shortcut number assigned to menu items in Smartphone 2003 SE? I'd like to assign an item a number for consistency across UI but don't want it to always be first.
A: : I'd suggest ordering your menus in the same way across your applications/forms.

JasonFul_MS (Expert):
Q:
ok, our server sends us some data over an open socket, thus waking up the device. Our app processes the data, but now we have to wait the entire user idle timeout to return to suspend mode. This problem is a big battery drain for us, no way to improve?
A: : I believe you can do SetPowerState(0, POWER_STATE_SUSPEND, 0) to syuspend the device. See pm.h.

JamesPr_MSFT (Expert):
Q:
Q: regarding a unique ID for a Smartphone - how safe is the idea of using the user's name in Settings/Owner Information along with the build number of the OS (from CeGetVersionEx)?
A: : That's a decision you have to take. It depends on your perceived loss to piracy vs. the difficulty of someone working around the problem. Lots of ISVs use the owner name method with success. It has a fringe benefit which allows someone to take the application from device to device as they change up phones. I think this is a nice user experience

JasonFul_MS (Expert):
Q:
We're actually keeping some data synchronized in the background so don't want the screen or backlight on - is there a similar power requirement call for just the processor?
A: : SetSystemPowerState(0, POWER_STATE_IDLE, 0); This will turn the screen off.

JasonFul_MS (Expert):
Q:
oops - wrong selection: another Q: is there a non-privileged way to trap the record or camera button whenever it is pressed no matter what application is active?
A: : Have you tried RegisterHotKey(VK_TRECORD)?

JasonFul_MS (Expert):
Q:
Here's another....in some cases, icons at the top start overwriting my window name - should I allow this to happen? it seems pretty normal and the icons are pretty important in most cases
A: : This is normal.

JamesPr_MSFT (Expert):
Q:
We have many screens/forms and some have 5 menu items, some have 8, some have 4, some have 9, but all share a common command - our UI design here believes it would be great for our users if we could keep the common command at the same number (like 0).
A: : Hmm, it feels like having a menu numbered 1,4,2,6,3,5 would be worse than having the options "move around" in the menu. I'd suggest have your core functions consistently at the top of the menu and have variable ones underneath them.

JasonFul_MS (Expert):
Q:
Will RegisterHotKey work even if the user has another application active and they're working with it?
A: : Yes.

JasonFul_MS (Expert):
The URL doesn't seem to work.

JamesPr_MSFT (Expert):
Q:
What we're after is a command which jumps between screens in our app, each screen has its own commands, plus this one jump command. So the numbering we'd like is 1,2,3,4,5,0 1,2,3,4,5,6,0 1,2,3,4,0 etc. Making things out of order would be strange!
A: : Why not make Jump item 1?

JamesPr_MSFT (Expert):
Q:
On screens with lists, delete is by far the most common, and moving it from position 1 seems less than ideal. Similar on other screens where there are far more common and useful commands we'd prefer be at the top.
A: : Unfortunately there's no way of re-numbering the list. It should be consistently numbered across all applications to maintain device usability.

JasonFul_MS (Expert):
Q:
We have tried SetSystemPowerState - the issue we have is that that seems to suspend the device in all cases, even when it should not, for instance when a phone call is in progress or an mp3 is playing!
A: : I not sure I understand what you are asking for.

nwhite_MS (Expert):
Q:
What does it mean that ISA is blocking the URL? I had 500 visits yesterday and 650 so far today...
A: : Our proxy (ISA) server also performs security checks, and for some reason, your site is not passing them. You might check the meta-data contained in the page's code.

JasonFul_MS (Expert):
Q:
we can't tell if the device was already awake due to user activity or if it was woken up due to something automated. If automated we would want to go back to sleep ASAP to avoid power drain.
A: : Okay, I understand what you're trying to do. I'll look into it, and if there's a way to do it, I'll post it on https://blogs.msdn.com/windowsmobile

Andy Q (Moderator):
OK guys, thanks for you questions, scheduled chat time is over now and we need to go!

Andy Q (Moderator):
Bye guys! happy holidays!

Top of pageTop of page