New Posts  All Forums:Forum Nav:

Activity Structure (Android)

post #1 of 3
Thread Starter 
Thanks for the help yesterday, I've got a new question concerning activities. In my game I have my base activity as my main menu, and a second activity as my actual game. When my game ends I have the activity ending, but I want it to pass the score back to the original activity.

I had two ideas on how to do this, but I don't think I did either right. I thought maybe I could pass it back during onDestroy() or using bundles(which I am still very unfamiliar with). What would be the best way to pass the score back to the main activity? All I'm trying to pass back is an integer.

Thanks for the help
post #2 of 3
So you want to display the last score in the main menu after a game?
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
post #3 of 3
Thread Starter 
It's for my highscore feature. I'm using a library called scoreninja that I want to be able to access from both the main menu and at the end of the game. I suppose I could have it as a separate activity altogether, but I'd still have to pass the score from the most recent game activity to the scoreninja one. Right now I'm trying to run scoreninja from my base activity (the main menu).
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming