Re: [android-developers] Same permission defined in multiple applications

2012-03-20 Thread Doug
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 
 magouyaw...@gmail.comwrote:

 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

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware



 On Sun, Mar 18, 2012 at 4:24 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Sun, Mar 18, 2012 at 5:50 PM, Ryan Reeves rreeves...@gmail.com 
 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
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@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+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 -- 
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 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 
 magouyaw...@gmail.comwrote:

 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

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware



 On Sun, Mar 18, 2012 at 4:24 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Sun, Mar 18, 2012 at 5:50 PM, Ryan Reeves rreeves...@gmail.com 
 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 

Re: [android-developers] Same permission defined in multiple applications

2012-03-20 Thread Justin Anderson
I have only ever used it in once case...

I have two apps on the market.  Once is free and the other is a paid plugin
that unlocks features in the free app.  The sharedUserId setting was
perfect for me because it allowed me to do my license checking in the paid
app and save certain things about license validation to SharedPreferences
and then my free app could read those and unlock certain features.  The
unlock key app really did nothing but license validation and, if launched
by the user, essentially just launched the main app.

In my case I didn't have to worry about the subtleties...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Tue, Mar 20, 2012 at 1:50 AM, Doug beafd...@gmail.com 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 
 magouyaw...@gmail.comwrote:

 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#uidhttp://developer.android.com/guide/topics/manifest/manifest-element.html#uid

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/**magouyawarehttp://sites.google.com/site/magouyaware



 On Sun, Mar 18, 2012 at 4:24 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Sun, Mar 18, 2012 at 5:50 PM, Ryan Reeves rreeves...@gmail.com
 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en




 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 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 
 magouyaw...@gmail.comwrote:

 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:

 

Re: [android-developers] Same permission defined in multiple applications

2012-03-20 Thread Dianne Hackborn
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 beafd...@gmail.com 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 
 magouyaw...@gmail.comwrote:

 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#uidhttp://developer.android.com/guide/topics/manifest/manifest-element.html#uid

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/**magouyawarehttp://sites.google.com/site/magouyaware



 On Sun, Mar 18, 2012 at 4:24 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Sun, Mar 18, 2012 at 5:50 PM, Ryan Reeves rreeves...@gmail.com
 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en




 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 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 
 magouyaw...@gmail.comwrote:

 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#uidhttp://developer.android.com/guide/topics/manifest/manifest-element.html#uid

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/**magouyawarehttp://sites.google.com/site/magouyaware



 On Sun, Mar 18, 2012 at 4:24 PM, Mark Murphy 

Re: [android-developers] Same permission defined in multiple applications

2012-03-19 Thread Justin Anderson
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

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Sun, Mar 18, 2012 at 4:24 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Sun, Mar 18, 2012 at 5:50 PM, Ryan Reeves rreeves...@gmail.com 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
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Same permission defined in multiple applications

2012-03-19 Thread Dianne Hackborn
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 magouyaw...@gmail.comwrote:

 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

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware



 On Sun, Mar 18, 2012 at 4:24 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Sun, Mar 18, 2012 at 5:50 PM, Ryan Reeves rreeves...@gmail.com
 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
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@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+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Same permission defined in multiple applications

2012-03-18 Thread Ryan Reeves
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. 

Thank you,
Ryan

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Same permission defined in multiple applications

2012-03-18 Thread Mark Murphy
On Sun, Mar 18, 2012 at 5:50 PM, Ryan Reeves rreeves...@gmail.com 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
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en