Identifying what activities are registered to a worker

I would like to conditionally call an activity(using Workflow.newUntypedActivityStub) from with in a workflow if an activity with a name is registered with the worker. Is there a way to find all activities registered from with in a workflow ?

The feature you are asking for is not implemented yet. We call it worker query. The basic idea is to add a query capability that is sent to a specific task queue but not linked to specific workflow execution.