In a browser there is no stdin
, also known as a console. The input would most likely be from user input on the page in the form of an input field.
Most likely your structure is setup as follows:
Angular (browser) > API (server) > GCM (push) > Android Device
Here's an example of how you can take input from a user and send it to a backend api, the GCM portion is most likely already configured for your teams project.
const theForm = document.forms.theForm;
theForm.addEventListener('submit', (event) => {
event.preventDefault();
const data = new FormData(theForm);
data.append('movies', ["I Love You Man", "Role Models"]);
fetch(
'https://reqres.in/api/users',
{
method: 'POST',
body: JSON.stringify(data),
})
.then(resp => resp.json())
.then(data => console.log(data));
});
<form name="theForm">
<input type="text" name="name" placeholder="name" />
<button type="submit">Submit</button>
</form>