Win a copy of Getting started with Java programming language this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to differs emulator and real devices from a midlet?  RSS feed

 
Agung Gandhi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is there a code or function that make my midlet knows on what is it running? is it an emulator or a real device? I need it to make my midlet only runs on a real device, if it is ran on an emulator it won't execute some actions.
Thank you
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, the Wireless toolkit pretty much has all the J2ME APIs including newer JSRs, so all the "Actions" should work. I don't think an actual user will run it on an emulator, and wouldn't worry about adding code that tries to determine where it is running, and which I doubt you would be able to find out.

Mark
 
Agung Gandhi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark for your reply. My midlet has to communicate with server in a certain way, and in order to hide the format data and the protocol i'm trying to make my midlet won't run in an emulator, because in some emulator someone can see datas which being sent or received. I'm just trying to protect my server from an unresponsible person
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!