Android Open Source - CloudCopyPaster Get Text To Buffer Receiver






From Project

Back to project page CloudCopyPaster.

License

The source code is released under:

Copyright (c) 2014, Dima Moiseev Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of s...

If you think the Android project CloudCopyPaster listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.newbilius.WinCopyPast;
/* ww w .  j  av a2  s.  c o m*/
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.text.ClipboardManager;
import android.widget.Toast;
import roboguice.receiver.RoboBroadcastReceiver;

@SuppressWarnings("deprecation")
public class GetTextToBufferReceiver extends RoboBroadcastReceiver {
    ClipboardManager clipboardManager;
    @Override
    public void handleReceive(Context context, Intent intent) {
        clipboardManager = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);

        clipboardManager.setText(GcmBroadcastReceiver.textToCopy);
        Toast.makeText(context, context.getString(R.string.text_coped), Toast.LENGTH_SHORT).show();
    }
}




Java Source Code List

android.UnusedStub.java
com.newbilius.WinCopyPast.AboutActivity.java
com.newbilius.WinCopyPast.Analytics.java
com.newbilius.WinCopyPast.ConfigActivityController.java
com.newbilius.WinCopyPast.ConfigActivity.java
com.newbilius.WinCopyPast.GcmBroadcastReceiver.java
com.newbilius.WinCopyPast.GetTextToBufferReceiver.java
com.newbilius.WinCopyPast.Log.java
com.newbilius.WinCopyPast.Net.java
com.newbilius.WinCopyPast.OnComplete.java
com.newbilius.WinCopyPast.Options.java
com.newbilius.WinCopyPast.PushNotification.java