cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse <purplecabb...@gmail.com>
Subject Re: WP8 Replacement for BaseCommand.InvokeCustomScript?
Date Tue, 16 Apr 2013 17:53:52 GMT
Definitely.
It was deprecated in 2.6, so you have a while.
I will also investigate if it makes more sense to keep it, using your
plugin as a great use-case/



@purplecabbage
risingj.com


On Tue, Apr 16, 2013 at 10:35 AM, Don Coleman <don.coleman@gmail.com> wrote:

> 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