Code example for ScheduledThreadPoolExecutor

Methods: scheduleWithFixedDelay

0
        } 
    } 
 
 
    public void startSender() { 
        mSMSSender.scheduleWithFixedDelay(new SMSSender(), 0, 1, TimeUnit.SECONDS);
    } 
 
    public void stopSender() { 
        //TODO: stop command 
    } 
 
    class SMSSentBroadcastReceiver extends BroadcastReceiver {
 
        @Override 
        public void onReceive(Context context, Intent intent) {
            String errorCode = "";
            String sms_id = intent.getStringExtra("sms_id");
            int sms_parts = intent.getIntExtra("sms_parts", 0);
 
            switch (getResultCode()) {