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

  • SEARCH
  • Home
  • 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 7811629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:14:12+00:00 2026-06-02T04:14:12+00:00

I have two application application A and application B. From A I am saving

  • 0

I have two application application A and application B. From A I am saving an image, two string values into the database by using contentProvider.

From the application B i am accessing this database and getting the image. The code which i am using is given below

byte b[] = null;
Cursor c = mContext.getContentResolver().query(allTitles, projection,null, null, null);
if (c.moveToFirst()) {
    do{
        if(info.activityInfo.name !=   null) {
            if(c.getString(1).equals(info.activityInfo.name)){
                b=c.getBlob(0);
            }
        }
    } while (c.moveToNext());
}
c.close();

Here in the selection area i am giving null so i am getting all the values in the database and i have to run this loop. Instead of that I want to give a where clause to get the exact raw.

Cursor c = mContext.getContentResolver().query(allTitles, projection,"activity_name ="+info.activityInfo.name, null, null);

So i have changed like this but it does not worked. How i should give the selection args ? Please help.

  • 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-02T04:14:14+00:00Added an answer on June 2, 2026 at 4:14 am

    try..

    Cursor c = mContext.getContentResolver().query(allTitles, projection,"activity_name = "+info.activityInfo.name, null, null);
    
    or
    
    Cursor c = mContext.getContentResolver().query(allTitles, projection,"activity_name = ? ", new String[]{info.activityInfo.name}, null);
    

    in case if activity_name is text

    Cursor c = mContext.getContentResolver().query(allTitles, projection,"activity_name = "+"'"+info.activityInfo.name+"'", null, null);
    
        or
    
        Cursor c = mContext.getContentResolver().query(allTitles, projection,"activity_name = ? ", new String[]{"'"+info.activityInfo.name+"'"+}, null);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two view controller classes in my application delegate. I can change from
I have been experimenting with sending messages from two .NET Windows Forms applications using
I have the following code that should insert two fields into a database via
Ive i have two images from a URL into my gallery view. But when
I have two string properties setup in my cocoa application's app delegate which are
i have two flex applications and i want to pass the data from one
I have a group of CFC's that I access from two seperate Applicaiton scopes.
I have two application that need to talk to each other. App1 needs to
I have two windows application, one is a windows service which create EventWaitHandle and
I have two swfs: application swf p2p client swf that allows to load data

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.