简体   繁体   中英

Service codes in PhoneCallTask WP7?

I want to use PhoneCallTask for using some services from my cellular provider in other words I want to be able to dial #1234* within code

if this isn't available yet is there anyway to do that by any other way

I need it urgently

This is deliberately not available as part of the security considerations and principles designed into the phone.

If it were possible to get the response to such commands then it would be possible to get someones phone/cell and IMEI numbers without their knowledge or permission. With these you coudl do some very nefarious things.

If you really need this urgently then you're stuck. In future I'd recommend finding out what is possible with a platform before you starting building an application.

As you haven't included any code I'm going to assume that you've not tried anything yet.

So this code may help

PhoneCallTask phoneCallTask = new PhoneCallTask();

phoneCallTask.PhoneNumber = "#1234";
phoneCallTask.DisplayName = "Service Number";

phoneCallTask.Show();

I've not been able to try this to see if it works with that input, so it may be an issue with the "PhoneNumber" field if that does not work

EDIT:

Don't forget to add

using Microsoft.Phone.Tasks;

As far as I'm aware these are operations that are stored on the SIM card and have nothing to do with the layer of Windows Phone you have access to. In other words, the ISO standard (im guessing) for cellular interconnected devices will require a device to handle certain requests (such as typing *#06# to display the devices IMEI number). Thus it is likely that you will not be able to interact with these calls. You won't be able to make the phone think your App is making a request it knows can only come from the SIM card due to the way the OS sandboxes various services.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM