One idea:
Try using an intermediary Activity that is lightweight & completely
transparent, it handles the decision as to whether to show the Toast
message or instead of "starting" your App (seems your App is already
started, though, since you've created a QSB...).

On Mar 15, 11:32 am, ClarkBattle <[email protected]> wrote:
> When a user clicks on a cached Quick Search Box shortcut it takes the
> user to an activity that they should not see if they are in airplane
> mode.  I would like to show them a toast or a notification from within
> the QSB, without showing my app.  The message will be "You can not
> view this content while offline".
>
> If I simply show a toast from my QuickSearchActivity.onCreate(), then
> finish() it shows the toast over my app.  I want it to show the toast
> over the QSB.  Even if I put the finish() in the onResume() or put it
> in a postDelayed() it still shows the app.  Strange.  If it is
> possible to show a toast over the QSB in response to an item being
> clicked then how do you do it?
>
> If you cant show a toast over the QSB then a notification is
> acceptable.  However, I still need to NOT show my app (and not change
> its activity stack if it is running in the background).
>
> Basically I need my Activity to just notify the user through a toast
> or notification and stay in the background, never showing itself.
> How?
>
> Thanks

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