i think you should add an action action_send to your intent to return to the other activity. something like this:
intent i = getintent(); **i.setaction(intent.action_send);** i.putextra("pedido", cpedpedido); i.putextra("vlrfrete", valorfrete); setresult(result_ok, i); finish();
intent i = this.getintent();
intent i = getintent();
in the activity where you need to receive data of the intent, which has the values binded to some keys.
i figured out the solution for my problem:
i dont know why but if i move this piece of code that is actually on buttonclick event on activity b(2):
intent i = getintent(); i.putextra("pedido", cpedpedido); i.putextra("vlrfrete", valorfrete); setresult(result_ok, i); //result_ok is a native constant that have value -1 finish();
to -> right after
oncreate, it works ok.
but if i move back this code "to the right place" on a button click, it doesnt work, i really dont know why the activity is having this very weird behaviour, but i'll be happy to share when i figure it out.
in other words, i have to set the extras and the
result_ok before doing anything, otherwise it didnt work.
- OnActivityResult() Intent data is always null with no reason
- Eclipse Plugin - Dragging text from Java editor onto custom viewer always gets null data
- Eclipse bug? Switching on a null with only default case
- Compilers behave differently with a null parameter of a generic method
- Android Geocoder getFromLocationName always returns null
- getClass().getResource() always returning null
- How to start android activity from eclipse with custom Intent
- Null pointer access: The variable data can only be null at this location
- Null pointer exception with custom view in layout xml
- Passing Integer Between Activities and Intents in Android Is Always Resulting in Zero / Null
- Jersey + Spring 3 + Maven 3 + Tomcat 7 @Resource in @Component Class are always null
- Unknown reason for error with Play! Framework project & use only java in project
- Annotation-based null analysis - warning appears only with array parameter
- Java 17 null case with pattern matching
- Glassfish starting with Eclipse always tells: "Wrong user name or password."
- warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
- How to populate a SQLite database with data from a xml file?
- How can I set a data set parameter using two/combined parameters 1 date and 1 time with condition
- android eclipse launch intent for map with an address instead of latitude and longitude
- How to always compile a cpp file with Eclipse?
- How to pass null data to String field in cucumber feature file?
- Command failed with error 8000 (AtlasError) when try to insert data into collection on Atlast server
- Code with regex seems to end for no reason
- Eclipse null check doesn't work with functions
- Can I not mix @NonNullByDefault with inherited classes that have no null annotation constraint?
- getActionView returns null with searchview
- EJB3 Stateless Bean is always null in REST-WebService (Glassfish3, EJB3, Stateless Bean,)
- Multiple sql statments (execute all) with eclipse data tools
- Include a data file with my Android app
- Big JSON data to java RESTful service with TOMCAT
More Query from same tag
- how to make a file to open in a particular editor in eclipse?
- In Eclipse where to add an external library for a Contextlistener?
- Eclipse Java Editor line wrapping not as expected
- Sencha Touch code run in eclipse emulator
- Invoking a rest api client
- Java How to beautify the java code inside Eclipse IDE
- How to set Eclipse IDE Tab Switching settings
- How canI manually reload context in Eclipse?
- Java/Eclipse - Conditional breakpoint and counter?
- Glassfish v3.1 - Trying to deploying a simple Jersey rest service - Cannot Deploy
- Reading a webpage in Eclipse android
- How to see System.out for executable jar?
- Android Error: type mismatch cannot convert from android.app.actionbar to android.support.v7.app.actionbar
- Server is down, is there an alternative server for ECF than ecftcp://ecf.eclipse.org:3282/
- Facebook SDK reference in Android project
- Soap Web Service Not Deployed in Tomcat 6
- Redo keyboard shortcut for Eclipse
- Using The Default Method Of Grandparent Interface
- How to make text go to webBrowser/Url
- Hashmap put method wont Compile with char type?
- Using java.io library in eclipse so FileInputStream can read a dat file
- NoClassDefFounError:AndroidWebDriver. Everything seems fine in eclipse Projects. How Can I get rid of this error?
- error importing gradle project into eclipse
- how use android:apk of simpligility android-maven-plugin
- how to exclude specific jar if possible from child module itself or war
- Where does Java Project Explorer load files from in Eclispe IDE
- Java GUI not displaying in eclipse on Ubuntu
- Eclipse JNI UnsatisfiedLinkError when compiling in terminal works
- Eclipse C++ IDE, Issues setting up
- How can I put an image in, magnify and minimize it?