Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,808,781 Members 47,541 Now Online
XDA Developers Android and Mobile Development Forum

[Q] How can i receive the hardware key button event On Windows phone 8 App?

Tip us?
 
Ethen Park
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 3
Join Date: Mar 2014
Default [Q] How can i receive the hardware key button event On Windows phone 8 App?

How can i receive the hardware key button event On Windows phone 8 App?

I have many problem,

I developed the WP8 App in the WP Device OEM Manufacturers.
So I can access to "OS, Device Driver, App".
But there are various MS documents, By First Time,
The developement is too hard.
The WP 8 is available features are very limited. The Windows CE / WM is a very different behavior.

I want to access the OS Layer by the API (Funtion)

Back button : Success. I found this key event.
Home button : ??? (I don't know)
Search button : ??? (I don't know)
Volume Up / Down : Just working volume.
Camera Key : Can i change the default camera app?

Power Key : Can i optionally lock the power key?
OEM Key (Barcode Key) : Push the button, I want to execute the My App?


Have you ever used these methods can I?
- Named Event
- SendMessage / PostMessage
- Other Communication

I guess the Key-Point "How can i communicate Device driver <-> App"

I am studying now the following Function.
- Service Agent
- IPC


Please help me any infomation the you think good... Have a nice day.
 
GoodDayToDie
Old
#2  
Recognized Developer
Thanks Meter 2,699
Posts: 5,682
Join Date: Jan 2011
Location: Seattle
Whoa... you're writing a driver for WP8 and trying to have it talk to an app? Or are you writing an app that you want to have talk to some existing driver? Sorry, it's not really clear.

From an app, itself, there's no public API to see any hardware button keypress except Back, maybe Focus (half-press on camera), and maybe Shutter (full-press on camera). The OS handles everything, and intentionally doesn't let apps interfere.

Now, if you're writing something that isn't a traditional "app" - for example, if you're an OEM - then that's a different story.
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.
 
Ethen Park
Old
(Last edited by Ethen Park; 9th March 2014 at 08:45 AM.)
#3  
Junior Member - OP
Thanks Meter 0
Posts: 3
Join Date: Mar 2014
Default I will study the more infomation on side by WP8 OS Driver.

Thanks a lot for your comment.
I will be studying the more knowledge from WP8 OS Position.
and I will share the more good information.

[1st Goal]
1. Click the HW key button (OEM Button).
2. The device driver will catch the HW key intrrupt (Event).
3. [It is not clear] And Set the event.
4. [It is not clear] If i can use the native code like a Win32 API, I use it or other api.
5. If i can the catching The event notification, Do Sometiong!!!
A) Execute the alternertive App.
B) Work the Something on the background App(Service).


Quote:
Originally Posted by GoodDayToDie View Post
Whoa...
you're writing a driver for WP8 and trying to have it talk to an app?
-> this is the other engineer's task.
Or are you writing an app that you want to have talk to some existing driver?
-> this is my task. But we are on Team. So we are being cross-checked.
Sorry, it's not really clear.


From an app, itself
, there's no public API to see any hardware button keypress except Back
-> I could catched by the below method.
protected override void OnBackKeyPress(System.ComponentModel.CancelEventAr gs e)

, maybe Focus (half-press on camera)
, and maybe Shutter (full-press on camera).
-> I found this document about camera on MSDN.
but I was not yet confirmed.


The OS handles everything, and intentionally doesn't let apps interfere.
Now, if you're writing something that isn't a traditional "app"
- for example, if you're an OEM - then that's a different story.
-> As you think, we are onI think found this document about camera on MSDN.
but I was not yet confirmed.
 
mcosmin222
Old
(Last edited by mcosmin222; 9th March 2014 at 11:59 AM.)
#4  
Senior Member
Thanks Meter 212
Posts: 867
Join Date: May 2012
What do you mean by "OEM Button"?

If you are developing for an OEM, you have access to APIs which mare mortals like the rest of us do not have access to(not "legally" at least). There are internal documents specifying on how to use such APIs. You should probably consult the documentation Microsoft gives you on the matter, rather than asking here...

and btw, i would be more careful on shouting out infos about the OEM i work with...
 
Ethen Park
Old
#5  
Junior Member - OP
Thanks Meter 0
Posts: 3
Join Date: Mar 2014
Thank you for quick answer every time.
I understand what you're talking about "OEM & legally".
That's important part of project.

I don't want to confuse somebody by this question.
but i just have my lack about the WP8 knowledge.

I will try to consult on Microsoft.

Once again thank you.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes