I make dynamic check box using below code in my project how i can get the check box id and make an command for it for example:
if(checkbox1.ischecked()==true){
//do 
}
Thank you in advance.
public void fetchContacts() {
    final LinearLayout Vll=(LinearLayout)findViewById(R.id.Vll);
    CheckBox cb = new CheckBox(getApplicationContext());
                        cb.setText(outputName+":"+outputNumber);
                        Vll.addView(cb);
}
 
     
     
    