For my app, the ConentProvider is not open to 3rd party apps.   But, I do
access other folks ContentProvider at times.  When both a lite & pro version
are available, I simply ask the user which one he wants to use (or in some
cases, you could simply try both and use whichever is available).

On Tue, Dec 14, 2010 at 9:21 PM, Mark Carter <[email protected]> wrote:

> Thanks Steve.
>
> How would 3rd party apps access those content providers without worrying
> about whether the lite, pro or both versions are installed?
>
> On 15 December 2010 10:15, Flying Coder <[email protected]> wrote:
>
>>
>> Having lite & pro ContentProviders is very easy if you use a library
>> project.  Simply put all of the shared functionality between lite &
>> pro versions, including the ContenteProvider, in the base library
>> project.  Then, have 2 separate lite & pro projects that use the same
>> base library project.  Define any lite/pro specific variables &
>> manifest values in the lite & pro versions, and that's it.
>>
>> For instance, in one of my apps, I have both lite & pro versions with
>> ContentProviders.  The ContentProvider is defined in the library
>> project and references an AUTHORITY variable defined in an Application
>> object.  Then, in each of the LITE & PRO versions, I created a
>> subclass of the Application object that overrides the AUTHORITY
>> variable with the correct version-specific value.  Similarly, the LITE
>> & PRO Manifest files have corresponding version-specific authority
>> strings for the ContentProvider.
>>
>> Works like a charm.
>>
>> Cheers,
>> Steve
>>
>>
>> --
>> 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
>>
>
>  --
> 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




-- 
www.appventive.com

-- 
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

Reply via email to