[Android Themes] tryantar:
hey guys i got a problem i cant really get around it.

Here is my project,

I want to make a kite UI "clone" with the home screen and sms tab

so i got the sms conversations working

like so (sorry for the pixelation, privacy :] )

but i want to do something like when you open you sms app then you see your list of conversations with diff people. like this

im currently using

<VariableBinders>
<ContentProviderBinder name="smsProviderRecieved" uri="content://sms/inbox" columns="thread_id,_id,address,date,body,person" order="date DESC">
<Variable name="messenger1" type="string" column="person" row="0"/>
<Variable name="sms_date1" type="long" column="date" row="0"/>
<Variable name="body1" type="string" column="body" row="0"/>
<Variable name="sms_num1" type="string" column="address" row="0"/>
<Variable name="thread1" type="string" column="thread_id" row="0"/>
<Variable name="messenger2" type="string" column="person" row="1"/>
<Variable name="sms_date2" type="long" column="date" row="1"/>
<Variable name="body2" type="string" column="body" row="1"/>
<Variable name="sms_num2" type="string" column="address" row="1"/>
<Variable name="thread2" type="string" column="thread_id" row="0"/>
</ContentProviderBinder>

<ContentProviderBinder name="smsProviderThreadOne" dependency="smsProviderRecieved" uri="content://sms/inbox" columns="thread_id,_id,address,date,body,person" whereFormat="thread_id=%S" whereParas="@thread1" order="date DESC">
<Variable name="oneSms_date1" type="long" column="date" row="0"/>
<Variable name="oneBody1" type="string" column="body" row="0"/>
<Variable name="oneSms_num1" type="string" column="address" row="0"/>
<Variable name="oneSms_date2" type="long" column="date" row="1"/>
<Variable name="oneBody2" type="string" column="body" row="1"/>
<Variable name="oneSms_num2" type="string" column="address" row="1"/>
<Variable name="oneSms_date3" type="long" column="date" row="2"/>
<Variable name="oneBody3" type="string" column="body" row="2"/>
<Variable name="oneSms_num3" type="string" column="address" row="2"/>
</ContentProviderBinder>

<ContentProviderBinder name="smsProviderSentOne" dependency="smsProviderRecieved" uri="content://sms/sent" columns="thread_id,_id,address,date,body" whereFormat="thread_id=%S" whereParas="@thread1" order="date DESC">
<Variable name="oneSentbody1" type="string" column="body" row="0"/>
<Variable name="oneSent_date1" type="long" column="date" row="0"/>
<Variable name="oneSentbody2" type="string" column="body" row="1"/>
<Variable name="oneSent_date2" type="long" column="date" row="1"/>
<Variable name="oneSentbody3" type="string" column="body" row="2"/>
<Variable name="oneSent_date3" type="long" column="date" row="2"/>
</ContentProviderBinder>

<ContentProviderBinder name="contactProvider" dependency="smsProviderRecieved" uri="content://com.android.contacts/data" columns="raw_contact_id,display_name,contact_id,photo_id" whereFormat="raw_contact_id=%S" whereParas="@messenger1" order="_id DESC">
<Variable name="contact1" type="string" column="display_name" row="0"/>
<Variable name="photo1" type="string" column="photo_id" row="0"/>
</ContentProviderBinder>
</VariableBinders>

I shall point out the problem.

im currently using this content variable to get my list of new messages. Where all the variable names that end with "1" is intended to get the thread id's for the 1st convo. and the "2" is intended to get the thread id's for the 2nd convo.

<ContentProviderBinder name="smsProviderRecieved" uri="content://sms/inbox" columns="thread_id,_id,address,date,body,person" order="date DESC">
<Variable name="messenger1" type="string" column="person" row="0"/>
<Variable name="sms_date1" type="long" column="date" row="0"/>
<Variable name="body1" type="string" column="body" row="0"/>
<Variable name="sms_num1" type="string" column="address" row="0"/>
<Variable name="thread1" type="string" column="thread_id" row="0"/>
<Variable name="messenger2" type="string" column="person" row="1"/>
<Variable name="sms_date2" type="long" column="date" row="1"/>
<Variable name="body2" type="string" column="body" row="1"/>
<Variable name="sms_num2" type="string" column="address" row="1"/>
<Variable name="thread2" type="string" column="thread_id" row="0"/>
</ContentProviderBinder>

and i'm relying on the

<Variable name="thread1" type="string" column="thread_id" row="0"/>

to get the conversation between me and my friend in

<ContentProviderBinder name="smsProviderThreadOne" dependency="smsProviderRecieved" uri="content://sms/inbox" columns="thread_id,_id,address,date,body,person" whereFormat="thread_id=%S" whereParas="@thread1" order="date DESC">
<Variable name="oneSms_date1" type="long" column="date" row="0"/>
<Variable name="oneBody1" type="string" column="body" row="0"/>
<Variable name="oneSms_num1" type="string" column="address" row="0"/>
<Variable name="oneSms_date2" type="long" column="date" row="1"/>
<Variable name="oneBody2" type="string" column="body" row="1"/>
<Variable name="oneSms_num2" type="string" column="address" row="1"/>
<Variable name="oneSms_date3" type="long" column="date" row="2"/>
<Variable name="oneBody3" type="string" column="body" row="2"/>
<Variable name="oneSms_num3" type="string" column="address" row="2"/>
</ContentProviderBinder>

where this code referes to the earlier variable to get my list of messages my friend sends. which means it filters out other thread_id and just gives me that list of thread_id (say its 70. so everything will be filtered out except messages from thread 70)

<ContentProviderBinder name="smsProviderThreadOne" dependency="smsProviderRecieved" uri="content://sms/inbox" columns="thread_id,_id,address,date,body,person" whereFormat="thread_id=%S" whereParas="@thread1" order="date DESC">

____________________________

So if my friend sends 2 or more messages the thread_id in row 1 of this code

<ContentProviderBinder name="smsProviderRecieved" uri="content://sms/inbox" columns="thread_id,_id,address,date,body,person" order="date DESC">
<Variable name="messenger1" type="string" column="person" row="0"/>
<Variable name="sms_date1" type="long" column="date" row="0"/>
<Variable name="body1" type="string" column="body" row="0"/>
<Variable name="sms_num1" type="string" column="address" row="0"/>
<Variable name="thread1" type="string" column="thread_id" row="0"/>
<Variable name="messenger2" type="string" column="person" row="1"/>
<Variable name="sms_date2" type="long" column="date" row="1"/>
<Variable name="body2" type="string" column="body" row="1"/>
<Variable name="sms_num2" type="string" column="address" row="1"/>
<Variable name="thread2" type="string" column="thread_id" row="0"/>
</ContentProviderBinder>

will become my friends thread_id and not some other person's thread id.

meaning (everything starts with row 0 btw)

so my code for the second convo will not work...

Please help :) I thank you very much in advance :)