In my android library, I gave the user an edittext to enter the name of an activity , and I should move to it, In other words I dont know all the activities of the android app
String name_activity=Activityedit.getText();
Intent in=new Intent(Dform.this, ? );
What I should do to move the app to the activity with " name_activity" Thank's
Solution :
String intent_redirect=getPackageName()+"."+Activityedit.getText();
Class<?> c = null;
try {
c = Class.forName(intent_redirect);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Intent in =new Intent(DialForm.this,c);
startActivity(in);