cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Coleman <don.cole...@gmail.com>
Subject Re: WP8 Replacement for BaseCommand.InvokeCustomScript?
Date Tue, 16 Apr 2013 17:35:52 GMT
KeepCallback will work but requires API breaking change to my plugin across
all platforms.  It seems like I need to do that at some point. Can you give
me a heads up before you remove InvokeCustomScript?


On Tue, Apr 16, 2013 at 1:14 PM, Jesse <purplecabbage@gmail.com> wrote:

> Hi Don,
>
> There is not a specific replacement, but using KeepCallback, you can
> dispatch multiple results.
> This may require a change in logic on the JS side.
>
>
> PluginResult result = new PluginResult(PluginResult.Status.OK, DATA);
> result.KeepCallback = true;
> DispatchCommandResult(result);
>
> Cheers,
>   Jesse
>
> @purplecabbage
> risingj.com
>
>
> On Mon, Apr 15, 2013 at 9:23 PM, Don Coleman <don.coleman@gmail.com>
> wrote:
>
> > BaseCommand.InvokeCustomScript is marked as obsolete in cordova-wp8.
> >
> > My plugin has native code fire a JavaScript event.  On Android I do this
> > with plugin.webView.sendJavascript(command). On WP8, I can't access the
> > webView, so I use a custom script to fire the event.
> >
> > Is there a replacement for BaseCommand.InvokeCustomScript?
> >
> > If not, when is it going away?
> >
> >
> >
> https://github.com/apache/cordova-wp8/blob/master/templates/standalone/cordovalib/Commands/BaseCommand.cs#L75
> >
> >
> >
> https://github.com/don/phonegap-nfc/blob/master/src/windows-phone-8/NfcPlugin.cs#L109
> >
> >
> https://github.com/don/phonegap-nfc/blob/master/src/android/src/com/chariotsolutions/nfc/plugin/NfcPlugin.java#L375
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message