If I have an Activity class called TestActivity in my application, there is a way to get its class by its name, as in this example:
Class<?> c = getClassByName("TestActivity");
use forName instead.
something like that..
Class<?> act = Class.forName("com.bla.TestActivity");
The Class.forName class has exceptions on it. This is just to expand this problem to solve this problem.
try { t = Class.forName("com.package.classname"); } catch (Exception ignored){}