1

I want to call a number in below format using platformRequest:

platformRequest("tel:*123*33584744#");

But it gives me error Invalid number on the phone.

But if i call this number manually by typing on phone then it works fine. Even below works fine:

platformRequest("tel:33584744");

So i suspect problem lies when i put * or # chars in the number. As i said when i type these chars in the number manually and press the call button on the mobile it works fine but not with platformrequest.

What is wrong I am doing?

Any alternative to platformrequest method?

How to call a number in below format:

*123*33584744#

Details: CLDC 1.0, MIDP 2.0

Thanks

gnat
  • 6,213
  • 108
  • 53
  • 73
Sarfraz
  • 377,238
  • 77
  • 533
  • 578

3 Answers3

2

I found the solution myself:

I simply changed the text box type to:

mTextBox = new TextBox("Magic Dialler", "", 25, TextField.ANY);
// The below line does the trick !!
// 1: Adds Import From Contacts option
// 2: Adds Call button for calling just about any number with any special chars !
mTextBox.setConstraints(3);

http://sarfraznawaz.wordpress.com/2010/03/27/magic-dialler-my-first-j2me-application/

Sarfraz
  • 377,238
  • 77
  • 533
  • 578
  • Could you please provide the full source code after fixing it . I need to call a number with the following format number,number#number# – Reham Mar 03 '15 at 15:14
1

according to my and some others knowledge, you cannot use platformRequest to do network service requests (tel:*123*...). besides, there is no way to access the service reply from JavaME.

ax.
  • 58,560
  • 8
  • 81
  • 72
1

ax is right you can't give numbers starting with special characters in the request. But if i am understanding your problem, i have a workaround you can use DTMF post dial code for this. like:

("tel:123/p333584744#");

where /p for DTMF and first 3 where voice operator ask for number and after that number ends with #.for more information see

Vivart
  • 14,900
  • 6
  • 36
  • 74
  • I tried that on my Nokia N70 but it only called 123 part not rest of the number. Any ideas please? – Sarfraz Jan 19 '10 at 04:48
  • 1
    yes some problem is there in N70 if will first dial 123 after that it will prompt the user to confirm sending the DTMF, but the browser prompt is in the background and the user has to manually switch to that app in order to confirm. – Vivart Jan 19 '10 at 09:14