How to unlock pattern on Nexus 4 [Developer Option: ON] Even I have seen duplicated thread as in: Can not unlock my Android device as have no internet connection?

But Here's my situation:


I have wifi/data turned off. 
I have the developer option turned on and my laptop does recognized the device with usb plugged in. (As I'm android developer)
I'm using unrooted Nexus 4 .




Is there any way of unlock the screen using adb way, i.e: turn on the wifi? If no luck I would probably go with hard reset.
Okay I finally got it solved using a developer way. :)

Here's my reference for my solution: Turn on wifi via self-made android applicaiton 

Got the wifi the moment I compiled into my Nexus phone, and volla! It works and I got my phone back after login through Google account!

I hoped this thread might helped people who came across this problem as a developer.