Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Send variable value from one activity to another

 
Marios Trypas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having the following code to take a picture using AVD and another activity that shows on screen the battery level

(remember code tags)

What I need is a suggestion about how can i control variable bLevel in "Snapshot". I want to change the code to control the compression. To make it clear I want something like that


Thanks in advance
 
David Freitag
Greenhorn
Posts: 13
Android C++ Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, the only way i know of how to pass information between activities is using a Bundle.
But that involves directly starting an Intent, and im not sure thats what you are looking for but here 'goes.

to pass information into the Activity in question, you use Intent.putExtra();

You will use that PrefixTitle in the TargetActivity to look for the correct information, there are several different data types that can be passed not just Strings as in this example.


Hope that helps..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic