You cannot ...

On May 2, 6:22 pm, mike <[email protected]> wrote:
> hi guys,
>
> i'm getting the outgoing number using BroadCastReceiver and then
> starts a Activity.
> but my activity runs in the background???  how can i bring it to
> foreground??
>
>         public void onReceive(Context context, Intent intent) {
>                 // TODO Auto-generated method stub
>                 this.context = context;
>                 // this.intentttt = intent;
>                 // String s = intent.getAction();
>
>                 if (intent.getAction()
>                                 
> .equalsIgnoreCase(Intent.ACTION_NEW_OUTGOING_CALL)) {
>                         phonenbr = 
> intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
>                         intent = new Intent(context, OutGoing.class);
>                         intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
>                         intent.putExtra("Number", phonenbr);
>                         context.startActivity(intent);
>                 } else {
>                         telManager = (TelephonyManager) context
>                                         
> .getSystemService(Context.TELEPHONY_SERVICE);
>                         telManager.listen(new StateListener(),
>                                         PhoneStateListener.LISTEN_CALL_STATE);
>                 }
>         }
>
> regards,
> Rrandika
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
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