dimanche 3 janvier 2016

Join between android table and own Sqlite table

I have a sqlite tables for save some id songs.

My first table is for name lists.

String SENTENCE_CREATE_TABLE_LISTS = "CREATE TABLE " + TABLE_LISTS
        + " (" + _ID + " INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "
        + LIS_ID + " INTEGER NOT NULL, "
        + LIS_NAME + " TEXT NOT NULL DEFAULT 'List');";

My second table is for relation between id list and id song.

String SENTENCE_CREATE_TABLE_LIST_SONGS = "CREATE TABLE " + TABLE_LIST_SONG
        + " (" + CAN_ID + " INTEGER NOT NULL, "
        + LIS_ID + " INTENGER NOT NULL DEFAULT 1);";

Now, I need the song info from android table for music called by URI MediaStore.Audio.Media.EXTERNAL_CONTENT_URI.

How I can make a JOIN between this tables.

Aucun commentaire:

Enregistrer un commentaire