Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Configuring the MIDlet.platformRequest() in J2ME Toolkit

 
sri ramu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,

I just tried calling a mobile device from another.... In documentation, they defined that we can do using a static function platformRequest() in MIDlet class... while trying that, I got an message in my J2ME Toolkit "platformRequest is not configured" like that... i donno whether to set something in the settings.... i enabled all the optional package use... or else is there any to make a phone call through a mobile device to another?.. if there exist, can anyone help me in tht ...

In the Documentation of the J2ME toolkit , the Syntax of the platformRequest method is given as
public final boolean platformRequest(String URL)
throws ConnectionNotFoundException

My code as follows :

try
{
//I set the phone number like 5550000 in settings
boolean b = platformRequest("tel:+5550000");
}
catch(ConnectionNotFoundException e){System.out.println("Caught Exception inside "+ e);}

so , I donno where the Problem lies. Is that compulsory to do some Security permissions in the setting of the J2ME toolkit. If so can U plz tell that procedure. I'm bit trouble in making that logic a success one .

contact E-Mail :- sriramusr@yahoo.co.in
contact number :- +91 94430 14916

--Posted by SriRamu SR.
 
Ed Schepis
Greenhorn
Posts: 25
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sri Ramu,
to make it work just add below lines to system.config file in wtk lib dir

# platform request
com.sun.midp.midlet.platformRequestCommand: "C:\Program Files\Opera\opera.exe"

Here the command is to launch opera browser and you can use it with the statement:
platformRequest("http://www.something");


Cheers
 
jyoti parikh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ed Schepis wrote:Hello Sri Ramu,
to make it work just add below lines to system.config file in wtk lib dir

# platform request
com.sun.midp.midlet.platformRequestCommand: "C:\Program Files\Opera\opera.exe"

Here the command is to launch opera browser and you can use it with the statement:
platformRequest("http://www.something");


Cheers


thnks so much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic