aspose file tools
The moose likes Android and the fly likes Problem in accessing value of global variable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Mobile » Android
Reply locked New topic
Author

Problem in accessing value of global variable

Madhu Nandan
Ranch Hand

Joined: Dec 16, 2010
Posts: 52

Hello,

Please go through the code below.

String[] Info contains 2 values like this: shiftDirection & 1 or currGear & 5 and similar pairs. If I receive shiftDirection & 0, I should display the previously received value of currGear. So I create PresentGear as a global variable and when currGear is received, I store it's value in PresentGear. Then when I receive shiftDirection & 0, I try to display PresentGear but nothing gets displayed. PresentGear is assigned no value. It would be very helpful if someone could suggest why this is happening or if my approach is wrong, kindly suggest an alternative way.

Cheers,
Madhu

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5543

Appears to be a duplicate post of http://www.coderanch.com/t/525700/Android/Mobile/Android-Cannot-show-more-than, closing.


JBoss In Action
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Problem in accessing value of global variable
 
Similar Threads
Android: Add custom widget or view (ex. vertical bar) which changes height programmatically
How to pass string from TCP server (a Runnable) to main activity (in Android)?
Android: Cannot show more than one image
Null pointer exception probably due to synchronisation issues; problem in starting activity
TCP client in Android phone: run continuously, display image based on message received from server