Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7630891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:12:52+00:00 2026-05-31T06:12:52+00:00

I have 2 activities A->B. A is the parent activity and B is like

  • 0

I have 2 activities A->B. A is the parent activity and B is like “settings”. In B the user makes some choices that update the app’s database. A has to read the database to set some textviews in accordance to that.

What I thought would work is this: In B the user sets his choices (using some toggle buttons) and the on the onDestroy function the state of the buttons is read and the db is updated (I have no “submit changes button”, so I use onDestroy). Then on the onResume function of A I call the routine that reads the db and updates the fields.

The problem is that the changes are not visible in A. But if I go again to B and back to A without any new changes then the changes are visible and correct.

So what is wrong and should be done? I can use a dummy activity between A and B and this may work, but I do not know if this is good implementation.. Thank you in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:12:53+00:00Added an answer on May 31, 2026 at 6:12 am

    Try instead of onDestroy() method for example onPause() or onStop() method. And look at this:

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 activities. In child activity i have put something like that in
I have a TabHost activity that are switching activities, so my main looks like
I have a base activity and some child activities like A, B, C and
I have five activities/screens that I would like to be able to swipe between,
I have 2 activities. The first activity is an activity that parses JSON data
In my application I have several activities, the main screen has 4 buttons that
I would like to call one of the activities that I have written in
In my app I have common methods and attributes that I would like available
I am working on an android app that has two activities. One is the
I have three activities, A, B and C. User can start activity B from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.