Start Activity Android With Class Name
I am using Following Code to start setting I want to launch the setting activity which is started by android ins PackageList allowedAppsPackageName=CallHelper.Ds.getPackageList
Solution 1:
You can use this snippet to open Settings
Activity :
Intent intent=newIntent();
intent.setComponent(newComponentName("com.android.settings", "com.android.settings.Settings"));
startActivity(intent);
If you do not know what Activity you have to open,you can find it's name and it's package name as I mentioned here.
Solution 2:
There are many action constants in the Settings
class that can be used to create an intent that will start an activity for the provided sub-Setting or simply launch the Settings app depending on the action.
For example:
intent = new Intent(Settings.ACTION_SETTINGS); // ACTION_SETTINGS will start the Settings appintent = new Intent(Settings.ACTION_WIFI_SETTINGS); // ACTION_WIFI_SETTINGS will show the WiFi settings
Post a Comment for "Start Activity Android With Class Name"