I would have expected both the following assignments to be valid, but the second one raises a class not found exception. Any ideas?
missionIntent = new Intent(this, Mission00.class);
/*DEBUG*/Log.d(this.getClass().getName(), "Checking Mission00 by class");
missionIntent = new Intent(this, Class.forName("Mission00"));
/*DEBUG*/Log.d(this.getClass().getName(), "Checking Mission00 by string");
I’ve also tried Class.forName(“Mission00.class”) but that doesn’t work either
Try “Mission00” qualified with the package before it: “com.package.something.Mission00”. Since you have the class name already, you should have the package name but you can use
this.getClass.getPackage()to get the prefix, as you previously asked for.