How to add a data to cloud db and get it on another phone

my doubt : i want to store a word some where ( i dont know where to store in tiny DB or in cloud DB ) and in another phone and when the user types the word which appeared and stored the app should check if both word are same..if it is same it should send a message to the first phone like "you have logined to another phone"

Maybe This app can help you :

thank you for helping