Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to close Network reply alert Dialog from background service in android?
    primarykey
    data
    text
    <p>Hi All i am working an callforwarding app. </p> <p>so here my requirement is that i will give the user to set one number to callforwarding at particular time with 10 minutes intervals . After set number he will close his APP. But after 10 minutes call should forward to particular number. </p> <p>So for that purpose i use background service. </p> <p>My code is for forwarding is </p> <pre><code>private synchronized void callFunction(String phonenumber) { Intent intentCallForward = new Intent(Intent.ACTION_CALL); // ACTION_CALL intentCallForward.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Uri uri2=null; try{ uri2 = Uri.fromParts("tel", phonenumber, "#"); intentCallForward.setData(uri2); startActivityForResult(intentCallForward, 6666); //startActivity(intentCallForward); }catch (Exception e) { // TODO: handle exception }finally { if(uri2!=null) { uri2=null; } intentCallForward=null; } } </code></pre> <p>Tthis code is working fine when time reach it automatically set forwarding </p> <p>My problem is that after i request forwarding, network provider will give me reply with meaning full message <strong>Alert Dialog</strong> like following image </p> <p>But my service is calling in 1 hour 12 times. and i got 12 Alerts. That alerts block user home screen after click <strong>OK</strong> then only it will open home screen</p> <p>If one message ok but if make a call 50 times i got 50 messages. It is hard to click on OK button in 50 times.</p> <p>So is it posible to close that <strong>Network replay alert Dialog</strong> Pragmatically from Background service? </p> <p>Thank in advance</p> <p><img src="https://i.stack.imgur.com/geD9P.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload