Re: DK2, there’s a ton of info about this available with a simple “UE4 Oculus” Google search. I recommend doing Google searches first and asking specific questions on here when you can’t find the answer there.
Here are some highlights:
https://docs.unrealengine.com/latest/INT/Platforms/Oculus/QuickStart/4/index.html
And I don’t know anything about GearVR integration, but I’d suspect Google is a good place to start for that, too.