Plugin "communication" (1 Viewer)


Portal Pro
October 4, 2006
Denmark Denmark
I have been build the NotificationBar plugin which should be able for all other plugins to use.

But now im stuck with an "error"/understanding issue.

When a plugin developer uses the NotificationBar plugin like this (references the NotificationBar.dll file):
public class ProgressBarExample
        MPNotificationBar.INotification _Notification;
        public ProgressBarExample()
            //Add notification to NotificationBarManager
            _Notification = MPNotificationBar.NotificationBarManager.AddNotification(111111, "Downloading...", MPNotificationBar.NotificationBarManager.Types.Information, true, true);
This will work fine when NotificationBar plugin is installed, but will crash at the AddNotification line if not installed.

Is it possible (how?) to make the plugin to skip this if notificationbar not installed?
OR is there a better way to develop this kind of "communication" with dll which may/may not exists?

I hope you can help me finding a solution so it may be easier for other plugin developers :)
Last edited:


Development Group
  • Team MediaPortal
  • September 27, 2009
    Netherlands Netherlands
    Country flag
    Besides that, you have to be aware of the fact that if you call a method or class which uses a type that is in the not-installed assembly, that method will generate an exception. So my solution is to put all references to that assembly in separate (private) methods, and put a try/catch around the invocation of those methods

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    joecrow 1.25.0 Radio Time plugin fails after Resume from Sleep with MP 1.25 Bugreports 4
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    E aktuelle englische Forums Webseite von - Showtime Plugin v3 Plugins & Erweiterungen 4
    mrmojo666 [Tv Server Plugin ]Direct Show Video Control Plugin for Hauppauge PVR cards MediaPortal 1 Plugins 0
    joecrow MultiShortcut Plugin (Uavailable) in DWHD skin General Support 58
    vapourEyes Building TV Plugin General Development (no feature request here!) 49
    Golf4 Nach Windows-Updates läuft TV-Plugin nicht mehr Allgemeines Support- und Diskussionsforum 0
    joecrow How about a Launcher plugin for MP1? MediaPortal 1 6
    D [solved] TVServer Plugin must be missing something. General Development (no feature request here!) 1
    framug Nouveau plugin XmlTvFR pour récupérer le guide télé français Kazer / ZguideTv (WebEPGfr) 11
    emphatic Allow remote control mapping of all plugins Improvement Suggestions 0
    D Where should plugins be located on hard drive? General Support 0
    D how to disengage from one version of a plugin to use another Newcomers Forum 0
    cbr954rr How to disable a pre-configured plugin? General 2
    mrmojo666 [Plugin]Marantz Control Plugin MediaPortal 1 Plugins 2
    mrmojo666 beginner: trying to write a plugin, need help to catch event General Development (no feature request here!) 3
    framug [Rejected] Fix PowerScheduler plugin for MP2 single seat Submit: Code Patches 9
    doskabouter [Question] Stale plugins Developer Discussions 9
    M MP1 stops responding after Starting Plugins General Support 14
    Terra LAVFilter Plugin cannot be updated (MP1.23) MediaPortal 1 Plugins 10
    L Mediaportal 1.21 and Windows 10: user schedules de-activated when powerscheduler plugin is selected General Support 1
    C Can the XmlTv Plugin handle 600+ channels? General 3
    M Online Video Plugin V.2.32 keine Installtion unter MediaPortal 1.22 ? TV / Streaming 3
    emphatic Pictures in the cloud - would a plugin be possible for services like Google Photos MediaPortal 1 Plugins 1
    C where is the Online Videos plugin General Support 1
    Similar threads

    Top Bottom