本文介绍了怎样运行的方法,每10分钟的Andr​​oid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我期待运行一定的方法调用每十分钟在Android中,什么是去实现这一目标的最佳方式是什么?我目前正在研究使用处理程序对象的 PostDelayed 方法。

I am looking to run a certain method call every ten minutes in Android, what is the best way to go about implementing this? I am currently looking at using the Handler object's PostDelayed method.

推荐答案

处理器和PostDelayed是要走的路,你可运行的末尾有它拨打电话mHandler.postDelayed(Runnable接口,10分钟)

Handler and PostDelayed is the way to go, at the end of your Runnable have it make the call mHandler.postDelayed(Runnable, 10 minutes)

这篇关于怎样运行的方法,每10分钟的Andr​​oid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 16:50