title: Emergency Calling
body: <p>I am trying to design a system of android, in which emergency call can be placed on the number of my desire. I have an interface for patients, in my interface I have placed a button for emergency call to the doctor, if they start feeling sick then on a single button click, a call be placed to the doctor.</p>
  
  <pre><code>public void callDoc(View v)
      {
          Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("myNumber"));
          intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_NO_USER_ACTION);
          startActivity(intent);
      }
  </code></pre>
  
  <p>This is what I have tried so far. Is it possible to test this on localhost? I am not getting the desired result. This is my logcat.</p>
  
  <pre><code>04-06 11:07:16.925: W/dalvikvm(1786): threadid=1: thread exiting with uncaught exception (group=0x40015560)
  04-06 11:07:16.965: E/AndroidRuntime(1786): FATAL EXCEPTION: main
  04-06 11:07:16.965: E/AndroidRuntime(1786): java.lang.IllegalStateException: Could not execute method of the activity
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at android.view.View$1.onClick(View.java:2144)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at android.view.View.performClick(View.java:2485)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at android.view.View$PerformClick.run(View.java:9080)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at android.os.Handler.handleCallback(Handler.java:587)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at android.os.Handler.dispatchMessage(Handler.java:92)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at android.os.Looper.loop(Looper.java:130)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at android.app.ActivityThread.main(ActivityThread.java:3683)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at java.lang.reflect.Method.invokeNative(Native Method)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at java.lang.reflect.Method.invoke(Method.java:507)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at dalvik.system.NativeStart.main(Native Method)
  04-06 11:07:16.965: E/AndroidRuntime(1786): Caused by: java.lang.reflect.InvocationTargetException
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at java.lang.reflect.Method.invokeNative(Native Method)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at java.lang.reflect.Method.invoke(Method.java:507)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at android.view.View$1.onClick(View.java:2139)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     ... 11 more
  04-06 11:07:16.965: E/AndroidRuntime(1786): Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.CALL dat=03325465573 flg=0x10040000 }
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1409)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at android.app.Activity.startActivityForResult(Activity.java:2827)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at android.app.Activity.startActivity(Activity.java:2933)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     at com.edps.EmergencyActivity.callDoc(EmergencyActivity.java:22)
  04-06 11:07:16.965: E/AndroidRuntime(1786):     ... 14 more
  04-06 11:07:19.613: I/Process(1786): Sending signal. PID: 1786 SIG: 9
  </code></pre>