title: Android automatic call and cut after connect
body: <p>In my android application, I wanna call a person from the application and drop the call if the call get connected successful ( after 2 rings or so ). I can call to the number via this but is there any way to drop the call and get the event after 2 rings or a single ring ?</p>
  
  <p>My calling code looks like</p>
  
  <pre><code>String posted_by = "1234567890";
  
           String uri = "tel:" + posted_by.trim() ;
           Intent intent = new Intent(Intent.ACTION_CALL);
           intent.setData(Uri.parse(uri));
           startActivity(intent);
  </code></pre>
  
  <p>I am new to android
  Please help, Thanks in advance</p>