How do you connect the application between two phones and how do you make it ask for permissions to create a widget on Android?

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.

I would like to thank everyone in this forum

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 ?

1 Like

This link might get you started Extension: UDP. Send text. WiFi. Source code - #3 by Juan_Antonio

1 Like

Do the two phones need to be connected to the same Wi-Fi network?

How can I make the application able to know the user inside any application + and that he is using the phone at all?

Do the two phones need to be connected to the same Wi-Fi network?

No

You will need to program that, so that messages can be sent and received over UDP

I have no idea how to do that, I won't need another extension to see which application is currently open

Sorry for asking so many questions, I'm just interested in this topic