On Tuesday, September 2, 2014 11:59:19 AM UTC-7, Prateek Jadhwani wrote: > Hi Ben, > > > Thanks for the reply. I do not want to open the app in a new browser tab, > What about the apps associated with the Home Screen app. Would it be possible > to use a similar mechanism to do that ? If yes, what section of the Home > Screen app should I refer to. > > > > > Secondly, the master branch fails to open a new app from the Home Screen app > in 2.0. So, is it a known issue? Or is supposed to work that way in > Simulator. I do see the binding on the html of those icons. I click on them, > the css class for opacity get added to the icons, but the app associated with > that does not open. > > > > > I am not sure if those two are related. Sorry for the trouble. > > > Thanks > > > Prateek Jadhwani > > > www.prateekjadhwani.com > > > > On Tue, Sep 2, 2014 at 2:29 PM, Ben Francis <[email protected]> wrote: > > > > > > > > Hi Prateek, > > It does sound like you're describing a hyperlink! > > If the app you're linking to is a hosted web app with a URL which can be > loaded in a browser tab then simply creating a hyperlink with <a > href="http://app.com" target="_blank"> or calling > window.open('http://app.com, '_blank') in JavaScript will open it (in a new > tab in the browser app in 2.0 and in a new browser window in the window > manager in 2.1). > > > > > However, if you want to deep link into an installed app then I'm afraid that > isn't currently possible. This requires the concept of "app scope" so that > it's possible to hyperlink between apps. The specific feature you're looking > for is covered by bug 996039 [1] which unfortunately doesn't seem like it > will make it into 2.1. > > > > > If you control both apps you may be able to work around the issue with Web > Activities [2], but that is a bit of a hack. You could also embed the second > app inside the first app inside an iframe or pop it up as a popup window by > calling window.open() without '_blank' as an argument, but it won't behave > like a separate app. > > > > > > > 1. https://bugzilla.mozilla.org/show_bug.cgi?id=996039 > 2. https://developer.mozilla.org/en-US/docs/Web/API/Web_Activities > > > > > > > > > > > > > > > On Tue, Sep 2, 2014 at 2:58 PM, Prateek Jadhwani <[email protected]> wrote: > > > > Hi there, > > > > I have this app, which needs to open another app, and minimize the current > app. Its like you have a link to the app and when you click on it, it opens > it. How to do that in FF OS app? Would creating a href link a good idea? If > not, then what is the correct way to do it? > > > > > > > Thanks > > _______________________________________________ > > dev-b2g mailing list > > [email protected] > > https://lists.mozilla.org/listinfo/dev-b2g
The mozApps API can do this: https://developer.mozilla.org/en-US/docs/Web/API/Navigator.mozApps It's open for privileged ocntent _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
