How to show an tray icon with a Google Packaged Ap

2019-02-20 01:48发布

问题:

I'm trying to create a tray icon for my Chrome Packaged App (an icon in the system status bar). Like the Google Hangout extension do, I want the app to make something (open a menu) when the user click the icon.

After some search, I've found this : https://docs.google.com/document/d/1QhhfR33Y28Yqnnoa_Sl3fnZK_mKtwt4dZe6kNyJ_MjU/edit It seems to be an old project from the chromium team of an experimental API that is doing what I'm searching. But it's not working for me. (Is it really for Packaged App ?)

If it's can't be done for an Packaged App, it's not really a problem for me, I can switch to a Chrome Extension. But I can't find do for extension either.

I think that if the Hangout extension can do this, I can do this too but I don't find anything on it.

Thank you for your help !

回答1:

As explain here, there is a solution (chrome dev-channel only for now).

It works for both apps and extensions.

See the Chrome bug here : https://code.google.com/p/chromium/issues/detail?id=142450 And two example here : https://code.google.com/p/chromium/codesearch#chromium/src/chrome/test/data/extensions/api_test/system_indicator/

Thanks @Sergey Shevchenko for his help.