2
从我自己的Android应用程序,我试图启动一个外部应用程序的组件明确。发送意图时,“setComponent”和“setClassName”有什么区别?
Intent i = new Intent();
Uri uri = Uri.parse("http://0.0.0.1");
i.setData(uri);
i.setComponent(new ComponentName("other.app.android","other.app.android.Activity1"));
startActivity(i);
我能代替i.setComponent(...)
到i.setClassName("other.app.android", other.app.android.Activity1")
? 请让我知道他们之间有什么区别。