android - 我如何选择一个好的android :sharedUserId?

标签 android release

常识似乎是在开始开发新应用程序时应立即设置 sharedUserId 属性。查看 list "To Do" list before publishing android app to market

即使经过广泛的谷歌搜索,我也没有找到如何选择 sharedUserId 的任何说明或示例,我唯一能找到的是它应该是一个字符串。所以,问题是:

  • id 应该是全局唯一的吗?
  • sharedUserId 字符串是否有大小限制?
  • “package”值可能是一个好的 sharedUserId 吗?

最佳答案

Common wisdom seems to be that one should set the sharedUserId attribute immediately when starting development of a new app.

不,常识是你根本不应该使用 android:sharedUserId。仅仅因为对一个问题的赞成票为零(现在是反对票)并不能使它成为“常识”。

android:sharedUserId 专为固件应用程序而设计。无论您尝试使用 android:sharedUserId 做什么,都可以通过 IPC 和 signature 级权限更安全地处理。

should the id globally unique?

你不应该使用 android:sharedUserId。如果这样做,它必须在您使用相同生产签名 key 发布的一组应用程序中是唯一的。

is there a size limitation to the sharedUserId string?

你不应该使用 android:sharedUserId。如果这样做,因为它只需要在您的应用程序中是唯一的,所以请保持合理的大小。我想有一些上限会使编译器或其他东西崩溃。

might the "package" value be a good sharedUserId ?

你不应该使用 android:sharedUserId。如果这样做,关键是要在多个应用程序中使用该值,因此会有多个包名称。

关于android - 我如何选择一个好的android :sharedUserId?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19259759/

相关文章:

android - 如何避免我在服务中获得的 Intent 无效?

android - 如何使用 parse.com android 将数据放入指针归档

android - 方法 'getSupportFragmentManager()' 不受支持

android - 如何使用 otto 将事件从适配器发布到 Activity

.net - 在我的析构函数中释放 Excel 对象

ios - Fabric 发布 Xcode 6.3 协同设计 xcode-select

c++ - 发布构建导致简单的 protobuf 代码失败

Java 设计模式 : same method on multiple classes

Grails 和发布插件

c++ - 准备要发布的公共(public) header