You should unregister the receiver in the corresponding event of the one where you register it. This will prevent registering/unregistering in an unbalanced way.
For instance, let's say you registered it in onCreate, but you're unregistering in onPause. Your activity is created and registers the receiver. Then you show a dialog. onPause is called and you unregister the receiver. Now the dialog is dismissed. onResume is called and your activity continues. But it's not recreated, onCreate won't be called and your the receiver was already unregistered, you won't get broadcasts anymore in this activity.
That's why it's important to use the correct pair of lifecycle events.
And a little explanation of those events you mentioned:
onCreate happens when the Activity is created and onResume when it goes into foreground. The corresponding closing events are onPause when it leaves the foreground, e.g., a dialog covers the Activity partially or the user navigates away from the Activity, with another one covering it fully (in that case, onStop would also be called). If the Activity is destroyed due to a configuration change (e.g., rotation) or the system reclaiming it, onDestroy is called.
A little digression here: specifically about onCreate/onDestroy, I would avoid that pair for broadcast receiver registration. The reason is that onDestroy may take too long to be called or may never be called (as per Android specification, it's not guaranteed, the activity's memory may be collected without calling onDestroy). Another example: your activity is created, you register the receiver. Then you navigate from that activity to another. It receives onPause and then onStop, you're in another activity, but the previous one is still listening to broadcasts.