Faber Fedor wrote:
> I'm trying to build my first ContentProvider using the example in Mark's
> book "A Busy Coder's Guide To Android Development" (which I suggest
> other n00bs like me should read :-).

Many thanks!

> My database is created; I can go in via the command line/SQLite
> interface and play with it. The database name is lbtdl.db and the only
> table in it  is "locations".
> 
> However, when I do the following:
> 
>         locationsCursor = managedQuery(Provider.Locations.CONTENT_URI,
> FIELDS, null, null, null);
>         ListAdapter adapter = new SimpleCursorAdapter(this,
>                                                        
> R.layout.listlocations,
>                                                         locationsCursor,
>                                                         new String[]
> {Provider.Locations.NAME <http://Provider.Locations.NAME>},
>                                                         new int[]
> {R.id.name <http://R.id.name>});
>  
>         setListAdapter(adapter); 
>         selection= (TextView)findViewById(R.id.selection);
> 
> locationsCursor is alway null, nothing is displayed, and logcat
> complains "E/ActivityThread(  387): Failed to find provider info for
> com.appspot.lbtdl"

That suggests either your provider is not listed in your
AndroidManifest.xml, or possibly it's not a public class.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.9 Available!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to