@Test public void testSetString() throws Exception { module.setString("test"); }
@Override @JSMethod public void setString(String text) { if(null == text) { return; } Context context = mWXSDKInstance.getContext(); ClipboardManager clipboard = (ClipboardManager) context.getSystemService(context.CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText(CLIP_KEY, text); clipboard.setPrimaryClip(clip); }
WXClipboardModule extends WXModule implements IWXClipboard { @Override @JSMethod public void setString(String text) { if(null == text) { return; } Context context = mWXSDKInstance.getContext(); ClipboardManager clipboard = (ClipboardManager) context.getSystemService(context.CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText(CLIP_KEY, text); clipboard.setPrimaryClip(clip); } }
WXClipboardModule extends WXModule implements IWXClipboard { @Override @JSMethod public void setString(String text) { if(null == text) { return; } Context context = mWXSDKInstance.getContext(); ClipboardManager clipboard = (ClipboardManager) context.getSystemService(context.CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText(CLIP_KEY, text); clipboard.setPrimaryClip(clip); }  }
WXClipboardModule extends WXModule implements IWXClipboard { @Override @JSMethod public void setString(String text) { if(null == text) { return; } Context context = mWXSDKInstance.getContext(); ClipboardManager clipboard = (ClipboardManager) context.getSystemService(context.CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText(CLIP_KEY, text); clipboard.setPrimaryClip(clip); }  @Override @JSMethod void setString(String text); @Override @JSMethod void getString(@Nullable JSCallback callback); }
WXClipboardModule extends WXModule implements IWXClipboard { @Override @JSMethod public void setString(String text) { if(null == text) { return; } Context context = mWXSDKInstance.getContext(); ClipboardManager clipboard = (ClipboardManager) context.getSystemService(context.CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText(CLIP_KEY, text); clipboard.setPrimaryClip(clip); }  @Override @JSMethod void setString(String text); @Override @JSMethod void getString(@Nullable JSCallback callback);  }