本文介绍了如何把在调用从另一个活动的活动有一定的延迟?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在哪,我收到含有他的location.On接收SMS它调用另一个活动开始,并通过该位置该活动绘制它的map.Before拨打第二活性它显示了一个短信应用程序像敬酒通知屏幕,但somehoe上由于调用第二个活动是敬酒不来up.My问题是,我们如何能够延缓次活动的呼叫从这个活动呢?
I have an application in which I'm receiving a sms containing his location.On receiving sms it calls another activity to start and passes that location to that activity to plot it on the map.Before calling the second activity it shows a toast like notification on the screen but somehoe due to calling second activity that toast doesn't come up.My question is how can we delay the calling of second activity from this activity ?
推荐答案
您可以使用这样的:
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent i=new Intent(SearxhJobs.this,JobsTypes.class);
startActivity(i);
}
}, 5000);
这等待高达5秒发射活动。
Here it waits upto 5 seconds to launch activity.
希望它可以帮助
这篇关于如何把在调用从另一个活动的活动有一定的延迟?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!