Is it possible to open the lock by using appium in android?

Hi,
In Addition to Lock screen, I want pattern for Authentication purpose also in my app.
Is there any way to achieve the same ?

Which kind of authentication do you need? Pattern lock, pin lock or what? Please specify.

I want to authenticate using pattern lock

Please try this url - https://github.com/appium/appium-android-driver/blob/master/docs/UNLOCK.md

Yes, I gone through this link , but I doubt as it would only work for lock/unlock device, not any other action in between.

Could you please give me some sample code how to implement this ?

If I understood your problem correctly, then as per me you need to unlock and lock device in middle right?

If yes, then do following thing -

  1. Start driver with the aforementioned capabilities
  2. Lock the device when you want to, by following code ((AndroidDriver) driver) .pressKeyCode(AndroidKeyCode.KEYCODE_POWER);
  3. Close the driver.

Now open the driver in same manner with aforementioned capabilities.

I haven’t tried above scenario… Let me know if you face any challenges, we can then dig down more.