سؤال

i work in app and want to add some buttons like dial button and setting button that when the user click on it will open the setting of the device

here is the code that opens the dial system on the device

 Intent phoneIntent = new Intent(Intent.ACTION_DIAL);
              startActivity(phoneIntent); 

so what is the code that will open the setting of the device on click button ? thanks

هل كانت مفيدة؟

المحلول

use:

startActivityForResult(new Intent(android.provider.Settings.ACTION_SETTINGS), 0);

نصائح أخرى

Try that and tell me :

startActivityForResult(new Intent(android.provider.Settings.ACTION_SETTINGS), 0);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top