• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Getting custom result from Activity???

Hello,
I'm trying to develop an easy app.
By pressing the Menu button I can open a small menu with two EditText fields and one Button.
The user has to enter data in the fields, presses the ok button and goes back to the main activity.
This is all working, but I did not find a way to receive the data of the two text fields...
I found this
Common Tasks and How to Do Them in Android | Android Developers
But sadly I did not help me with my last problem...

I think its easy if you know how to... So please let my know :-).

Cheers,
Tobi
 
Hi

You can use putExtra

Intent.putExtra

to add primitive types to your Intent

so you would have something like:

Code:
intent.putExtra("textViewOne" textView.getText());

Then back on your main menu you would use
Code:
String value = getExtra("textViewOne", "defaultIfFail");
 
Back
Top Bottom