使用自定义插件的Telerik AppBuilder

使用自定义插件的Telerik AppBuilder,telerik,cordova-plugins,telerik-appbuilder,Telerik,Cordova Plugins,Telerik Appbuilder,我最近开始与Telerik的AppBuilder一起开发应用程序,但遇到了一件我不确定的事情。我在我的项目()中添加了一个自定义插件,它似乎可以工作(它现在显示在我的解决方案中的一个Plugins文件夹下),但我不知道如何从中引用脚本等等。根据Telerik文档(),他们说要在plugin.xml文件中添加包含任何内容的内容,但是这个插件没有 关于我如何引用他们的脚本以便开始使用它,有什么想法吗?我是直接引用Plugins/cordova plugin local notifications m

我最近开始与Telerik的AppBuilder一起开发应用程序,但遇到了一件我不确定的事情。我在我的项目()中添加了一个自定义插件,它似乎可以工作(它现在显示在我的解决方案中的一个Plugins文件夹下),但我不知道如何从中引用脚本等等。根据Telerik文档(),他们说要在plugin.xml文件中添加包含任何内容的内容,但是这个插件没有

关于我如何引用他们的脚本以便开始使用它,有什么想法吗?我是直接引用Plugins/cordova plugin local notifications master/www/local-notification.js文件还是其他什么?以下是他们的plugin.xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
    xmlns:android="http://schemas.android.com/apk/res/android"
    id="de.appplant.cordova.plugin.local-notification"
    version="0.8.0dev">

<name>LocalNotification</name>

<description>The purpose of the plugin is to create an platform independent javascript interface for Cordova based mobile applications to access the specific Notification API on each platform.</description>
<repo>https://github.com/katzer/cordova-plugin-local-notifications.git</repo>
<keywords>notification, local notification, alarm, scheduler, tile, live tiles, ios, android, windows phone 8, wp8</keywords>
<license>Apache 2.0</license>

<author>Sebastián Katzer</author>

<engines>
    <engine name="cordova" version=">=3.0.0" />
</engines>

<dependency id="org.apache.cordova.device" url="https://github.com/apache/cordova-plugin-device" />

<js-module src="www/local-notification.js" name="LocalNotification">
    <clobbers target="plugin.notification.local" />
</js-module>

<!-- ios -->
<platform name="ios">
    <config-file target="config.xml" parent="/*">
        <feature name="LocalNotification">
            <param name="ios-package" value="APPLocalNotification" onload="true" />
            <param name="onload" value="true" />
        </feature>
    </config-file>

    <header-file src="src/ios/APPLocalNotification.h" />
    <source-file src="src/ios/APPLocalNotification.m" />
</platform>

<!-- android -->
<platform name="android">
    <config-file target="res/xml/config.xml" parent="/*">
        <feature name="LocalNotification">
            <param name="android-package" value="de.appplant.cordova.plugin.localnotification.LocalNotification"/>
        </feature>
    </config-file>

    <config-file target="AndroidManifest.xml" parent="/manifest/application">
        <!--
         * The alarm receiver is triggered when a scheduled alarm is fired. This class
         * reads the information in the intent and displays this information in the
         * Android notification bar. The notification uses the default notification
         * sound and it vibrates the phone.
        -->
        <receiver android:name="de.appplant.cordova.plugin.localnotification.Receiver" />

        <!--
         * This class is triggered upon reboot of the device. It needs to re-register
         * the alarms with the AlarmManager since these alarms are lost in case of
         * reboot.
         -->
        <receiver android:name="de.appplant.cordova.plugin.localnotification.Restore" >
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

        <!--
         * The receiver activity is triggered when a notification is clicked by a user.
         * The activity calls the background callback and brings the launch inten
         * up to foreground.
        -->
        <activity android:name="de.appplant.cordova.plugin.localnotification.ReceiverActivity" android:launchMode="singleInstance" />
    </config-file>

    <config-file target="AndroidManifest.xml" parent="/manifest">
        <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    </config-file>

    <lib-file src="libs/android/android-support-v4.jar" />

    <source-file src="src/android/LocalNotification.java" target-dir="src/de/appplant/cordova/plugin/localnotification" />
    <source-file src="src/android/Receiver.java"          target-dir="src/de/appplant/cordova/plugin/localnotification" />
    <source-file src="src/android/Options.java"           target-dir="src/de/appplant/cordova/plugin/localnotification" />
    <source-file src="src/android/Restore.java"           target-dir="src/de/appplant/cordova/plugin/localnotification" />
    <source-file src="src/android/ReceiverActivity.java"  target-dir="src/de/appplant/cordova/plugin/localnotification" />
</platform>

<!-- wp8 -->
<platform name="wp8">
    <config-file target="config.xml" parent="/*">
        <feature name="LocalNotification">
            <param name="wp-package" value="LocalNotification"/>
        </feature>
    </config-file>

    <source-file src="src/wp8/LocalNotification.cs" />
    <source-file src="src/wp8/Options.cs" />
</platform>
</plugin>

本地通知
该插件的目的是为基于Cordova的移动应用程序创建一个独立于平台的javascript接口,以访问每个平台上的特定通知API。
https://github.com/katzer/cordova-plugin-local-notifications.git
通知、本地通知、警报、调度程序、互动程序、实时互动程序、ios、android、windows phone 8、wp8
Apache2.0
塞巴斯蒂安·卡泽尔

当AppBuilder创建一个构建时,任何JavaScript文件引用都会自动插入到你的应用程序中,因此除了包含插件之外,你真的不需要做什么。顺便说一句,您应该首先在上查找自定义插件,其中包括在AppBuilder项目中包含该插件的说明。

感谢验证插件市场-不知道存在该插件。我尝试了你的建议(只是将插件添加到项目中),但是在模拟器中我仍然得到一个JS错误。我使用了Telerik站点的一个例子(
window.plugin.notification.local.add
),但它告诉我“无法读取未定义的属性‘notification’”,我认为这是因为我没有在index.html上引用JS文件本身。我进一步介绍了他们的例子,但得到的错误是
window.plugin
为空,所以这可能是我的第一个障碍。想法?AppBuilder模拟器只支持Cordova核心插件(如文件系统),不支持任何自定义插件。这就是为什么你应该测试自定义插件和物理设备——甚至更好——你现在也可以使用本机模拟器了。我发现的问题是,他们的演示给了我一个弹出窗口,说它不支持它(这很好),但当我尝试自己实现它时,我甚至无法做到这一点。如果我能弄清楚如何在index.html页面中引用JS文件,我想我已经准备好了。只是想澄清一下,您在模拟器、使用AppBuilder配套应用程序还是在物理设备上遇到问题?自定义插件在模拟器或配套应用程序中不起作用-仅当直接部署到设备上时(或在本机模拟器中使用时)。最初是模拟器,但现在模拟器给我带来了麻烦。这将是一个单独的职位在这里虽然如此,谢谢!