Android: startActivityForResult & setResult for a view class and an activity class

After correcting the other code so that you can run the program, you can retrieve parameters back from your activity colorActivity in this way: Step1: return some value from colorActivity Intent resultIntent = new Intent(); resultIntent.putExtra(“NAME OF THE PARAMETER”, valueOfParameter); … setResult(Activity.RESULT_OK, resultIntent); finish(); Step 2: collect data from the Main Activity Overriding @onActivityResult(…). @Override … Read more