You need to request the ProviderInfo from the package manager, setting the flag to tell it to return the meta data.
On Wed, Jan 5, 2011 at 12:20 AM, jesse <[email protected]> wrote: > According to this page: > http://developer.android.com/guide/topics/manifest/manifest-intro.html, > provider can have meta-data. > however, when I check providerInfo.metaData in attachInfo() function > of a derived provider class, it is always null? > > is this a bug is android SDK 7? > > public class MyProvider extends ContentProvider { > .. > > public void attachInfo(Context context, ProviderInfo info) { > super.attachInfo(context, info); > > Bundle bundle2 = info.metaData; > > However, bundle2 is always null here. > > > here is my manifest xml file: > > <provider android:name="MyProvider" > android:authorities="com.xxxx..MyProvider"> > <meta-data android:name="varNme" android:value="xyzzxzxz" /> > </provider> > > thanks! > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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 [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

