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'