简体   繁体   English

在我的应用被杀死时有机会做某事

[英]get chance to do something when my app was killed

I have an android app . 我有一个android应用程序。 User can get wifi password nearby using my app, then could connect to wifi network. 用户可以使用我的应用获取附近的wifi密码,然后可以连接到wifi网络。

But if user kill my app after connected to wifi, my app have no chance to get notification, and user can still using wifi . 但是,如果用户在连接wifi后杀死了我的应用,则我的应用没有机会收到通知,并且用户仍可以使用wifi。 How could I resolve the problem cause I want to know who is using my wifi and get the networktraffic of every user. 我该如何解决该问题,原因是我想知道谁在使用我的wifi并获取每个用户的网络流量。 In some mobile phone, user can kill ererything about the app include service, this make me confused. 在某些手机中,用户可以杀掉有关应用程序包含服务的知识,这使我感到困惑。 Please, thank you! 求求你了,谢谢你!

This isn't something you can easily work around. 这不是您可以轻松解决的问题。 If someone uninstalls your application or kills it, there's nothing you can do to start it again without their permission (there will always be a single point of failure). 如果有人卸载了您的应用程序或将其杀死,则没有他们的许可,您将无权再次启动它(总会有单点故障)。

If you want to monitor usage, there are many tools available that probably have the feature you're looking for. 如果要监视使用情况,则有许多可用的工具可能具有您要寻找的功能。 this question on SU has a great list of tools that you could look into. SU上的这个问题有很多您可以研究的工具。 Monitoring network traffic by MAC address on a system you control is fairly robust. 控制的系统上通过MAC地址监视网络流量非常可靠。 Monitoring on a system that you don't control is not, and never will be. 在您无法控制的系统上监视不是,也永远不会。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM