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

Can parse the content uri

StartActivity Class public class StartActivity extends AppCompatActivity implements View.OnClickListener{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
Nikhil Soni
  • 119
  • 9
1
vote
1 answer

Unable to get provider - rarely crash on kitkat

Few times in the week i receive crash report in GP console: java.lang.RuntimeException: Unable to get provider mypackage.MyProvider: java.lang.ClassNotFoundException: Didn't find class "mypackage.MyProvider" on path: DexPathList[[zip file…
j2esu
  • 1,647
  • 1
  • 16
  • 26
1
vote
0 answers

Fail to find provider info com

I wrote a ContentProvider and a ContentResolver, and I got the following error: This is my ContentProvider manifest XML:
hr_xu
  • 11
  • 3
1
vote
1 answer

cursorboundexception whille displaying listview from content provider

somebody pls get me out of this.I am trying to display a list from an sqlite database which worked absolutely fine but dont know what went wrong it showed cant find provider info.I fixed it and then when i am running the code with…
Payal Garg
  • 31
  • 5
1
vote
1 answer

Stored image in SQLite is not shown in Gridview

Yesterday I asked this question where I was putting some static data to sqlite via a content provider. Now I want to go one step further. I download some data from a webserver(with Volley) and store them again in SQLite. Next I want to read them…
Theo
  • 3,099
  • 12
  • 53
  • 94
1
vote
1 answer

Get ContactId at the time of inserting a new contact programmatically to phone in android

I am trying to get contactId of newly added contact programmatically. Contact is being added successfully and fetches the contactID from ContentProviderResult[] but contactId which I am getting is not the correct one. I have also seen this and this…
Sarbjit Singh
  • 197
  • 1
  • 3
  • 13
1
vote
1 answer

How to gets some metadata when cursor observer notify change

When i got some cursor i want to be aware for changes, so i have used the registerContentObserver() on my cursor and when change occur i just notify that change happened. i looked into the notifyChange method on android developer and i didnt see any…
Lior
  • 832
  • 6
  • 6
1
vote
1 answer

Android Content Provider Test the REAL content Provider

hope you can help me ... tl:dr How can i write JUnit Tests which will NOT use the classes IsolatedContext and MockContentResolver ? I want to affect the REAL content Provider and not the Mock Database. General I have to write JUnit Tests for a…
1
vote
0 answers

How to create a custom attribute for group contact Android?

I am using the below code to create a group contact in Android. However, it only provides two attributes: name and Id. Can we add more attribute for the group? If it is possible, can we create a custom attribute for the group, such as color of…
Jame
  • 3,746
  • 6
  • 52
  • 101
1
vote
2 answers

unfortunately camera has stopped" while using Content Provider

If I use ContentProvider in my app am getting error like "unfortunately camera has stopped" after Result_ok.This is my code: Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); …
1
vote
0 answers

Should I run large queries on ContentResolver in the main application process?

I currently require a ContentProvider built on top of a SQLite database for my SyncService/SyncAdapter that runs in a separate process from my application. The SyncService does some small queries and updates to some data. I figured I could use the…
1
vote
1 answer

Limiting and offsetting query result in SMS Content Provider

I am working on a messaging app, I want to limit the number of result from SMS content provider so that I can implement endless scrolling (loading more data on scroll rather than loading the whole conversation at once). Is there any way to select…
ALi Akbar
  • 145
  • 2
  • 14
1
vote
1 answer

Share user's information with other apps with same signature

My play store account has over 100 apps published and all of them have this common user generation process which includes OTP verification. Interesting to note is all the apps have same user object with same properties for a particular OTP verified…
1
vote
1 answer

getContentResolver().openOutputStream(uri) No files supported by provider

I want store a file audio in my personal content provider. i save record: Uri uri = getContentResolver().insert(CONTENT_URI, values); OutputStream os = getContentResolver().openOutputStream(uri); but getContentResolver().openOutputStream(uri);…
Andrea Scarafoni
  • 937
  • 2
  • 13
  • 26
1
vote
0 answers

Content Provider for Google Maps Navigation App

Is there documentation on the content provider for the Google maps app. I want to find the destination of the Maps app is taking the user to. There is extensive documentation on calendar content provider but nothing on navigation or…
pt123
  • 2,146
  • 1
  • 32
  • 57