Skip to content

Commit

Permalink
Fix Clear Android 🐛 (#5)
Browse files Browse the repository at this point in the history
- Fix the method in Java.
  • Loading branch information
AngelCareaga authored and ihadeed committed Apr 21, 2018
1 parent 343db6e commit 5a5f3ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "cordova-clipboard",
"version": "1.2.0",
"version": "1.2.1",
"description": "Clipboard management plugin for Cordova/PhoneGap that supports iOS, Android, and WP8",
"cordova": {
"id": "cordova-clipboard",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-clipboard"
version="1.2.0">
version="1.2.1">

<engines>
<engine name="cordova" version=">=4.0.0" />
Expand Down
6 changes: 3 additions & 3 deletions src/android/Clipboard.java
Expand Up @@ -56,10 +56,10 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
}
} else if (action.equals(actionClear)) {
try {
ClipData data = ClipData.newPlainText("", "");
clipBoard.setPrimaryClip(clip);
ClipData clip = ClipData.newPlainText("", "");
clipboard.setPrimaryClip(clip);

callbackContext.success(true);
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));

return true;
} catch (Exception e) {
Expand Down

3 comments on commit 5a5f3ee

@Muscliy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please release

@stionic
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Thank for your work. Any other problems here?
If no please release version 1.2.1 with this fix on NPM.

Thank you.

@ihadeed
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.