title: How to show alert dialogs at any time on a high-frequency live card?
body: <p>I'm working on Glassware that needs to be able to display alert dialogs at any time during the lifespan of the Glassware. As can be seen on <a href="https://developers.google.com/glass/develop/gdk/card-design?hl=de#alert" rel="nofollow noreferrer">Google's GDK development guide</a>, this requires a valid <code>Context</code> object. However, I'm using the high-frequency live card design paradigm, and thus it uses a <code>Service</code> (rather than an <code>Activity</code>) as its main class. If I try to pass the service as the context to the alert dialog constructor, I get a <code>BadTokenException</code>.</p>
  
  <p>Is there a recommended way to show alert dialogs at any time with this type of Glassware? I have been able to show them successfully from the Glassware menu, since the menu is indeed an activity with a usable context object, but I need to be able to show alerts when the menu is closed, too.</p>
  
  <p>For the record, I have been able to find a couple of possible solutions that seem pretty hacky: create a separate dialog-themed activity, or use a system alert, as seen in the top two posts <a href="https://stackoverflow.com/questions/7918571/how-to-display-a-dialog-from-a-service">here</a>. I'd rather avoid these if there's a better way to do it.</p>
  
  <p><strong>Edit:</strong>
  I've accepted the one answer given so far, but if anyone does know of a more "official" way to do it, please post a second answer and I'll probably accept it instead.</p>