Judging from the name of the class, maybe it is an attempt to stop an
SMS by working with android.provider.Telephony.SMS_RECEIVED?

Unrelated, but does Toast#setDuration even work with raw numbers like
that? I thought it takes one of two constants for long or short. I
guess the name and documentation could be clearer there, though.

On Mar 11, 9:15 pm, Indicator Veritatis <[email protected]> wrote:
> You really need to include more information in your posts before you
> can expect a good answer. Not only was Dianne fully justified in
> asking, "what did you expect it to do", but you also failed to tell us
> what it did instead. Nor have you given us enough info to duplicate
> whatever the problem was.
>
> This is not a quiz group. Based on the meager information you have
> supplied we can only guess, which is usually a waste or your time and
> ours.
>
> That said, my guess is that you forgot: abortBroadcast() only works
> with an ORDERED broadcast. You probably sent it a non ordered
> broadcast, e.g., via Context.sendBroadcast().
>
> Or you might have forgotten something else: you might have forgotten
> that 'abortBroadcast' only sets a flag. You then have to wait for the
> actual abort to happen.
>
> Or are you not even seeing the Toast at all? In that case, there is
> nothing wrong with abortBroadcast: you just don't even GET the
> onReceive event. But that you will have to debug on your own.
>
> On Mar 10, 10:34 pm, Thiri Yee <[email protected]> wrote:
>
> > abortBroadcast didn't work. Why?
> > Code is as follow
>
> > public class SMSReceiver1 extends BroadcastReceiver
> > {
> >         @Override
> >         public void onReceive(Context context, Intent intent)
> >         {
> >                 this.abortBroadcast();
> >                 Toast tag = Toast.makeText(context, "Abort Broadcast!!!",
> > Toast.LENGTH_LONG);
> >                 tag.setDuration(30);
> >                 tag.show();
>
> > --> Please reply me as soon as possible.

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