Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7979627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:49:29+00:00 2026-06-04T09:49:29+00:00

I’m writing an MMS/SMS application on a rooted Android 2.3.3 htc incredible S with

  • 0

I’m writing an MMS/SMS application on a rooted Android 2.3.3 htc incredible S with sense 2.1.
Now, while trying to receive a certain contacts list of SMS/MMS’s I get a FC in the query.

here’s some code:

Uri uri = Uri.parse("content://mms-sms/conversations/"+String.valueOf(thread_id));
ContentResolver cr = context.getContentResolver();
Cursor c= cr.query(uri,null,null,null,null);    //crashing here

logcat:

05-22 15:24:24.273: E/AndroidRuntime(32087): FATAL EXCEPTION: main
05-22 15:24:24.273: E/AndroidRuntime(32087): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.uiu.messaging/com.uiu.messaging.ContactMessageChain}: java.lang.NullPointerException
05-22 15:24:24.273: E/AndroidRuntime(32087): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1816)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1837)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.app.ActivityThread.access$1500(ActivityThread.java:132)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1033)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.os.Handler.dispatchMessage(Handler.java:99)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.os.Looper.loop(Looper.java:143)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.app.ActivityThread.main(ActivityThread.java:4196)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at java.lang.reflect.Method.invokeNative(Native Method)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at java.lang.reflect.Method.invoke(Method.java:507)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at dalvik.system.NativeStart.main(Native Method)
05-22 15:24:24.273: E/AndroidRuntime(32087): Caused by: java.lang.NullPointerException
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.os.Parcel.readException(Parcel.java:1328)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:160)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.content.ContentProviderProxy.bulkQueryInternal(ContentProviderNative.java:372)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.content.ContentProviderProxy.query(ContentProviderNative.java:408)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.content.ContentResolver.query(ContentResolver.java:264)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at com.uiu.messaging.Data.getContactChain(Data.java:319)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at com.uiu.messaging.ContactMessageChain.onCreate(ContactMessageChain.java:138)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
05-22 15:24:24.273: E/AndroidRuntime(32087):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1780)
05-22 15:24:24.273: E/AndroidRuntime(32087):    ... 11 more

All permissions are accounted for.

Any help will be greatly appreciated.

EDIT:

After following Mike’s suggestion I receive the following error in the logcat:

05-22 16:31:46.178: E/AndroidRuntime(1892): FATAL EXCEPTION: main
05-22 16:31:46.178: E/AndroidRuntime(1892): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.uiu.messaging/com.uiu.messaging.ContactMessageChain}: android.database.sqlite.SQLiteException: near "*": syntax error: , while compiling: SELECT * FROM (SELECT DISTINCT date * 1 AS normalized_date, NULL AS * FROM sms WHERE (htc_category= 0 AND thread_id = 25 AND (type != 3 AND type > 0)) UNION SELECT DISTINCT date * 1000 AS normalized_date, NULL AS * FROM pdu LEFT JOIN pending_msgs ON pdu._id = pending_msgs.msg_id WHERE (htc_category= 0 AND thread_id = 25 AND msg_box != 3 AND (msg_box > 0 AND msg_box != 3 AND (m_type = 128 OR m_type = 132 OR m_type = 130))) ORDER BY normalized_date ASC)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1816)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1837)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.app.ActivityThread.access$1500(ActivityThread.java:132)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1033)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.os.Looper.loop(Looper.java:143)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.app.ActivityThread.main(ActivityThread.java:4196)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at java.lang.reflect.Method.invokeNative(Native Method)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at java.lang.reflect.Method.invoke(Method.java:507)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at dalvik.system.NativeStart.main(Native Method)
05-22 16:31:46.178: E/AndroidRuntime(1892): Caused by: android.database.sqlite.SQLiteException: near "*": syntax error: , while compiling: SELECT * FROM (SELECT DISTINCT date * 1 AS normalized_date, NULL AS * FROM sms WHERE (htc_category= 0 AND thread_id = 25 AND (type != 3 AND type > 0)) UNION SELECT DISTINCT date * 1000 AS normalized_date, NULL AS * FROM pdu LEFT JOIN pending_msgs ON pdu._id = pending_msgs.msg_id WHERE (htc_category= 0 AND thread_id = 25 AND msg_box != 3 AND (msg_box > 0 AND msg_box != 3 AND (m_type = 128 OR m_type = 132 OR m_type = 130))) ORDER BY normalized_date ASC)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:158)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.content.ContentProviderProxy.bulkQueryInternal(ContentProviderNative.java:372)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.content.ContentProviderProxy.query(ContentProviderNative.java:408)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.content.ContentResolver.query(ContentResolver.java:264)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at com.uiu.messaging.Data.getContactChain(Data.java:318)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at com.uiu.messaging.ContactMessageChain.onCreate(ContactMessageChain.java:138)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
05-22 16:31:46.178: E/AndroidRuntime(1892):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1780)
05-22 16:31:46.178: E/AndroidRuntime(1892):     ... 11 more

I have no idea what’s wrong with the SQL statement…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:49:30+00:00Added an answer on June 4, 2026 at 9:49 am

    OK, fixed it. the trick was to enter actual column names into the projection. Seems like the bug was android’s after all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.