I've created a button to trigger a pulse LED action on my app, but I cant make it pulse forever. It always Pulses by value ( on the example above you will see it pulses 10 times and then stops )
//Button Pulse
Button bpulse = (Button) findViewById(R.id.bpulse);
bpulse.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent led = new Intent(IlluminationIntent.ACTION_START_LED_PULSE);
led.putExtra(IlluminationIntent.EXTRA_PACKAGE_NAME, "com.devsgonemad.xslc");
led.putExtra(IlluminationIntent.EXTRA_LED_ID,
IlluminationIntent.VALUE_BUTTON_2);
led.putExtra(IlluminationIntent.EXTRA_LED_NO_OF_PULSES, 10);
led.putExtra(IlluminationIntent.EXTRA_LED_PULSE_ON_TIME, 1000);
led.putExtra(IlluminationIntent.EXTRA_LED_PULSE_OFF_TIME, 1000);
led.putExtra(IlluminationIntent.EXTRA_LED_COLOR, m_ledColor);
startService(led);
m_isEnabled = true;
}
How can I make this pulse forever when the button is pressed until the user goes back to the app and stops it from pulsing?
Best regards