B4J Library jSystemTray - Add icons to the system tray (notifications)

Discussion in 'B4J Libraries & Classes' started by Erel, Feb 6, 2014.

  1. Erel

    Erel Administrator Staff Member Licensed User

    With this library you can add system tray icons and handle their events.

    This is useful for applications that should run in the background and still allow the user to interact with.

    [​IMG]

    Tray icons have two events: DoubleClick and MenuClick. The menu appears when the user right clicks on the icon.

    Usually when the user closes the last form the process exits. The process will however keep running if there is at least one visible tray icon.

    This library is an internal library now. If you don't see it in the IDE then you can download it here: https://www.b4x.com/android/forum/threads/updates-to-internal-libaries.48274/#post-441231
     

    Attached Files:

    Last edited: Jul 31, 2016
  2. Pascual Pérez

    Pascual Pérez Member Licensed User

    Fantastic Erel, i really needed this, thank you very much.
     
  3. Gabino A. de la Gala

    Gabino A. de la Gala Active Member Licensed User

    +1
     
  4. GMan

    GMan Well-Known Member Licensed User

  5. lemonisdead

    lemonisdead Well-Known Member Licensed User

    Wow thanks Erel
     
  6. Abderrazzak

    Abderrazzak Member Licensed User

    thanks Erel
     
  7. jmon

    jmon Well-Known Member Licensed User

    thanks, very easy to use. May I suggest adding a blink (or flash) tray icon option? that would be great to attract the user's attention.
    thanks.
     
    qkb 75 likes this.
  8. Erel

    Erel Administrator Staff Member Licensed User

    You can easily implement it in your project. Add a transparent icon and use a timer to replace the icon.
     
  9. Pascual Pérez

    Pascual Pérez Member Licensed User

    Erel, would it be possible to implement the event SingleClick? i use a tray icon as a toggle to hide/show a window. Thank you.
     
  10. Pascual Pérez

    Pascual Pérez Member Licensed User

    Is there a way to show a notification balloon in the tray icon?
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    There isn't any "automatic" way to do it. You can create an undecorated form and then show it as a notification. Though it will not be simple to find the correct position.
     
  12. Gabino A. de la Gala

    Gabino A. de la Gala Active Member Licensed User

  13. Erel

    Erel Administrator Staff Member Licensed User

    I haven't tried it. If you can try it and report...
     
  14. jmon

    jmon Well-Known Member Licensed User

    Johan Hormaza and Pascual Pérez like this.
  15. Gabino A. de la Gala

    Gabino A. de la Gala Active Member Licensed User

    I have used it in a DUCKDNS monitor joining tray icon, timer, configuration local storage, etc.

    The result is like this:
    EjemploGlobo.jpg
     
  16. Pascual Pérez

    Pascual Pérez Member Licensed User

    jNotifications is just what i needed, thank you very much jmon.
     
  17. Pascual Pérez

    Pascual Pérez Member Licensed User

    It would be possible that the notification appears above all other windows (topmost in desktop) ?
     
  18. GMan

    GMan Well-Known Member Licensed User

    Mine appears on top
     
  19. Pascual Pérez

    Pascual Pérez Member Licensed User

    I think it appears only above the Owner form, defined when calling .Initialize()
     
  20. Erel

    Erel Administrator Staff Member Licensed User

    JavaFX v2 doesn't provide a global on top feature. It might be possible with a library that creates a Swing window.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice