I think the ComponentName class is missing, therefore it is not possible to use intent.setComponent
I think the ComponentName class is missing, therefore it is not possible to use intent.setComponent
Edit: you can receive a ComponentName object by intent.getComponent, but you can’t create your own.
Pierre Hébert would you please include this class?
]]>
< ![CDATA[
Yes.
As an alternative, you can use setClassName (http://developer.android.com/reference/android/content/Intent.html#setClassName%28java.lang.String,%20java.lang.String%29)
]]>
< ![CDATA[
How do I find a class name?
]]>
< ![CDATA[
Usually it is not shown to the user. You may find in while watching at adb logcat : the package/class is usually displayed in the log when you launch an activity for instance.
Another way is to have a look at the AndroidManifest.xml file in a package (where activities are defined), but this requires more tools.
]]>
< ![CDATA[
I already had a look at the manifest, but I didn’t find any class names there. Only package and action names were there.
For those who may ask how I got the manifest:
I exported the apk with SDMaid to my storage and then used fx archive explorer to look inside.
]]>
< ![CDATA[
The class name is the concatenation of the package name and the field “name” in the activity record if it starts with a dot, otherwise you can use the value as is.
]]>