Hello! I have 3 Activity , let Activity А be the main Activity , from which B and C Activity called. B - Activity with settings, and C - Activity with basic actions. I need to implement a ToggleButton in B , which is responsible for whether the device will vibrate if I press the buttons in C Therefore, it is necessary to bind B and C If you use Intent , then you must call the StartActivity(Intent)/StartActivityForResult(Intent) method. It follows that when you click on the ToggleButton in B , C immediately called. And I do not need it. I need to remember when I click on the ToggleButton “something somewhere”, and then when I call C this “something somewhere” makes itself felt, and the device vibrates. Please tell me how to solve this problem. Maybe there is another way?

  • I don’t see any connection between changing ToggleButton and launching Activity. - Lucky_spirit
  • After all, when working with intents is it necessary to call these very methods or can it be somehow different? - Denis Lolik
  • Problem solved. Thank. - Denis Lolik
  • @Alex Les, I didn’t understand why you should use Intent there. - Lucky_spirit

1 answer 1

Is SharedPreferences not an option? http://developer.android.com/guide/topics/ui/settings.html

  • I remembered about this, when I had already created the topic, I hurried. Thank you - Denis Lolik