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 6554791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:44:30+00:00 2026-05-25T12:44:30+00:00

I am a noob learning android and building a simple game at the same

  • 0

I am a noob learning android and building a simple game at the same time to face “real world problems” as I learn, the game is a simple maths game where two numbers are given and you have to choose the answer.

This is how I am doing it right now:
My little demo game starts (startscreen.java), click to go to the levels activity

in the levels activity (levels.java) I check the shared prefs for which level has passed (1 to 5) and display the highest, there is also a button to start the game.

Once the game is started (game.java), on 3 wrong answers I save the level to sharedpreferences if this level is higher than before and finish() the game to come back to the levels activity.

My problem is, when I come back to the levels activity now (from the game activity), it does not show the latest level that was just saved in the game activity 🙁
but if I restart the game or go to startscreen.java and come back it shows.

I can paste the code here if you need me to but I suspect you guys have already solved this 🙂
Thanks!
Ryan

EDIT:
Added onResume, but it still does not work, my code:
http://www.pastebin.com/wUUcpMDi

  • 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-25T12:44:31+00:00Added an answer on May 25, 2026 at 12:44 pm

    Override the onResume method of your levels activity to tell the UI to refresh with the new level information.

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

Sidebar

Related Questions

I'm a real noob who just started learning 3d programming and i have a
I've been learning Android for about two weeks now (expert in as2/3). I have
I have been learning C++ by diving into a project, a simple 2d game.
I am a noob learning Android via a book, i have a quick question.
Am a noob learning Android via a book and for threading I see there
I am a noob learning Android and making my own little demo project at
I'm learning Scala, so this is probably pretty noob-irific. I want to have a
In advance: sorry for the noob question but I'm learning Cocoa & Objective-C and
noob question: I'm building a checkout system for an online commerce site. I'm getting
This is just an experienting/learning example. I'm an extreme functional noob. F# code to

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.