Test if ContentProvider exists ?

by Lee » Tue, 01 Jun 2010 23:45:51 GMT

Sponsored Links
 How can I test if there's a ContentProvider for a Uri ?

I'm currently doing a query on it and checking for a null cursor, but
that generates an error in the system log each time, which I don't
like to do.



Test if ContentProvider exists ?

by Mark Murphy » Wed, 02 Jun 2010 00:40:50 GMT


You should be able to use methods on PackageManager for that.

Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.5 Available!


Sponsored Links

Test if ContentProvider exists ?

by Lee » Wed, 02 Jun 2010 01:30:02 GMT

 Looks promising, thanks.



Other Threads

1. Contacts.apk

I'm completely new in android environment. So, I want to ask for a
solution which is probably very noobish question to you people. :D

I want to replace the contacts.apk file in system/app/ . I go through
"adb remount" and then push. But when I reboot emulator, everything is
default. So, how can I change the system files in emulator (e.g. i
want to change the color of status bar or change the dialer background
and whatever.)

I'm using android 2.1 emulator.


2. file handling : reading a file in internal storage

hey guys,

The following is my code:

              OutputStreamWriter out2 = new
              sa_lt="3 2 1";
              // close the file
              InputStreamReader in2 = new
              sa_lt = String.valueOf(buf);

I get null in 'buf' (the buffer i.e). I have defined it as private char[]
buf on the top.

Why m I getting this error. Does anyone happen to know.

Please enlighten.




3. WebView always appears FULLSCREEN

4. Consolidating two SharedPreferences issues.

5. RTCP BYE packets not supported by the Android Media Framework?

6. Problem with app after update to 2.2

7. J'ai pas trouv茅 le chemin system/lib