title: Get number from dial in Android?
body: <p>I am working on an application in which I have to make call from my application using my PHP server.</p>
  
  <p>I have a condition in which, whenever user presses the Green call button of Android Device and after dialing number, <strong>I have to give user an option to call from my App or normal SIM</strong>. I have done that too.
  Now <strong>I want to get the number which I have dialed on the dialer before switching to the application</strong>.</p>
  
  <p>Means if User selects my application to call then I must have number dialed on the phone Dial. </p>
  
  <p>I am using the below code to generate the pop up to use my application for calling. The code is written as Intent filter in my manifest inside the specific activity.</p>
  
  <pre><code>&lt;activity
              android:name="com.tv.longdistcall.PlaceLongDistCall"
              android:screenOrientation="portrait"
              android:theme="@android:style/Theme.NoTitleBar" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.CALL_BUTTON" /&gt;
  
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.CALL_PRIVILEGED" /&gt;
  
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
  
                  &lt;data android:scheme="tel" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  </code></pre>
  
  <p>Please suggest me, how to <strong>get the number dialed on the dialer</strong> before switching to the activity.</p>