Back to project page CloudyPhone.
The source code is released under:
MIT License
If you think the Android project CloudyPhone listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.cloudyphone.android.controller.receivers; /* w w w. j a v a 2 s. com*/ import org.json.JSONException; import org.json.JSONObject; import android.content.Context; import android.text.ClipboardManager; import android.text.TextUtils; public class CopyClipboardReceiver extends PushReceiver { @Override public void execute(Context ctx, JSONObject data) { try { String string = data.getString("message"); if (TextUtils.isEmpty(string)) { // No message, return return; } // Get clipboard manager and set the text to it ((ClipboardManager) ctx.getSystemService(Context.CLIPBOARD_SERVICE)) .setText(string); } catch (JSONException e) { } } }