content-provider

How do I get the _count in my content provider?

What should I do to get my content provider to return the _count column with the count of records? The documentation says it is automatic, but maybe it's only taking about some built-in content provider. Running a query to the database seems not to return it. ...

Android Get Group of Contact by ID

Hello, I have a contact ID, how do I get the group the contact is assigned to? I am sure it is something to do with the Contacts.Groups class but I cannot figure it out. Thanks, Isaac ...

Returning a memory mapped InputStream from a content provider?

The the client side of a content provider consumer I can do something like this, to get a proper InputStream for reading the picture: InputStream is = getContentResolver().openInputStream(pictureUri); It is a nice API, and will on the server side, the actual content provider result in a call to: public ParcelFileDescriptor openFile(U...

How to use SMS content provider? Where are the docs?

Hi, I'd like to be able to read the system's SMS content provider. Basically I wanted to make an SMS messaging app, but it would only be useful if I could see past threads etc. It seems like there's a content provider for this, but I can't find documentation for it - anyone know where that is? Thanks -------- edit ----------- Ok I f...

Android - Calling Activity from widget

I currently have widget for my app Hire*A*Droid bundled with the main application. I would like to unbundle the widget and release it as a separate offering. However - the widget is relying on Activities from the main app so I need to navigate between these two mainly calling particular Activity of the main app from the widget. So the ba...

Android - How to populate Content Provider only once on App install?

I have a database in my application that is used as a ContentProvider. It holds settings values for the application, and when I install the application I want it to add a hardcoded set of values just once. This is how I am trying to do it at the minute. if(settings.size()<= 0){ Settings s = new Settings("voipusernameTa", "xxxxxxxx...

Trying to understand setting content providers in Android.

Hi there. I wanna change APN settings in a phone. Looked the api and there is a content provider named ACTION_APN_SETTINGS developer.android.com/reference/android/provider/Settings.html#ACTION_APN_SETTINGS but i'm having a hard time figuring out how to use it. Is there any example or something that does not involve the "contacts" conte...

Any way to override the managedQuery method to include a limit param when using a self-made content provider?

I've built my own content provider and I've run into an instance where I need to execute a query and include a limit param. The method call to managedQuery doesn't include this param and there fore I see no way to implement this w/o somehow overriding the managedQuery method? I've created a second query method in my content provider wh...

In an Android application, should I have one content provider per table or only one for the entire application?

I have years of experience with Microsoft .NET development (primarily C#) and have been working to come up to speed on Android and Java. So far, I've built a small application with a couple screens and a working content provider. All of the examples I've seen for developing content providers typically work with a single table, so I got...

Problem when try to insert in Content Provider[RESOLVED]

Look what Im doing. Im getting a SMS message and breaking word by word using the StringTokenizer class.I've done this, but when I try to insert the word in the content provider, the application stops, and the emulator says the application stoped unexpectadly. I don't know what to do anymore, I've tryied everything you can think about, b...

Examples of android applications that use direct database access instead of content providers?

Just found out that I don't need content providers if I don't need to share data with other applications. But since the examples I've seen all use content providers, I'm not sure how to proceed without them and populate activities with data derived from accessing my application's database directly. ...

How to access the SMS/MMS database on Android without using "content://sms"

Hi stackies, I recently read that the content provider content://sms shouldn't be used to access the SMS store, as there could be some mobile phones that might not know how to deal with it. So, what would be the best way to access the SMS database in Android? How can I access mmssms.db (this should be the database I need to deal with, ...