I have an Android app that has a timer to complete a task:
time2.scheduleAtFixedRate(new TimerTask() { @Override public void run() { sendSamples(); } }, sampling_interval, sending_interval);
Suppose sampling_interval is 2000 and send_interval is 4000.
So, in this application, I send some read values ββfrom the sensor to the server. But I want to stop sending after 10000 (10 seconds).
What should I do?
source share