I am building a simple producer-consumer usecase in android with following features:
- Main Activity has a Fullscreen ImageView
- Producer service populates a queue with images and time for which each image must be viewed
- Consumer thread reads these images and sets the imageView for time mentioned.
MainActivity:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ImageView myImageView = (ImageView) findViewById(R.id.imageView); Intent consumerServiceIntent = new Intent(this, PlaylistConsumer.class); startService(consumerServiceIntent);
How do I update imageView from PlaylistConsumer class ?