• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Send variable value from one activity to another

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 13
Android Python C++
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic