Questions tagged [android-contentprovider]

Content providers are one of the primary building blocks of Android applications, providing content to applications.

Content providers are one of the primary building blocks of Android applications, providing content to applications. They encapsulate data and provide it to applications through the single ContentResolver interface. A content provider is only required if you need to share data between multiple applications.

For example, the contacts data is used by multiple applications and must be stored in a content provider. If you don't need to share data amongst multiple applications you can use a database directly via SQLiteDatabase

For more information about using content providers, read the Content Provider's documentation.

3206 questions
1
vote
1 answer

SearchView doesn't show custom suggestions

I have a problem with using SearchView. I would like to open an activity and perform search from toolbar by tapping "magnifying glass". Unfortunately no suggestions show up when I type... This is what I have: Manifest.xml
mysliwiec_tech
  • 649
  • 7
  • 21
1
vote
0 answers

How to use BUILT IN "Sync Calendar" mechanism instead of implementing custom Sync Adapter?

If you want to sync some custom data between your Android app and remote server, usually you need to implement a local storage for the data, Content Provider, and Sync Adapter to perform custom syncing. What if in my app I am using standard Calendar…
1
vote
1 answer

Android: Query content provider database

In my application I have a sqlite database.The columns in this database are :- id, data,date-added, mydescription. And android content provider Media.Image.External has following columns in its database:- _id , _data , _title , _date-added ,....and…
1
vote
1 answer

Android Content Observer - detail about file changed

I am using Content Observer on MediaStore.Images.Media.EXTERNAL_CONTENT_URI , In this i get notified whenever image file is renamed, but I also want to know the file path of this modified file. Any way I can do that. Extras:- I am having my own…
1
vote
1 answer

How to retrieve the table names or CONTENT URIs of a provider of a 3rd party application?

I am developing an application, which can query content providers of other installed applications. I got the provider name using GET_PROVIDERS, but how do i get the uri with which i can actually query? Kindly help. Thanks in advance.
1
vote
1 answer

Content Provider vs ORM

I think, that I understand the difference between Content Providers and Databases. I have two apps, that should share data between them, so I need to use Content Provider. Yet, the amount of boilerplate code in Content Providers makes me shiver. I…
Eugene Shtoka
  • 1,117
  • 1
  • 8
  • 14
1
vote
0 answers

How to retrieve exposed content providers of an installed application?

I am trying to extract all exported content providers from installed application using the following code. But for every application, this returns zero. Though, when I check the same with ADB, the application lists all exposed content providers and…
abi pratha
  • 17
  • 3
1
vote
0 answers

RxJava replacement for AsyncTaskLoader+ContentProvider

Does anyone know if it is possible to use RxJava to monitor a SQLite database table for changes and update the UI (a ListView) on detecting any updates. i.e. basically a replacement for the functionality of AsyncTaskLoader and a ContentProvider? A…
1
vote
1 answer

SQLite database stores only last record sent via ContentProvider

I am developping my custom ContentProvier to store GPS coordinates coming from the phone and then send them to server using SyncAdapter framework in Android. What I did so far is creating the ContentProvider but I have a problem, let me explain :…
1
vote
1 answer

Instance table not regenerated after updating ExDate column in android CalendarProvider

I am working with a local calendar. Here is my code to create an event: ContentValues values = new ContentValues(); values.put(CalendarContract.Events.DTSTART, 1457926200000L); values.put(CalendarContract.Events.DURATION,…
1
vote
1 answer

Retrieving Media from a Content Resolver

I am new in android programming. I am trying to figure out how to use the code from this ContentResolver contentResolver = getContentResolver(); Uri uri = android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; Cursor cursor =…
1
vote
1 answer

is it possible to access email using content provider in android

I'm writing an eMail app for accessing all types of mails(gmail,yahoo,hotmail etc) Can I use the content provider to access the inbox data , instead of using third-party libraries like JavaMail. If it is possible to access mail using content…
Sreekanth
  • 21
  • 1
  • 6
1
vote
1 answer

Could someone explain SQLiteOpenHelper getType

I'm trying to implement a database in my application. I'm following a tutorial about writing my own ContentProvider, but I'm confused about SQLiteOpenHelper::getType. We're supposed to write it and, essentially, write a switch that returns the…
Andrew
  • 20,756
  • 32
  • 99
  • 177
1
vote
1 answer

Android : Content Provider : Uri Type Wrong on Jellybean 4.2.2

I am having problems with acquiring proper uriType on Jellybean 4.2.2. The code given below works fine on other versions. package com.karacraft.security; import android.content.ContentProvider; import android.content.ContentValues; import…
1
vote
1 answer

Injecting a column in content provider

I am using custom built content provider to pull data from my database. There can be many records(like 10k) so instead of implementing some mechanism of lazy loading to a list, I took a chance and created content-provider as it has internally a…
miroslavign
  • 2,033
  • 2
  • 24
  • 26
1 2 3
99
100