title: How to manipulate string to paste in android
body: <p>I need to intercept when a user in my Android App want to paste a number that have copied somewhere in a EditText.
  If a number have international prefix +39 XXXXXXXX I want remove +39 before the paste on selected EditText.
  I've try to search for solve this issue and try to implement in various solutions but nothing work for me.
  For example I've try this:</p>
  
  <pre><code>  txtNumber1.addTextChangedListener(new TextWatcher() {
  
          @Override
          public void onTextChanged(CharSequence s, int start, int before, int count) {
              Log.d("txtNumber1","onTextChanged");
              Log.d("txtNumber1",s.toString());
              }
  
          @Override
          public void afterTextChanged(Editable s) {
              Log.d("txtNumber1","afterTextChanged");
              Log.d("txtNumber1",s.toString());
          }
  
          @Override
          public void beforeTextChanged(CharSequence s, int start, int count,
                  int after) {
              Log.d("txtNumber1","beforeTextChanged");
              Log.d("txtNumber1 sequence",s.toString());
              Log.d("txtNumber1 start",Integer.toString(start));
              Log.d("txtNumber1 count",Integer.toString(count));
              Log.d("txtNumber1 after",Integer.toString(after));
          }
      });
  </code></pre>
  
  <p>But beforeTextChanged doesn't show string that I want manipulate.
  Edit: For be more clear. I want intercept if a user want paste in a EditText a text that he have copy somewhere and manipulate this string before paste it. My problem isn't how to manipulate a string but how to intercept paste event before it happens.</p>