是否有活动ID在Android应用程序? [英] Is there activity ID in Android app?

查看:96
本文介绍了是否有活动ID在Android应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个Android应用程序,我有一个问题。我做几个报警我的应用程序,其中的每一个连接的其他活动。我想知道,如果有可能,以确定这些活动,因为用户可以删除报警(从数据库)和活动将仍然在运行。

I'm writing an Android app and I've got a problem. I make few alarms in my app, each of them is connected another activity. I'd like to know if is there possibility to identify each of these activity, because user can delete alarm(from database) and activity will be still running.

现在的应用程序正在运行的罚款一个报警,但如果我例如设置三个闹钟则只有最后一个是工作的罚款。

Now the app is running fine for one alarm, but if I set for example three alarms then only the last one is working fine.

非常感谢您的帮助!

推荐答案

您可以使用活动散列code()...它是独一无二的。

You could use the Activities hashCode()... its unique.

这篇关于是否有活动ID在Android应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆