gpt4 book ai didi

接收器的 Android 别名

转载 作者:搜寻专家 更新时间:2023-11-01 09:47:28 25 4
gpt4 key购买 nike

我们为旧代码创建了一个新的文件夹结构,但我们开始遇到问题。

首先是启动器 Activity ,但已修复添加 Activity 别名选项以显示

现在问题出在小部件上,当我们更新应用程序时,小部件代码(接收器)位于不同的文件夹中,因此无法正常工作。

list 上是否有类似 Activity 别名的选项,但用于接收者?

谢谢

最佳答案

If the name of a receiver changes the device admin will be disabled when the application is updated. This also applies to other kinds of receivers, such as App Widgets.

Things that cannot change来源:Android 开发者博客 06/2011

更新:您可以创建一个空类,将方法委托(delegate)给新类

public OldWidgetReceiverClass extends NewReceiverClass {}

关于接收器的 Android 别名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37317925/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com