I am developing a location based android app and I want that the app should send me the location data on my server whenever I request using a button on my web page. So how can I send a signal from my website to the android app so that it starts functioning only when I send a request ?
Thank you
The Google Cloud Messaging Service would be a good starting point.
Basically you need a Push Notification in your project. The push Notification will allow you to send a signal from website which will catch at mobile side and perform operation accordingly.
Related
I don't know if it has already been answered or not. But here is my case:
I have a PHP web app that interacts with TELNYX API (An API to send and receive messages), when someone sends me a message, the TELNYX API sends a webhook to my PHP web app where I can see who sent me the message and what's the content in there.
Now what I want is to send that data(webhook's result) from the PHP web app to my Android Application. Now is there any way that I can continuously listen to the server and whenever the server receives the webhook, it forwards those hooks to my android app?
I am developing an application, where a random number is being generated in an android app, and after that, I am inserting that code in Web Base app.
What I am looking for is, when I am updating the value from web app to MySql database, I want at the same time, to show a message on android app that number has been saved, without doing any action in Android app.
signage-e36e0: null
I have tried Firebase, but I don't think Firebase would be needed.
Any help would be appreciated.
You can show a message in the app once the Webcall for sending rendom number is finished from app side you can know that event in HTTP Client you are using.
If it's not possible for you to listen to HTTP Response then You can utilize Firebase Cloud messaging(FCM) for this.
When you change the value in the database you can send the message to the app via FCM and app will show a message on the screen based on that message.
https://firebase.google.com/docs/cloud-messaging/
I have created a small App that's able to receive Push Notifications from the FCM Console.
What i want to do now is to send a Push-Notifications to all Android Phones that got the app Installed using the API. And this is where i got completely lost.
Is there no way to send it to all Phones without collecting all the registration-ids?
Does this only work with the Console but not with the API?
thanx in advance
Sending a message to all the phones like what you do from the Firebase Web Console is only possible from the Web Console.
If you need this feature from the API you can submit a feature request:
https://firebase.google.com/support/contact/bugs-features/
Another possibility is to have all the client registering to a specific topic via FirebaseMessaging.getInstance().subscribeToTopic(topicName)
In this way you can send a message to the whole topic without collecting the registration-ids manually.
I have to send notification from server to android device. I developed application which got notification from server by using GCM (Google Cloud Messaging). But as I already have server then why to use GCM. I am not getting the purpose of using GCM. Can we send notification from server to android application without using GCM.
General Communication Pattern :
Device --> HTTPRequest -- >Server , Server -->HTTPResponse --> Device
But in this case, the device gets a response only when you send a request from your device to the server. Hence, whenever you need something new from your server you need to make a
request.
Using GCM, you do not need to make this request explicitly to your server. You'll automatically be notified when something new happens (depending on your implementation).
You are having server but GCM is totally different thing then your server.
GCM will monitor Your Application server that any changes made or not ??
And if anything created then it will send you notification without refresh or reload the Application.
and GCM will send you notification when your application is not working as well
I went through this tutorial and was successfully able to send push messages from the server to my Android app. How can I send any file from the server to my app in the same way. I am using Google Cloud Messaging service.
Using Google Cloud Messaging you can send to device very small block of data, so I think it's impossible to transport file's content with push. But you can send link to the file or file id in the push data block and background service in your aplication will start download after receiving this push.