So rufen Sie JavaScript aus C # - Cordova / PhoneGap auf

Ich verwende Cordova / Phonegap, um eine Windows Phone-App zu erstellen. Ich versuche, ein Skript von C # aus aufzurufen, wenn ein Ereignis ausgelöst wird.

Gibt es sowieso das zu tun?

Hier ist meine Klasse soweit.

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

}

Antworten auf die Frage(4)

Ihre Antwort auf die Frage