Once I paired by phone with a Bluetooth keyboard which all "keys" (like in windows is Win+L) should be pressed in order to screen-lock my Android and iOS phone.
In fact, I am not using Bluetooth Keyboard, I am implementing a virtual Keyboard in Raspberry Pi.Here, I build a HID profile in Raspberry Pi using Linux Bluetooth stack BlueZ.So my Phone detect as Keyboard and I can send any String like " Hello World " as HID report which will spread in the entire Text box of the phone.Next experiment is to issue an OS interrupt like Screen-Lock to my phone. It will be helpful if anyone state which is Keys to Lock So that in add in my Python script for locking phone programmatically.(I have no Bluetooth keyboard to do try and error test)