Answer the question
In order to leave comments, you need to log in
How to send a request from phone to phone?
I want to create a simple application of this type:
Each android will have its own ID, and if you enter in the application the ID of which android that has this application installed, you can find out what percentage of the charge is currently on this phone)
Please tell me how this can be implemented?
Only one thought comes into my head, this is to send a request to the database every second in the background to find out if there is an entry with id android-a, if there is, then find out the percentage of charge and add this entry to the database, and on the device that I wanted find out this information, bring this information out.
Answer the question
In order to leave comments, you need to log in
Sending a record every second in the background is not good. Services in Android O are very limited in their work. The use of schedulers is recommended. JobScheduler, WorkManager (I recommend it. It is very easy to start using it. And all its features are described in those four lessons that I threw off from startandroid.ru)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question