Recycling of _ID field in SMS Table

by shahzad ahmad » Wed, 25 Nov 2009 08:49:15 GMT


Sponsored Links
 Hi,
   I've just found out that _ID field is not always unique in SMS table and
gets repeated after some days. Is it normal or some bug ? Can someone tell
what is threshold before _ID field is repeated. Actually i have implementing
a logic thinking that _ID field is always unique in all records i.e SMS,
Call logs, Contacts etc but now discovered that it is not guaranteed to be
always unique in SMS messages. I didn't check for contacts , call logs etc
but it is true for SMS messages.

Suppose a SMS messages had _ID field equal to 1. But after some days that
message is deleted so now 1 is not assigned to any message as id, will the
system assign that id to some new message whenever it wants to ?

Regards,
shaz

--



Other Threads

1. How to successfully embed a ListView in a Dialog?

Hi all,

I have been trying this thing for  about 16 hours now ...

my code:

public MyDialog (Context context)           //Dialog constructor
{

                super(context);
                this.setTitle(R.string.track_choose);
                //this.setContentView(R.layout.trackmode_);

                                participants = new String [2];
                                participants[1] = "cucu";
                                participants[2] =
"ffffffffffffffffffffffffgggggggggggggggggggggggggggggggggggg";

                ArrayList<String> arr = new ArrayList<String> (2);
                arr.add("cucu");
                arr.add("mirabelafdfjsfgyugfyubjcwfnewhf7387ft38fg");
                //listAdapter = new ArrayAdapter<String>(context,
android.R.layout.simple_list_item_1, participants);
                        listAdapter = new
ArrayAdapter<String>(getContext(), R.layout.trackmode, participants);
                //listAdapter = new ArrayAdapter<String>(context,
R.layout.trackmode, arr);

                //ListView participantList = (ListView)
this.findViewById(R.id.listParticipants);
                                participantList = new ListView
(getContext());
                LinearLayout.LayoutParams params = new 
LinearLayout.LayoutParams (1,
0x77);
                //participantList.setLayoutParams(params);

                                participantList.setAdapter(listAdapter);
                participantList.setOnItemSelectedListener(this);

                                //this.setContentView
(participantList);

                this.addContentView (participantList, params);
                participantList.setEnabled(true);
                //participantList.setItemsCanFocus(true);
                participantList.setVisibility(View.VISIBLE);
        }

I have also tried to move this / part of this code in places such as
onPreparePanel(int featureId, View view, Menu menu)        and
onCreatePanelView(featureId) overridables with no success. Comments
were left there intentionally just to point out what I have already
tried.



R.layout.trackmode's XML is like this (and it makes no difference if I
use my own layout or android.R.layout.simple_list_item_1 resource):

<?xml version="1.0" encoding="UTF-8"?>

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
                  id="textview" android:textStyle="bold" 
android:singleLine="false"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content" />


The result I am able to get right now is a neat looking transparent
dialog, with a title and a ListView object in it. However, the
ListView object only shws a veeeery thin orange vertical line on the
left side. And one can  actually see how that thin line shifts colours
as I press the arrowkeys to select Items in the ListView. Only thing
is that there are not 2 items as I intented to be, but some 5-6 items.
After the 5th or 6th, if  pressed 'down arrow' again, a
nullpointerexception is thrown.

heeeeeeeeeeeeeelp
thank you,
kellogs
--~--~---------~--~----~------------~-------~--~----~

2. EARN DOLLARS AT HOME BASED BUSINESS

Join the EyeEarn Network, and get paid to drive your car, wear T-
shirts, and more! Earn money effortlessly while you go about your day!
It fun, easy, and no experience is necessary!
http://www.ezinfocenter.com/10122618/CB


--~--~---------~--~----~------------~-------~--~----~

3. Hey!

4. Free Dating Tips!!!

5. Free Phone Call Worldwide

6. Liver Cancer Concerns?

7. Paris hilton Video clips !!!