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 8529789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:06:33+00:00 2026-06-11T09:06:33+00:00

How can I pass the rawQuery using ContentProvider from one application to another application?

  • 0

How can I pass the rawQuery using ContentProvider from one application to another application? Example: select max(date) from tblename

Example: Query Main Activity:

private Uri CONTENT_URI = Uri.parse("content://ubra.c.apps.pro/Details");
cursor = getContentResolver().query(CONTENT_URI, null,null, null, "datePDate DESC");

In ContentProvider:

static UriMatcher uriMatcher;
static String PRO_NAME = "ubra.c.apps.pro";
Uri CONTENT_URI = Uri.parse("content://" + PRO_NAME
        + "/Details");

public Cursor query(Uri uri, String[] arg1, String arg2, String[] arg3,
        String arg4) {
    switch (uriMatcher.match(uri)) 
    {
    case 1:         
        CPcursor = DBConnection.query("Details",  arg1, arg2, arg3,arg2, arg2, arg4);
        break;

How do I use rawQuery here?

  • 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-11T09:06:35+00:00Added an answer on June 11, 2026 at 9:06 am

    Best solution for the question.

    public Cursor query(Uri uri, String[] arg1, String arg2, String[] arg3,String arg4) 
    {
        switch (uriMatcher.match(uri)) 
        {
        case 1:         
           CPcursor =  DBConnection.rawQuery("Enter your SQL query Here"')", null);
            break;
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How i can pass Array List from one Activity to another my array list
I want to know how I can pass a variable from one page to
How I can pass a query string with special characters? For example I need
Using logparser you can pass on parameters to the query you'd like to run
i just want to know can we pass nsdata or array datatype from one
Can I pass a string from Java to my C++ routine using JNI function
I can pass a variable from MVC ASP.NET by using this : var lastCategoryId
in MongoDb I can pass a predicate to an queryable instance for example DataBase.GetCollection<BsonDocument>(entity)
During a search you can pass some data to search manager by using the
Is there any way that I can pass arguments in selector? example: I have

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.