Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion How do you specify ContentProvider authorities when using the Lite & Pro app publishing model?

Received: by 10.223.102.139 with SMTP id g11mr457902fao.14.1292380622379;
        Tue, 14 Dec 2010 18:37:02 -0800 (PST)
X-BeenThere: android-developers@googlegroups.com
Received: by 10.223.7.80 with SMTP id c16ls302442fac.3.p; Tue, 14 Dec 2010
 18:35:32 -0800 (PST)
Received: by 10.223.123.210 with SMTP id q18mr413063far.21.1292380532734;
        Tue, 14 Dec 2010 18:35:32 -0800 (PST)
Received: by 10.223.123.210 with SMTP id q18mr413062far.21.1292380532668;
        Tue, 14 Dec 2010 18:35:32 -0800 (PST)
Return-Path: <av8r.st...@gmail.com>
Received: from mail-fx0-f67.google.com (mail-fx0-f67.google.com [209.85.161.67])
        by gmr-mx.google.com with ESMTP id a26si48600faa.0.2010.12.14.18.35.31;
        Tue, 14 Dec 2010 18:35:31 -0800 (PST)
Received-SPF: pass (google.com: domain of av8r.st...@gmail.com designates 209.85.161.67 as permitted sender) client-ip=209.85.161.67;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of av8r.st...@gmail.com designates 209.85.161.67 as permitted sender) smtp.mail=av8r.st...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by fxm17 with SMTP id 17so382737fxm.2
        for <android-developers@googlegroups.com>; Tue, 14 Dec 2010 18:35:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:received:in-reply-to
         :references:date:message-id:subject:from:to:content-type;
        bh=mcY52Lvje0CC3b39US0N2trCFApNKMYtZTntJnJ2Ik4=;
        b=k/3hLB+UWHMuJl9KzxWfuMasn2KdEUjADijX9JRmpqU/vIEa4SIVSmGSaDeEAZ8kDe
         tNfhAiqIK+Ubzaow6A0Xoek4GlSQ6VFxvDGLyhxkR8hPuMHN8rekC/KCsT+Y4w9rHVuu
         oq3ooQx0+I49dW9ZY8mzfoNVzsSC1h2FSDXyM=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        b=LxbEa8FaZjwrpPerXjjGnOf5TN9jaJk/l5rDIzqR/oLvLzToG3lwwwKXtreNmaiPBU
         0Tu/VmUSeIJwfEXhqQTulnffmGg0dsFW5mc4yWLtwaZDiB/vACVczKbhWJB7K8emivI2
         FUNgx3WTA9aFLB+5RDuV6b7LGN71JI4/77s48=
MIME-Version: 1.0
Received: by 10.223.83.200 with SMTP id g8mr3323554fal.98.1292380531262; Tue,
 14 Dec 2010 18:35:31 -0800 (PST)
Received: by 10.223.150.78 with HTTP; Tue, 14 Dec 2010 18:35:31 -0800 (PST)
In-Reply-To: <AANLkTikSHX1MP11yuD9Yxi5Dwv4hsJ_Xk46t0hHfd...@mail.gmail.com>
References: <1832104.86.1292354904913.JavaMail.geo-discussion-forums@yqlb6>
	<767599bd-1948-4937-91bf-5674b5768...@i32g2000pri.googlegroups.com>
	<AANLkTikSHX1MP11yuD9Yxi5Dwv4hsJ_Xk46t0hHfd...@mail.gmail.com>
Date: Tue, 14 Dec 2010 21:35:31 -0500
Message-ID: <AANLkTikLEeag8Vu4c++9bftR8oVnf7NFtSO86U2wU...@mail.gmail.com>
Subject: Re: [android-developers] Re: How do you specify ContentProvider
 authorities when using the Lite & Pro app publishing model?
From: Steve Novack <av8r.st...@gmail.com>
To: android-developers@googlegroups.com
Content-Type: multipart/alternative; boundary=20cf30433e3c7b0709049769caab

--20cf30433e3c7b0709049769caab
Content-Type: text/plain; charset=ISO-8859-1

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 <m...@carter.name> 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 <av8r.st...@gmail.com> 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 android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscribe@googlegroups.com<android-developers%2Bunsubscribe@googlegroups.com>
>> 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 android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com<android-developers%2Bunsubscribe@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
www.appventive.com

--20cf30433e3c7b0709049769caab
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

For my app, the ConentProvider is not open to 3rd party apps. =A0 But, I do=
 access other folks ContentProvider at times. =A0When both a lite &amp; 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).=
=A0<br>
<br><div class=3D"gmail_quote">On Tue, Dec 14, 2010 at 9:21 PM, Mark Carter=
 <span dir=3D"ltr">&lt;<a href=3D"mailto:m...@carter.name">m...@carter.name=
</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin=
:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks Steve.<div><br></div><div>How would 3rd party apps access those cont=
ent providers without worrying about whether the lite, pro or both versions=
 are installed?<br><br><div class=3D"gmail_quote">On 15 December 2010 10:15=
, Flying Coder <span dir=3D"ltr">&lt;<a href=3D"mailto:av8r.st...@gmail.com=
" target=3D"_blank">av8r.st...@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><br>
Having lite &amp; pro ContentProviders is very easy if you use a library<br=
>
project. =A0Simply put all of the shared functionality between lite &amp;<b=
r>
pro versions, including the ContenteProvider, in the base library<br>
project. =A0Then, have 2 separate lite &amp; pro projects that use the same=
<br>
base library project. =A0Define any lite/pro specific variables &amp;<br>
manifest values in the lite &amp; pro versions, and that&#39;s it.<br>
<br>
For instance, in one of my apps, I have both lite &amp; pro versions with<b=
r>
ContentProviders. =A0The ContentProvider is defined in the library<br>
project and references an AUTHORITY variable defined in an Application<br>
object. =A0Then, in each of the LITE &amp; PRO versions, I created a<br>
subclass of the Application object that overrides the AUTHORITY<br>
variable with the correct version-specific value. =A0Similarly, the LITE<br=
>
&amp; PRO Manifest files have corresponding version-specific authority<br>
strings for the ContentProvider.<br>
<br>
Works like a charm.<br>
<br>
Cheers,<br>
Steve<br>
<div><div></div><div><br>
<br>
--<br>
You received this message because you are subscribed to the Google<br>
Groups &quot;Android Developers&quot; group.<br>
To post to this group, send email to <a href=3D"mailto:android-developers@g=
ooglegroups.com" target=3D"_blank">android-developers@googlegroups.com</a><=
br>
To unsubscribe from this group, send email to<br>
<a href=3D"mailto:android-developers%2Bunsubscribe@googlegroups.com" target=
=3D"_blank">android-developers+unsubscribe@googlegroups.com</a><br>
For more options, visit this group at<br>
<a href=3D"http://groups.google.com/group/android-developers?hl=3Den" targe=
t=3D"_blank">http://groups.google.com/group/android-developers?hl=3Den</a><=
/div></div></blockquote></div><br></div><font color=3D"#888888">

<p></p>

-- <br>
You received this message because you are subscribed to the Google<br>
Groups &quot;Android Developers&quot; group.<br>
To post to this group, send email to <a href=3D"mailto:android-developers@g=
ooglegroups.com" target=3D"_blank">android-developers@googlegroups.com</a><=
br>
To unsubscribe from this group, send email to<br>
<a href=3D"mailto:android-developers%2Bunsubscribe@googlegroups.com" target=
=3D"_blank">android-developers+unsubscribe@googlegroups.com</a><br>
For more options, visit this group at<br>
<a href=3D"http://groups.google.com/group/android-developers?hl=3Den" targe=
t=3D"_blank">http://groups.google.com/group/android-developers?hl=3Den</a><=
/font></blockquote></div><br><br clear=3D"all"><br>-- <br><a href=3D"http:/=
/www.appventive.com">www.appventive.com</a><br>


--20cf30433e3c7b0709049769caab--