SDK Add-on for Samsung Galaxy Tab

by Paul » Thu, 21 Oct 2010 23:50:36 GMT

Sponsored Links
 Yeah, found that today. I don't see the forum links on that page

Also there is an issue running apps on the Tab emulator if they use
Google Maps APIs. Gets an error about missing shared library even
though build target for the app includes the Google APIs.


Other Threads

1. Sampling data from the internal Mic, and from a headset Mic.

My app takes audio samples from the Mic, and processes them. The app
works fine with the internal Mic, but as soon as I plug in a headset,
I seem to lose the Mic signal: I still receive data, but it is quiet.

The headset is functioning correctly, because it works fine for e.g.
phone calls. This suggests to me that my app is not doing something it
should :-)

I'm wondering if I need to do something in my code to change from
receiving samples from the internal Mic to receiving them from the
headset - but it seems a bit far-fetched.

This is with Cupcake 1.5 on an ADP1, radio

I'd be most grateful for any advice/suggestions.



2. How to update expandable view when adapter's data changed

I have an activity that extends ExpandableListActivity. I use
SimpleCursorTreeAdapter to fill ExpandableListView.
My layout contains list view and empty view.
On app start ExpandableListActivity automatically chooses the right
view to display.

My steps:
1. App starts, there is no data. (empty view on the screen)
2. Insert some data into db.
3. Call adapter.notifyDataSetChanged(); But empty view is still on the
screen and there is no any item in my list view.

Then I restart app:
5. List view appears. I expand all groups and scroll to the bottom.
6. I click on the item in the list. New activity appears.
7. Click back button. All groups are collapsed and we are at the top
of the screen. Scroll position and expanded groups are not
8. Delete all data from db and call adapter.notifyDataSetChanged();
9. Child views have disappeared, but top-level groups are still

1. What can I do to replace empty view with list view?
2. What can I do to do to save state of groups and scroll position of
the list view?

public class MainActivity extends ExpandableListActivity {

    public void onCreate(Bundle savedInstanceState) {

        dbHelper = new DBOpenHelper(this);

        rubricsDbAdapter = new RubricsDBAdapter(dbHelper);;

        itemsDbAdapter = new ItemsDBAdapter(dbHelper);;

        rubricsCursor = rubricsDbAdapter.getAllItemsCursor();

        // Cache the ID column index
        rubricIdColumnIndex = rubricsCursor.getColumnIndexOrThrow

        // Set up our adapter
        mAdapter = new MyExpandableListAdapter(rubricsCursor,
                new String[] {RubricsDBAdapter.KEY_NAME},
                new int[] {},
                new String[] {ItemsDBAdapter.KEY_NAME},
                new int[] {});


    public boolean onChildClick(ExpandableListView parent, View v, int
groupPosition, int childPosition, long id) {
        Intent i = new Intent(this, ItemViewActivity.class);
        i.putExtra(ItemsDBAdapter.KEY_ID, id);

        return super.onChildClick(parent, v, groupPosition,
childPosition, id);

    private void updateMyData() {
        int i;
        int k;
        long rubricId;

        for (i = 1; i <= 5; i++) {
            rubricId = rubricsDbAdapter.insert("rubric " + i);
            for (k = 1; k <= 5; k++) {
                itemsDbAdapter.insert("item " + i + "-" + k,


    private void deleteMyData() {


    public class MyExpandableListAdapter extends
        public MyExpandableListAdapter(Cursor cursor, Context context,
int groupLayout,
                int childLayout, String[] groupFrom, int[] groupTo,
String[] childrenFrom,
                int[] childrenTo) {
            super(context, cursor, groupLayout, groupFrom, groupTo,
childLayout, childrenFrom,

        protected Cursor getChildrenCursor(Cursor notebookCursor) {
            // Given the group, we return a cursor for all the
children within that group
            long id = notebookCursor.getLong(rubricIdColumnIndex);

            Cursor itemsCursor = itemsDbAdapter.getRubricItemsCursor
            return itemsCursor;



3. AsyncTask doesn't work with WebView (was long-running loadUrl() JavaScript with a callback)

4. How can I get Activity object from Intent object or something else

5. Setting mail exchange di htc magic

6. Get active context dynamically of an application

7. How to use hardware acceleration in OpenGL ES