as per my knowledge the ENDCALL key for dial intent is not working

On Oct 23, 2:00 pm, Nemat <[email protected]> wrote:
> Hi,
>
> I am trying to disconnect anoutgoingcallprogrammatically by
> injecting END key.but it gives Security Exception.Even I've added
> INJECT_EVENT permission.Here is my code:
>
> Handler handler;
>   Thread t = new Thread() {
>             Object sync = new Object();
>             public void run() {
>                 Log.d( LOG_TAG,"Creating handler ..." );
>                 Looper.prepare();
>                 handler = new Handler();
>                 Looper.loop();
>                 Log.d( LOG_TAG, "Looper thread ends" );
>             }
>         };
>         t.start();
>
> handler.post( new Runnable() {
>                                 // Log.d( "Generate key","Generating keys 
> w/inst..." );
>                 public void run() {
>                          Log.d( "111111111111","11111111111111111111111" );
>                     Log.d( "Generate key","Generating keys w/
> inst..." );
>                     Instrumentation inst = new Instrumentation();
>                     inst.sendKeyDownUpSync
> ( KeyEvent.KEYCODE_ENDCALL );
>                 }
>             } );

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to