Provider class public. Check: public class SavingsDbAdapter extends ContentProvider
:) And I implement all the methods for a ContentProvider that Eclipse asked me to. I do have some static code that runs first, as the NotesList example does at the bottom of the class. That code seems to run fine before I hit the exception. I also have added the android:multiprocess parameter to true, but I wouldn't expect that to have any effect either way on my problem. On Mar 6, 12:33 pm, Marco Nelissen <marc...@android.com> wrote: > Did you forget to mark your provider class as public? > > On Fri, Mar 6, 2009 at 10:25 AM, droozen <droozenr...@gmail.com> wrote: > > > Hence the InstantiationException. I get that. But WHY can't it be > > instantiated or, the real kicker, how can I get it to work? From what > > I can tell, and from what I keep reading in everything I can find on > > ContentProviders, everything looks fine with my setup. I don't even > > know where to look to try to fix my setup. Has anyone else ever > > encountered this and figured out why your provider couldn't be > > instantiated? > > > On Mar 6, 12:10 pm, Dianne Hackborn <hack...@android.com> wrote: > >> When a process is started, all content providers that run in it are > >> instantiated. Apparently your new content provider can't be instantiated. > > >> On Fri, Mar 6, 2009 at 5:51 AM, droozen <droozenr...@gmail.com> wrote: > > >> > So, I was trying to create my own ContentProvider. I want a recurring > >> > notification (say, once a day) so I discovered that I should be able > >> > to do this by setting a repeating alarm that my BroadcastReceiver > >> > class can pick up. Because it's going to perform some calcs, it > >> > immediately starts a service. So far, so good. > > >> > My service will need to access some data in the SQLite database in my > >> > application. So I made a content provider to provide that > >> > functionality. However, after making the content provider and adding > >> > the provider to my manifest between the application tags: > > >> > <provider android:name="--Fully qualified path name to ContentProvider > >> > class--" android:authorities="--authority to be used--"></provider> > > >> > Now my application, when it starts up, immediately fails with a > >> > InstantiationException for my ContentProvider. Any idea what I'm doing > >> > wrong? Or what else I need to be doing right? > > >> -- > >> Dianne Hackborn > >> Android framework engineer > >> hack...@android.com > > >> Note: please don't send private questions to me, as I don't have time to > >> provide private support. All such questions should be posted on public > >> forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---