IngloriousApps's Blog

sweet apps for webOS

    • Edit
    • Delete
    • Tags
    • Autopost

    Am I in Glimpse?

    With the Developer's Cut of Glimpse, users can embed other external apps to be run as widgets in Glimpse. Now, a few Dev's have asked me "How do I detect if my App is embedded in Glimpse?", well, here's how to detect if your app is being 'glimpsed':
    I'm currently passing the launch parameter: {crossAppID: enyo.fetchAppInfo().id }
    So, you could have your launchParamsChanged function like this:

    launchParamsChanged: function()
    {
    this.iAmInGlimpse = false;
    if (this.launchParams)
    {
    if (this.launchParams.crossAppID)
    {
    if (this.launchParams.crossAppID.indexOf("ingloriousapps.glimpse")>0 )
    {
    //App is in Glimpse or in Glimpse Dev's Cut
    this.iAmInGlimpse = true;
    }
    }
    }
    }

    This is useful for devs that want to display custom UIs or functionalities, whenever their apps have been 'glimpsed'. You can also take a look at the cross-app launch parameters for Glimpse over here: http://www.webos101.com/Cross-App_Launching#Glimpse (in case you're thinking of doing something fancy).
    Keep in mind, apps with '"noWindow": true in their appinfo.json file don't play nicely in Glimpse. The CrossAppUI kind (which I'm using) isn't cut for that :(
    If you don't know what I mean by 'Developer's Cut of Glimpse', fireup Glimpse, go to the Help Menu, and click on 'View More Apps'
    • 6 December 2011
    • Views
    • 2 Comments
    • Permalink
    • Tweet
    • 2 responses
    • Like
    • Comment
    6 months ago DataJog (Twitter) responded:
    Icon_normal_normal
    Awesome and thank-you. Can't wait to get DataJog in there!
    6 months ago DataJog (Twitter) responded:
    Icon_normal_normal
    added a 'glimpesable' check and compact view! thanks I(A);
  • Inglorious Apps's Space

    Making Sweet Apps for webOS

    Archive

    2012 (4)
    April (1)
    January (3)
    2011 (16)
    December (2)
    November (1)
    September (1)
    August (2)
    July (1)
    June (4)
    April (1)
    January (4)
    2010 (7)
    November (1)
    October (1)
    June (3)
    May (2)
    2009 (4)
    November (1)
    September (1)
    July (2)
  • About Inglorious Apps

    Making Sweet Apps for webOS

  • Subscribe via RSS
  • Follow Me

Theme created for Posterous by Obox