Reading browsing date and time in Android

Monday, May 5, 2014

I am using the below code to access browser's history in Title , Url , Date and Time format ; Title and Url works fine but while accessing Date and time it gives a long integer value . Can anyone suggest what changes do i need to make in order to perfectly get date and time ?



String sel = Browser.BookmarkColumns.BOOKMARK + " = 0";
Cursor mCur = managedQuery(Browser.BOOKMARKS_URI,
Browser.HISTORY_PROJECTION, sel, null, null);
j=mCur.getCount();
String[] mTitles = new String[j];
String[] murls = new String[j];
int[] date=new int[j];
mCur.moveToFirst();
i=j-1;
if (mCur.moveToFirst() && mCur.getCount() > 0)
{
int titleIdx = mCur.getColumnIndex(Browser.BookmarkColumns.TITLE);
int urlIdx = mCur.getColumnIndex(Browser.BookmarkColumns.URL);
int dateIdx=mCur.getColumnIndex(Browser.BookmarkColumns.DATE);
while (mCur.isAfterLast() == false ) {
mTitles[i]=mCur.getString(titleIdx);
murls[i]=mCur.getString(urlIdx);
date[i]=mCur.getInt(dateIdx);
i--;
mCur.moveToNext();
}
}






http://ift.tt/1kQYDhd