Is there an icon for a ContentProvider?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Is there an icon for a ContentProvider?

Postby bluehex » Fri Oct 30, 2009 2:06 am

Hello,

I have an alert that I'm displaying to allow a user to select either a contact or a photo.
I'm using an PICK_ACTION intent to let them choose the item.

for example:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. activity.startActivityForResult(new Intent(Intent.ACTION_PICK,
  3.  
  4.                                                         Contacts.People.CONTENT_URI), PICK_CONTACT_REQUEST);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


I'd love it if I could put get an icon for the ContentProvider that will service the request programmatically to put in the menu. So in the case of selecting a contact it would show you the icon for the Contacts application. I searched all over but I couldn't find anything that looked too promising.

Of course I can just add the icon to my package and set it that way. But I just thought there might be a way to ask for actual icon on the current device, since I'm guessing this can change from phone to phone, or os version to os version.

Please let me know if my question is unclear.

Thanks!
bluehex
Freshman
Freshman
 
Posts: 2
Joined: Fri Oct 30, 2009 1:55 am

Top

Postby padde » Fri Oct 30, 2009 7:48 am

Well.. if you had looked on that http://developer.android.com/guide/topics/manifest/provider-element.html site
you would know the answer ;)

The official developer site of android should always be your first or second drop-in center.. there
is really a pailful of information :)
padde
Master Developer
Master Developer
 
Posts: 443
Joined: Wed Apr 08, 2009 4:52 pm

Postby bluehex » Fri Oct 30, 2009 10:11 pm

padde wrote:Well.. if you had looked on that http://developer.android.com/guide/topics/manifest/provider-element.html site
you would know the answer ;)

The official developer site of android should always be your first or second drop-in center.. there
is really a pailful of information :)



Hi, Thanks for the reply, but I'm sorry that doesn't really answer my question.
I've read all of that documentation regarding the provider element, as well as all of the other documentation I could find on ContentProviders on the developer site.

The page you linked to shows you how to make a new provider in xml, and it does have an icon to be set, but I see nowhere that mentions how to retrieve the icon for a publicly available ContentProvider, or if it's even possible.

I would guess there'd be a public method called "getIcon" or something but I haven't been able to find one on any of these objects:

ContentProvider:
http://developer.android.com/reference/ ... vider.html

ContentProviderClient:
http://developer.android.com/reference/ ... lient.html

Or any other place in the docs regarding ContentProviders that I've searched through.

If anyone has come across a way to do this please share.

Thanks.
bluehex
Freshman
Freshman
 
Posts: 2
Joined: Fri Oct 30, 2009 1:55 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests