Background Plugin

Discussion in 'Plugin Development' started by xmp, January 10, 2012.

  1. xmp

    xmp Portal Member

    Joined:
    October 20, 2011
    Messages:
    7
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Spain Spain
    Hello All,

    I’m new developing Mediaportal plugins so any help or advice is highly welcome.

    I’m developing a Plugin that will check the status of certain home automation devices (this requires a backgroung task that will be listening status updates and alarms). I’m developing another plugin that will show the state of all the available elements.

    I would like to know if it’s possible to show notifications(pop-ups) inside Mediaportal even if you are watching TV, Weather or if you are in any available plugin. For instance, suppose I get a water leakage event, I would like to show a pop-up showing alarm information and location. Is there any API in the Skin or Plugin to achieve this?

    Thanks in advance.


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Albert
    • Premium Supporter

    Albert MP2 Developer

    Joined:
    February 18, 2008
    Messages:
    1,297
    Likes Received:
    1,125
    Gender:
    Male
    Occupation:
    Dipl.-Inform.
    Location:
    Freiburg im Breisgau, Germany
    Ratings:
    +1,130 / 1
    Home Country:
    Germany Germany
    AW: Background Plugin

    Note that you're in a forum for MediaPortal 2, so my answer is for MediaPortal 2 only.

    About your question: Yes, we have an API for that, the interface is called INotificationService and a corresponding service is registered in the ServiceRegistration of the UI part.
    Skin devs decide if and where they show notifications; the current skins don't show notifications in the fullscreen media screens. But that is a good hint, I think we should change that.

    For the other tasks you mentioned, there are several services which help you. Especially you could need the ITaskScheduler or the IThreadPool, if you need to poll your automation devices. Your plugin should implement IPluginStateTracker where you can track the lifetime of your plugin. You can also check ISystemStateService to get updates about the system's state.
     
    • Like Like x 1
  4. xmp

    xmp Portal Member

    Joined:
    October 20, 2011
    Messages:
    7
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Spain Spain
    Hi Albert,

    Thanks for your help. I need to set up a demo with this working with additional third party plugins so I'll check the Mediaportal 1 forum to see if it can be done with the current release.

    Your help has been enough to finish the background plugin, so now I just need to show the pop up messages.

    Thanks for your help.

    PS: Is there any way to easily set up (install) MP2 running with live TV, Streaming and so on? Starting from the scratch can be difficult for a beginner!!
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  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
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!