Trying to figure out how to use getCheckItemIds
<p>I'm new to writing Android apps and would really appreciate some help with this:</p>

<p>I'm working on an app that allows users to select a set of tags from a series of check boxes using "CHOICE_MODE_MULTIPLE" - however I'm having a hard time figuring out how to save those checkboxes when the user clicks the save Button "save.setOnClickListener(onSave)" </p>

<p>I've read a bit about "getCheckedItemIds" but have had a hard time finding any concrete example of how it works and how it is used. Any help on this would be really appreciated.</p>

<p>I've attached my code below to give an idea of what I'm trying to do</p>

<pre><code>public class PhysicsCollector extends TabActivity {

//EditText exampleName=null;

List&lt;Example&gt; model=new ArrayList&lt;Example&gt;();
ArrayAdapter&lt;Example&gt; adapter=null;

private ListView elementTags;
private String et_items[] = {"Friction", "Two Body Motion", "Constant Acceleration",
        "Newton's First Law", "Newton's Second Law", "Collision"
};

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    elementTags = (ListView)findViewById(R.id.ListView01);

    elementTags.setAdapter(new ArrayAdapter&lt;String&gt;(this,
            android.R.layout.simple_list_item_multiple_choice, et_items));
            elementTags.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

    //exampleName=(EditText)findViewById(R.id.exampleName);

    Button save=(Button)findViewById(R.id.save);
    save.setOnClickListener(onSave);

    ListView list=(ListView)findViewById(R.id.example);
    adapter=new ArrayAdapter&lt;Example&gt;(this,
            android.R.layout.simple_list_item_1, model);
    list.setAdapter(adapter);

    TabHost.TabSpec spec=getTabHost().newTabSpec("tag1");

    spec.setContent(R.id.example);
    spec.setIndicator("List", getResources()
                                .getDrawable(R.drawable.list));
    getTabHost().addTab(spec);

    spec=getTabHost().newTabSpec("tag2");
    spec.setContent(R.id.details);
    spec.setIndicator("Details", getResources()
                                    .getDrawable(R.drawable.example));
    getTabHost().addTab(spec);

    getTabHost().setCurrentTab(0);

}

    private View.OnClickListener onSave=new View.OnClickListener() {

        public void onClick(View v) {
            Example e=new Example();
            EditText name=(EditText)findViewById(R.id.exampleName);

            e.setName(name.getText().toString());

            public long[] getCheckedItemIds ();

            adapter.add(e);
        }
    };



}
</code></pre>

<p>Below is the "Example" class which is used to save instances of the Array from the onSave:</p>

<pre><code>   package org.encorelab.s3;

public class Example {
    private String name="";

    public String getName(){
        return(name);
    }

    public void setName(String name) {
        this.name=name;
    }

    public String toString() {
        return(getName());
    }
}
</code></pre>
