A Doubt in Making a Phone call to other Mobile Devies using J2ME
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sri_Ramu
Posted On:   Friday, January 7, 2005 08:43 PM

hello Professional, sir/ mam , My name is SriRamu SR. studying (Final Year Engg)B.E (CSE) in Karunya Institute of Technology, Coimbatore, Tamil Nadu, India. I'm doing my Major Project to my College in the Mobile Security area. In that, I'm have one doubt in using the urls of telephone numbers . In my project, I have to do a module of making a call to other mobile Device. I chosed J2ME platform. In that platform, I can use the platformRequest method in the MIDlet class , for making a phone call to the mobile devices. But when I did tht its showing the Run-time Error that "PlatformRequest is not configured.". I donno where the Problem will be ...    More>>

			
hello Professional,

sir/ mam , My name is SriRamu SR. studying
(Final Year Engg)B.E (CSE) in Karunya Institute of
Technology, Coimbatore, Tamil Nadu, India. I'm doing my
Major Project to my College in the Mobile Security area.
In that, I'm have one doubt in using the urls of telephone
numbers . In my project, I have to do a module of making a
call to other mobile Device. I chosed J2ME platform. In
that platform, I can use the platformRequest method in the
MIDlet class , for making a phone call to the mobile
devices. But when I did tht its showing the Run-time Error
that "PlatformRequest is not configured.". I donno where
the Problem will be ... in the Documents of the J2ME
toolkit , the Syntax of the platformRequest method is
given as


public final boolean platformRequest(String URL)
throws ConnectionNotFoundException



I wrote the code in such a way that it can catch the
exception . My code as follows :

try
{
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 sir / mam.
I'm bit trouble in making that logic a success one . plz
send me reply . plz give me a soln to solve this
problematic code.


Urs
Sincerely,
Sri Ramu SR.

   <<Less

Re: A Doubt in Making a Phone call to other Mobile Devies using J2ME

Posted By:   Anonymous  
Posted On:   Wednesday, January 26, 2005 09:37 PM

Hi,


Have you tried on Device? I created simple Midlet with this method and it's working fine. Iam able to make a call. I haven't done any settings. But in Emulator platformRequest() method returning false still working on device.
Just try to load into any J2ME Device which suports MIDP2.0.
Iam not seeing any problem in u'r code other than "+" sign. Remove that and try. for local calling number no need +.





here is my code u can check this.




import javax.microedition.lcdui.Display;


import javax.microedition.midlet.*;


import javax.microedition.lcdui.*;


public class PhoneCall extends MIDlet{


String _phoneNum,_message;


boolean _results;


public void PhoneCall(){

}


public void startApp()
{
_phoneNum = getAppProperty("PHONENUM");
makePhoneCall();
inputForm();
}


public void pauseApp()
{
}


public void destroyApp( boolean unconditional )
{

}


void makePhoneCall() {


_message ="in make phonecall";


try {


_results = platformRequest(_phoneNum);


if(_results)
_message = "Connection is ok";


else
_message = "Connection is fail";



}catch(IllegalArgumentException e){


System.out.println("IllegalArgument Exception :" +e.toString());


}


catch(Exception e) {
System.out.println("Exception: "+e.toString());


}

}


private void inputForm(){


Form _inputForm = new Form("Make Phonecall");


_inputForm.append("Phone call Result : "+_message);


Display.getDisplay( this ).setCurrent(_inputForm);





}


}





Seenu
About | Sitemap | Contact