Adding Plugin with specified Variable without CLI?

4 posts, 0 answers
  1. Christopher
    Christopher avatar
    16 posts
    Member since:
    Jan 2015

    Posted 12 Jul Link to this post

    Hey so I was trying to install the phonegap-push-plugin

    https://github.com/phonegap/phonegap-plugin-push

    Followed the Installation guide, which says do this:

    phonegap plugin add phonegap-plugin-push --variable SENDER_ID="XXXXXXX"

    or 

    cordova plugin add phonegap-plugin-push --variable SENDER_ID="XXXXXXX"

    Now since I normally add my plugins via Import Plugin within VisualStudio, I didnt really know where I could set this SENDER_ID Variable.

    I already tried this in my config.xml

     <plugin name="phonegap-plugin-push" version="~1.6.0" src="https://github.com/phonegap/phonegap-plugin-push">
              <param name="SENDER_ID" value="4............2" />
            </plugin>

    Which didnt help at all, I also tried doing it with the Cordova CLI, which tells me my Project is not Cordova based.

    So where can I actually set variables and extra stuff like that when installing plugins?

    Regards Chris

     

  2. Preslav
    Admin
    Preslav avatar
    51 posts

    Posted 14 Jul Link to this post

    Hi Christopher,

    Thanks for contacting us.

    To install the phonegap-push-plugin you can consult with this section and follow these steps:
    • Download the plugin as a ZIP from GitHub.
    • In the Solution Explorer, right-click Plugins and select Import Plugin.
    • Navigate to the zipped plugin package and select it.
    • In the Solution Explorer, double-click Properties.
    • Locate your plugin in the Other Plugins section.
    • Click + for the newly added plugin to expand its configuration options.
    • Click Configure.
    • Select the build configuration to which you want to apply the plugin variables.
    • Provide values for the listed variables and click Close.
    • Press Ctrl+S to save your changes.

    I would also recommend that you check the Telerik Verified PushNotification Plugin, which provides similar functionality. This plugin is tailored to the specifics of the Telerik Platform Push Notification services and is a good choice when using those. You can see how to install a verified plugin here - make sure to select Visual Studio as the IDE at the top of the article.

    If you have any further questions do not hesitate to write back.


    Regards,
    Preslav
    Telerik by Progress
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
  3. Christopher
    Christopher avatar
    16 posts
    Member since:
    Jan 2015

    Posted 15 Jul in reply to Preslav Link to this post

    Hey,

    Thanks for the answer, I tried as you described, but somewho when I got to Properties and Other Plugins, I see the Plugin and it is showing as ON but lightblue, saying on hover that this Plugin is not enabled, therfor the Configure button is disabled... When I build the App the Plugin is working so it is kinda weird.

  4. Preslav
    Admin
    Preslav avatar
    51 posts

    Posted 19 Jul Link to this post

    Hello Christopher,

    There are three types of plugins in the Telerik Platform - Core, Telerik Verified and Custom. Using the Import Plugin functionality in AppBuilder, you are actually adding a custom plugin to your project. This means that, this plugin will be ON until you remove it from the Plugins folder of your project. In other words, you cannot disable it from the Properies page and that's why it is showing 'ON' as light-blue.

    About the Configure button, if it is disabled, either the plugin doesn't meet the Plugman requirements or it doesn't use plugin variables.To make it more clear, I want to mention that the Phonegap Push plugin needs configuration so when imported, its Configure button should be enabled. The Telerik Verified PushNotification Plugin however, doesn't need such configuration, therefore it's button should be disabled.

    The above said, is it possible that you have added the Telerik Verified Push Notifications plugin in your AppBuilder project instead of the Phonegap one? Additionally, I'll be happy to continue my investigation, but for that purpose I'll need a demo AppBuilder application that clearly reproduces the issue. I hope you can share such and I'm looking forward to your reply. 

    Regards,
    Preslav
    Telerik by Progress
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top