This is a short guideline in steps on how i render a view showing the activity for a given group (url arguments).
- Add a view, naming it and choosing "heartbeat activity" as base data type. Next.
- Give your view a title, add a block display and give it an administration name.
- Add two fields: "heartbeat message" and the "time of the activity". The view already renders all of the activity.
- Add filter: "Heartbeat activity: Heartbeat user access" and choose "Organic group activity" from the dialog box.
- Save the view.That's it
This approach will make sure this block detects the group node id on the group page or a group post page. On all other pages, it will return the of nodes where no nid is found, so the result of "( heartbeat_activity.nid = 0 OR heartbeat_activity.nid_target = 0 )".
So this is usable on the group page and group post page only!
If you want to create advanced views, you could work without the filter (omit step 4 and 5) and create your argument yourself.