我正在使用cordova/phonegap 制作一个windows phone 应用程序,当事件触发时,我试图从C# 调用脚本。
有没有办法做到这一点?
到目前为止,这是我的课。
public void register(string options)
{
// This is executed asynchronously
if (!TryFindChannel())
DoConnect();
}
void httpChannel_ChannelUriUpdated(object sender, NotificationChannelUriEventArgs e)
{
// Finished asynchronous task in "register" method
Trace("Channel opened. Got Uri:\n" + httpChannel.ChannelUri.ToString());
SaveChannelInfo();
Trace("Subscribing to channel events");
SubscribeToService();
SubscribeToNotifications();
// SEND CHANNEL URI TO JAVASCRIPT
}