anitab-org / powerup-android

PowerUp is an educational choose-your-own-adventure game that utilizes a users uploaded curriculum to empower pre-adolescents to take charge of their reproductive health. This is the Android version of the game.
GNU General Public License v2.0
116 stars 430 forks source link

Handling of VocabMatch game when migrated out of the app in middle of the game #777

Open Rimjhim28 opened 6 years ago

Rimjhim28 commented 6 years ago

Description

If the vocab match game is left in middle and the user migrates out of the app, the game still continues to completion in the background and relaunches itself once the game gets completed.

Mocks

The issue can be reproduced by leaving the game in the middle, migrating to some other place like home screen while allowing the app to continue in the background. After some time the app would relaunch itself when the game is completed.

videotogif_2018 04 06_18 04 12

videotogif_2018 04 06_18 06 18

NOTE: The relaunching of game completeion screen from map screen and device's home screen is all by itself.

Acceptance Criteria

Update

Definition of Done

Estimation

24 hours

I would like to work on this.

Rimjhim28 commented 6 years ago

@ZoroarkDarkrai That sounds great! Thank you for your suggestion. Even I have thought of a similar solution. Well! As mentioned, I would like work on this.

Rimjhim28 commented 6 years ago

@m-murad please approve the issue.

m-murad commented 6 years ago

Please send a PR

Rimjhim28 commented 6 years ago

Thanks @m-murad Will be sending the PR soon!!

Rimjhim28 commented 6 years ago

@m-murad @saurabhjn76 Can you please help me here. I am facing tough time trying to resolve this.

isabelcosta commented 6 years ago

I also encountered this bug. Here is a way to reproduce/test it:

  1. In the Hospital scenario, when I answer with "Ask your all doubts related to puberty", the game to match words (vocab) with images starts
  2. Once on the VocabMatchGameActivity, after winning the game, I reach the "Game Completed" screen
  3. I leave the app, before hitting "continue"
  4. I open the app again
  5. I load the previous game
  6. Clicking in any scenario, this game starts again and does not take me to the VocabMatchEndActivity, even if I finish the game again
isabelcosta commented 6 years ago

Related to #1001. The solution to these issues might be the same.

Rimjhim28 commented 6 years ago

@isabelcosta this issue concerns activity lifecycle of VocabMatch particularly while #1001 would require identification of scenario user chooses on the map. Would you mind explaining the solution in a more elaborate way that might go with both of them.

Rimjhim28 commented 6 years ago

@isabelcosta I think you have got the issue worng. Please refer to gifs provided to have a clear picture.

isabelcosta commented 6 years ago

Another way to get this bug:

  1. While playing the VocabMatch game, from the Hospital Scenario
  2. At the end don't click "Continue", and go back to the Map by clicking the "back button"

after-finishing-game-no-click-continue

  1. Return to any scenario, and you'll get the game starting again with only 3 moving objects

after-returning-to-hospital-scenario

  1. In the end, the game does not move forward to the completion screen, staying in game screen without moving objects

image

aayushinigam commented 6 years ago

@Rimjhim28 This issue also includes the case when user presses back button while playing the game?

debanjanah commented 6 years ago

@Rimjhim28 were you working on this?

Rimjhim28 commented 6 years ago

@debanjanah , As I was busy with GSoC, aayushi wanted to work on this. We had a chat on this on project channel. She can surely fix this. @aayushinigam , yes! The issue also includes the case when the user presses back button.

debanjanah commented 6 years ago

1001 is basically same.

what is happening is that minigames are running in the background, also because of that, the next scenario is unlocked even if the minigame isn't completed. and on accessing the previous scenarios, the current incomplete minigame starts irrespective of which scenario it is. it can't be identified for the minesweeper game because the game doesn't complete itself like vocabmatch as minesweeper requires user feedback whereas vocabmatch can be completed without explicit user feedback (i.e game is still completed even when you don't move the tiles)

aayushinigam commented 6 years ago

@debanjanah Shouldn't we then have two different issues for both the mini games because it will involve making changes in two different packages - 1.minesweeper 2.vocab_match_game ? I'm guessing changes will have to be made in their respective SessionManagers and GameActvities. Also, about unlocking of next scenarios - they get unlocked even if back/home is pressed from Tutorials screen. So, solution for this issue and for issue of getting scenarios unlocked might differ.