Also first in Activity_main to create a button such as Button1, do not need permission, Mainactivity.java as follows
PackageCom.thinker.manifestdemo;Importandroid.app.Activity;ImportAndroid.content.Context;Importandroid.content.Intent;ImportAndroid.os.Bundle;ImportAndroid.view.View;ImportAndroid.view.View.OnClickListener;ImportAndroid.widget.Button; Public classMainactivityextendsActivity {PrivateButton BT; PrivateContext Mcontext; @Overrideprotected voidonCreate (Bundle savedinstancestate) {Super. OnCreate (savedinstancestate); Setcontentview (R.layout.activity_main); BT=(Button) Findviewbyid (R.id.button1); Bt.setonclicklistener (NewOnclicklistener () {@Override Public voidOnClick (View arg0) {//TODO auto-generated Method StubIntent Intent =NewIntent (); /** Where the first parameter is the package name where the file is located, the second parameter is the class name of the second application file*/Intent.setclassname ("Com.thinker.manifest", "com.thinker.manifest.MainActivity"); StartActivity (Intent); } }); }}
Page jumps between different apps