What is the proper way to present a card scroll activity before presenting a service? For example, if I wanted to allow the user to select a song in a scroll view before playing the song in a live card.
Asked
Active
Viewed 64 times
1 Answers
0
For this case I would still have the service be the entry point and use the following to start the scroll activity from the service (depending on the use case);
Intent intent = new Intent(getBaseContext(), CardScrollActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplication().startActivity(intent);
Then after making your selection and before finishing your activity, using a service interface method publish your live card from the service or use a broadcast receiver to notify the service to publish.

dljava
- 1,825
- 17
- 14
-
Thanks! Is there any reason why I would not want to publish the live card and then create the intent? -- since after the activity finishes control returns to the service anyway. – user3699997 Jun 10 '14 at 16:56
-
depends how you manage "control" it could just be event driven rather than a loop (due to battery) – dljava Jun 11 '14 at 17:45