如何获取 Android 捆绑包/打包程序标识符

发布于 2024-12-27 22:27:28 字数 120 浏览 2 评论 0原文

我正在为 android 编写一个需要包标识符的库 我不知道如何获取正在运行的 Android 应用程序的包标识符或等效项。

我认为它与 Intent 对象有关,无法弄清楚。

感谢您的任何建议。

I am writing a library for android that need the bundle identifier
I can not figure out how to get the bundle identifier or equivalent for my running android application.

I think it is related to the Intent object by can not figure it out.

Thank you for any suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

护你周全 2025-01-03 22:27:28

您的意思是您的应用程序的包名称吗?您可以使用 Activity.getPackageName()。

getPackageName()

Do you mean the package name for your app? You can use Activity.getPackageName().

getPackageName()

錯遇了你 2025-01-03 22:27:28

你是这个意思吗?

protected void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
}

Do you mean this?

protected void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文