Hello, All my content providers are accessed via one over arching
provider that delegates to the others based on the contents of the URI
pattern matcher. So below just the one provider "RunBuddyProvider"
There are actually three smaller providers and I have taken steps to
encapsulate their functionality into one content provider. Interacting
with the providers via INSERT and QUERY works fine for the
instrumentation.
But when using live services that interact with activities I can only
use QUERY successfully. Using INSERT, I get:
ERROR/AndroidRuntime(4197): Uncaught handler: thread main exiting due
to uncaught exception
ERROR/AndroidRuntime(4197): java.lang.NullPointerException
This suggests to me that the permission has not been granted for the
application trying to use the content provider. Has anyone used this
technique or anything similar with content providers? Is this just a
permissions issue from the Manifest? I would appreciate any comments
on the implementation.
Hearing that other people have had some success with this technique of
content provider delegation would put my mind at rest that it worked
and allow me to pursue the bug down the security issues side.
Can anyone offer any suggestions?
#
# In more detail, with code:
#
The delegating content provider is registered in the Manifest:
<provider
android:name=".provider.RunBuddyContentProvider"
android:authorities="com.novoda.runbuddy" />
This then instantiates the factory which then delegates to the other
Providers based on the URI pattern matcher.
Th RoutesProvider is the providers I am using in this instance. When
instantiated; I call the provider to insert based on the query. But
this always throws an Uncaught Handler Exception.
# All the involved classes
http://code.google.com/p/runningbuddy/source/browse/trunk/RunningBuddy/AndroidManifest.xml
http://code.google.com/p/runningbuddy/source/browse/trunk/RunningBuddy/src/com/novoda/runbuddy/provider/RunBuddyContentProvider.java
http://code.google.com/p/runningbuddy/source/browse/trunk/RunningBuddy/src/com/novoda/runbuddy/provider/RunBuddyContentProviderFactory.java
http://code.google.com/p/runningbuddy/source/browse/trunk/RunningBuddy/src/com/novoda/runbuddy/provider/RoutesProvider.java
http://code.google.com/p/runningbuddy/source/browse/trunk/RunningBuddy/src/com/novoda/runbuddy/util/DBHelperImpl.java#118
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---