2

I want to forward calls in a simple way, just by clicking a button.

Forwarding the call is done by dialing a GSM service code. However, after doing this, a popup window appears that tells if the action was successful or not.

Is there any way to suppress or close this popup window programmatically?

David Scherfgen
  • 333
  • 3
  • 13

2 Answers2

2

This answer is for those who come to this question meaning a self-started popup window. Make a class member variable for the popup window.

PopupWindow popupWindow;

Assuming it was initialized and shown previously, it can be closed as necessary with

if (popupWindow != null) {
    popupWindow.dismiss();
}

See this Q&A for more.

Community
  • 1
  • 1
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
2

If you're asking about USSD codes used by GSM/UMTS than no, there's no way to suppress or close the confirmation popup.

The API was requested in the ticket below, but remains unresolved:

http://code.google.com/p/android/issues/detail?id=1285

Mariusz Jamro
  • 30,615
  • 24
  • 120
  • 162