PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, July 11, 2022

[FIXED] How do i get messages even if the app is closed

 July 11, 2022     communication, message, send     No comments   

Issue

It is more or less asking how Whattsapp, Instagram, Facebook etc works. How does my Phone know i got a new message even if the app is closed

(Please dont focus that much on the examples above, it is more a general question.)

I can think of a couple of solutions:

1.My Phone asks (in the background) an api every couple of seconds and fetches the data.

2.My Phone has an on going connection over the Web(i heard of technologies like: WebSocket, WebRTC, WebTransport, (standard) sockets, TCP)

  1. My Phone is running a Webserver 24/7 and gets the signal like that

So in general the question is how can my PC/Phone etc. wait for a signal/data (Im talking 1, 2 or 3 bytes) in the background efficiently


Solution

it Highly Depends on the Operating System that the Program is Running on and also each OS has its own specific Security & Privacy Policy. However, all of them have a Common Agreement that this Types of Operation should be Handled in Background Processes as Secure Lightweight as Possible. so for your listed solution the closest one is 1th case.

2th Case almost Impossible because it is in Contradiction to being Lightweight
3th Case totally wrong way



Answered By - A Farmanbar
Answer Checked By - Gilberto Lyons (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing