I would recommend using it for .apks that are going to be built in to the
system image (not distributed on Market) and want to have their code
running in a common shared process in order to reduce their overall memory
footprint.  That is the reason this facility was implemented.  I think it
was a mistake to let it get out into the public SDK.

On Tue, Mar 20, 2012 at 12:50 AM, Doug <[email protected]> wrote:

> Dianne, when would you recommend using sharedUserId?  Also, are these
> subtleties documented anywhere?
>
> Doug
>
>
> On Monday, March 19, 2012 5:57:33 PM UTC-7, Dianne Hackborn wrote:
>>
>> I strongly recommend avoiding sharedUserId.  Note that once you publish
>> an app with this, you can never go back.  It will have a lot of subtle
>> repercussions on your app that you may not like -- everything from all of
>> the apps with the same shared user ID being batched together in accounting
>> for battery use, to your processes being killed when one of your apps with
>> the shared user ID is updated.
>>
>> On Mon, Mar 19, 2012 at 10:23 AM, Justin Anderson 
>> <[email protected]>wrote:
>>
>>> If you want to share things like preferences between the different apps
>>> then you will want to make sure that you also give them the same
>>> sharedUserId attribute in the manifest:
>>>
>>> http://developer.android.com/**guide/topics/manifest/**
>>> manifest-element.html#uid<http://developer.android.com/guide/topics/manifest/manifest-element.html#uid>
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/**magouyaware<http://sites.google.com/site/magouyaware>
>>>
>>>
>>>
>>> On Sun, Mar 18, 2012 at 4:24 PM, Mark Murphy <[email protected]>wrote:
>>>
>>>> On Sun, Mar 18, 2012 at 5:50 PM, Ryan Reeves <[email protected]>
>>>> wrote:
>>>> > I am developing two applications that will share functionality via
>>>> their
>>>> > activities. I would like to only allow applications signed with the
>>>> same
>>>> > certificate to start these activities.
>>>> >
>>>> > My plan is to create a custom permission with protection level of
>>>> signature
>>>> > and apply that permission to exported activities in both applications.
>>>> > Either application can be installed first, so I will define the
>>>> permission
>>>> > in both application manifests.
>>>> >
>>>> > Are there problems with defining the same permission in multiple
>>>> > applications?  I plan to release both applications on the Android
>>>> market.
>>>>
>>>> AFAIK, that should work fine.
>>>>
>>>> --
>>>> Mark Murphy (a Commons Guy)
>>>> http://commonsware.com | http://github.com/commonsguy
>>>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>>>
>>>> _Android Programming Tutorials_ Version 4.1 Available!
>>>>
>>>> --
>>>> 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 <[email protected]>
>>>> To unsubscribe from this group, send email to
>>>> android-developers+**[email protected]<android-developers%[email protected]>
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/android-developers?hl=en<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 <[email protected]>
>>> To unsubscribe from this group, send email to
>>> android-developers+**[email protected]<android-developers%[email protected]>
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en<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.
>>
>>
> On Monday, March 19, 2012 5:57:33 PM UTC-7, Dianne Hackborn wrote:
>>
>> I strongly recommend avoiding sharedUserId.  Note that once you publish
>> an app with this, you can never go back.  It will have a lot of subtle
>> repercussions on your app that you may not like -- everything from all of
>> the apps with the same shared user ID being batched together in accounting
>> for battery use, to your processes being killed when one of your apps with
>> the shared user ID is updated.
>>
>> On Mon, Mar 19, 2012 at 10:23 AM, Justin Anderson 
>> <[email protected]>wrote:
>>
>>> If you want to share things like preferences between the different apps
>>> then you will want to make sure that you also give them the same
>>> sharedUserId attribute in the manifest:
>>>
>>> http://developer.android.com/**guide/topics/manifest/**
>>> manifest-element.html#uid<http://developer.android.com/guide/topics/manifest/manifest-element.html#uid>
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/**magouyaware<http://sites.google.com/site/magouyaware>
>>>
>>>
>>>
>>> On Sun, Mar 18, 2012 at 4:24 PM, Mark Murphy <[email protected]>wrote:
>>>
>>>> On Sun, Mar 18, 2012 at 5:50 PM, Ryan Reeves <[email protected]>
>>>> wrote:
>>>> > I am developing two applications that will share functionality via
>>>> their
>>>> > activities. I would like to only allow applications signed with the
>>>> same
>>>> > certificate to start these activities.
>>>> >
>>>> > My plan is to create a custom permission with protection level of
>>>> signature
>>>> > and apply that permission to exported activities in both applications.
>>>> > Either application can be installed first, so I will define the
>>>> permission
>>>> > in both application manifests.
>>>> >
>>>> > Are there problems with defining the same permission in multiple
>>>> > applications?  I plan to release both applications on the Android
>>>> market.
>>>>
>>>> AFAIK, that should work fine.
>>>>
>>>> --
>>>> Mark Murphy (a Commons Guy)
>>>> http://commonsware.com | http://github.com/commonsguy
>>>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>>>
>>>> _Android Programming Tutorials_ Version 4.1 Available!
>>>>
>>>> --
>>>> 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 <[email protected]>
>>>> To unsubscribe from this group, send email to
>>>> android-developers+**[email protected]<android-developers%[email protected]>
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/android-developers?hl=en<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 <[email protected]>
>>> To unsubscribe from this group, send email to
>>> android-developers+**[email protected]<android-developers%[email protected]>
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en<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
>



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

Reply via email to