Package cn. testsimeji; import android. OS. bundle; import android. view. view; import android. view. view. onClickListener; import android. widget. button; import android. app. activity; import android. content. intent;/*** Demo Description: * simeji usage example ** Note: * 1 add * <action android: name = "com. adamrocker. android. simeji. ACTION_INTERCEPT "/> * <category android: name =" com. adamrocker. android. simeji. REPLACE "/> * <categ Ory android: name = "android. intent. category. DEFAULT "/> * 2 set the REPLACE_KEY here. it cannot be changed at will. ** official documentation: * http://simeji.me/blog/make_mushroom */public class MainActivity extends Activity {private static final String ACTION_INTERCEPT = "com. adamrocker. android. simeji. ACTION_INTERCEPT "; private static final String REPLACE_KEY =" replace_key "; private Button mButton; private String rawContent; private String newCon Tent; @ Overrideprotected void onCreate (Bundle savedInstanceState) {super. onCreate (savedInstanceState); setContentView (R. layout. main); init ();} private void init () {mButton = (Button) findViewById (R. id. button); mButton. setOnClickListener (new OnClickListenerImpl (); Intent intent = this. getIntent (); String action = intent. getAction (); if (action! = Null & ACTION_INTERCEPT.equals (action) {System. out. println ("start to call text replacement"); rawContent = intent. getStringExtra (REPLACE_KEY); System. out. println ("rawContent =" + rawContent);} else {System. out. println ("text replacement not called");} private class OnClickListenerImpl implements OnClickListener {@ Overridepublic void onClick (View v) {Intent data = new Intent (); newContent = "hello everybody"; data. putExtra (REPLACE_KEY, newContent); setResult (RESULT_ OK, data); finish ();}}}