Ok! I finally figure it out! Although I didn't really understand why it worked but using the following code symbols like # are passing to DIAL & CALL Action.
String uri = "**21*306935160000000#"; // ##21# Intent intent = new Intent(Intent.ACTION_DIAL); // ACTION_CALL Uri uri2 = Uri.fromParts("tel", uri, "#"); intent.setData(uri2); startActivity(intent); On Jun 17, 1:15 pm, madlymad <mando7s...@gmail.com> wrote: > Hi there, > > I am trying to make an app that will allow the user to forward his > calls to voicemail and also disable that option. > > In order to do that I am trying to dial > **21*306935160000000# for activating the call forward > and ##21# for deactivating > > If you try that straight to the keypad the commands work perfect but > trying to pass them through the Intent extras I am loosing symbols > like # and the call does not work. :( > > Is there any walk-around to dial whatever you want? > > I both tried ACTION_DIAL andACTION_CALL > String uri = > "**21*306935160000000#"; // ##21# > Intent intent = new > Intent(Intent.ACTION_DIAL); //ACTION_CALL > > intent.setData(Uri.parse(uri)); > startActivity(intent); > At uri = "**21*306935160000000#"; the passed number = > **21*306935160000000 so you lose the # and at the case of ##21# the > number is * (just a star symbol) > In the option ofACTION_CALLafter the call you get an not acceptable > MMI code but I am sure that if you manage to pass the number right it > will work. > > Any ideas? > Thanks in advance, sorry for the long post. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en