ComponentName类的构造函数是ComponentName(String pkg, String cls),书上的一个实例给的是:ComponentName cn = new ComponentName(MainActivity.this, "com.test.app.MyActivity");
这样的话就是说MainActivity.this应该是指一个包而不是一个类?
这样的话就是说MainActivity.this应该是指一个包而不是一个类?
这里的pkg是 一个包的Context----------A Context for the package implementing the component, from which the actual package name will be retrieved.