You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2013/01/30 01:57:14 UTC
[jira] [Updated] (CB-2307) Echo plugin docs error
[ https://issues.apache.org/jira/browse/CB-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah updated CB-2307:
---------------------------------
Description:
>From Gerald Skerbitz in the PhoneGap Google Groups (https://groups.google.com/d/topic/phonegap/k0g8_av17pE/discussion):
I'm just getting started with android and cordova. I tried to implement the Echo Plugin from
guide_plugin-development_android_index.md
I needed to add another parameter to the call in Echo.java to get it to work.
This is the code from the docs:
{code}
public class Echo extends CordovaPlugin {
@Override
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
if (action.equals("echo")) {
String message = args.getString(0);
this.echo(message);
return true;
}
return false;
}
}
{code}
I had to make it:
{code}
this.echo(message,callbackContext)
{code}
in order for it to work.
was:
>From Gerald Skerbitz in the PhoneGap Google Groups (https://groups.google.com/d/topic/phonegap/k0g8_av17pE/discussion):
I'm just getting started with android and cordova. I tried to implement the Echo Plugin from
guide_plugin-development_android_index.md
I needed to add another parameter to the call in Echo.java to get it to work.
This is the code from the docs:
{code}
public class Echo extends CordovaPlugin {
@Override
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
if (action.equals("echo")) {
String message = args.getString(0);
this.echo(message);
return true;
}
return false;
}
}
{code}
I had to make it this.echo(message,callbackContext) in order for it to work.
> Echo plugin docs error
> ----------------------
>
> Key: CB-2307
> URL: https://issues.apache.org/jira/browse/CB-2307
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, Docs
> Reporter: Shazron Abdullah
> Assignee: Joe Bowser
>
> From Gerald Skerbitz in the PhoneGap Google Groups (https://groups.google.com/d/topic/phonegap/k0g8_av17pE/discussion):
> I'm just getting started with android and cordova. I tried to implement the Echo Plugin from
> guide_plugin-development_android_index.md
> I needed to add another parameter to the call in Echo.java to get it to work.
> This is the code from the docs:
> {code}
> public class Echo extends CordovaPlugin {
> @Override
> public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
> if (action.equals("echo")) {
> String message = args.getString(0);
> this.echo(message);
> return true;
> }
> return false;
> }
> }
> {code}
> I had to make it:
> {code}
> this.echo(message,callbackContext)
> {code}
> in order for it to work.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira