There is an application for iPhone only that I would like to create similar to for Android. The application is (you connect the application with your partner, it creates a widget on the lock screen, it displays when your partner has the phone locked, telling you that he not connected, when your friend opens the phone, he tells you that he is connected, When you enter any application, it shows you that your friend is online (name of the application))
I don't know how to connect the application between two phones and how to make it ask for permissions to create a widget on Android. I hope for help.
You will probably need a UDP extension for this. Search the community for UDP. You may need iToo extension as well, so that the app can run in the background ?