how to open configure portable Wi-Fi hotspot setting by onclick?
android, buttonclick, onclicklistener, settings
Solution
This code works for 4.2.2
final Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
final ComponentName cn = new ComponentName("com.android.settings", "com.android.settings.TetherSettings");
intent.setComponent(cn);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity( intent);
Problem
how to open the following directory:settings/wireless and networks/Tethering and portable hotspot/portable Wi-Fi hotspot settings/configure portable Wi-Fi hotspot/ on button click? i want to achieve this using onClick method not id method. below is my code ``` <RadioButton android:onClick="togglewifi" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:checked="true" android:text="Toggle Wifi" /> public void togglewifi(View view) { Intent intent = new Intent( ); startActivity(intent); } ```