• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use of Pocket PC hardware keys

 
Fernando Sanz
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I'm using Personal Java, and I'd like to assign, within my program, certain actions to one of the hardware keys in a Pocket PC. Anyone has done it? any tutorial talks about it?
Thanks!
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since PJ is based on AWT, I doubt whether you can do this easily without writing native code. (BTW, you can use native libraries in PJ or PPro). But this is easy to do in MIDP since the MIDP UI is designed for mobile devices from ground up.
 
Fernando Sanz
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>> BTW, you can use native libraries in PJ or PPro
you mean, writing in Java, I can use some of Microsoft libraries?
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to write some sort of C/C++ wrapper methods around the native libraries and declare them "native" in your Java code. Yes, You will be able call them from within Java. Search the net for "Java Native Interface" or similiar terms and you will find many references.
 
Fernando Sanz
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, thanks a lot Michael!
I don't think I'm going to do it right now, first I'll try to get my GUI fully working, then (since I've got a deadline).
Still, it seems that it's something I'll need sooner or later, so I'll learn it anytime.
Thanks again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic