Question

i am new in android and i have a task to make a application that play first some image (5 image)in full screen one by one every 20 sec after showing 5 images a video play for a given time and then image play again same manner. means first play

image 1

after 20 sec

image 2

after 20 sec

image 3

after 20 sec

image 4

after 20 sec

image 5

Then play video in series..

video play 2 min (or given time)

then again image play same manner.

Was it helpful?

Solution

Use Timer().schedule to implement auto play

new Timer().schedule(new TimerTask() {

        @Override
        public void run() {
            // TODO Auto-generated method stub
            autoplay(index);
        }
}, 0,20000); 

void autoplay(int index){
    //imageview or videoview
} 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top