Requestcode and resultcode

Source: Internet
Author: User
OK. The Code is as above. There may be some questions about the parameters at this time. Let's look at the help of the android SDK to make it clearer. I have found some articles on the Internet that indicate that the confusion between requestcode and resultcode is incorrect. Startactivityforresult (intent, int requestcode)Intent passed to B. It doesn't explain. If you don't understand it, you can still play with your phone. Don't worry about development. requestcode> = 0 is good. It can be used in onactivityresult () which sub-module is used to return data? If C. for Java, D, and even e sub-modules, it is better to separate different requestcodes for each partition. Setresut (INT resultcode, intent)Resultcode if the submodule B may return several different results, you can use this parameter to identify and distinguish. There is also a special result_ OK value here, it is good to use it without special circumstances, the SDK has instructions, ah. Intent continues without explanation. onactivityresult () returned to () Onactivityresult (INT requestcode, int resultcode, intent)There is no need to explain the above three items. If you do not distinguish requestcode from resultcode, there will be no difference as long as other activities setresult reach a onactivityresult.

 

 

Turn: http://elvajxw.iteye.com/blog/883612

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.