https://stackoverflow.com/a/2508138/1508448
Please go through the link above. My compiler is showing a problem in REQ_CODE_PICK_IMAGE. It asks if I need to create a variable. What is it?
https://stackoverflow.com/a/2508138/1508448
Please go through the link above. My compiler is showing a problem in REQ_CODE_PICK_IMAGE. It asks if I need to create a variable. What is it?
//you need to create an variable in your class
public final static int REQ_CODE_PICK_IMAGE=1
switch(case)
case 1: //instead of hardcoding here you need to declare the variable as integer
break;
case 2;
.
.
EDIT:
When an activity exits, it can call setResult(int) to return data back to its parent. It must always supply a result code, which can be the standard results RESULT_CANCELED, RESULT_OK, or any custom values starting at RESULT_FIRST_USER. In addition, it can optionally return back an Intent containing any additional data it wants. All of this information appears back on the parent's Activity.onActivityResult(), along with the integer identifier it originally supplied.