there are 3rd party apps for GeoFencing, I use one called egiGeoZone on android.. it can make http url requests on entry/exit of a geofence.
Go find the Hikvision API Document, dig through it and see if you can figure out a URL request to send to start/stop recording.. if you can, just put those in as commands to issue and setup the geofence small enough your still on your local wifi when you exit it.
You could also setup RFID Token at your door instead of geofence, setup your android (iphones dont do nfc) to call the url to start/stop recording when you tap your phone against the NFC sticker you put on your door.