I'm working on a library project that includes a few activities. These activities would need to redirect back to activities in the host application based on input.
for example:
[host activity#1] -> [library activity] -> [host activity#1]
-> [host activity#2]
-> [host activity#3]
The issue I'm facing is providing a simple api for host applications to define which activity to route to in each scenario. I considered just allowing them to handle it in onActivtyResult, but some scenarios in the library may look like this:
[host activity#1] -> [lib activity#1] -> [lib activity#2] -> [host activity#1]
-> [host activity#2]
Is it normal/correct to create a static class in my library where the host application can define which activities are mean to handle each scenario?
Would it be appropriate to have them extend an interface in some static class that defines what to do in each scenario (the interface forcing them to define what happens in each possible case)?
I'm not quite sure how to phrase this question, and my assumption is that there is better terminology for this problem that would have assisted me in finding what I am looking for by searching.