I have posted this question.
I thought that downloading the newest version of gcm will work, but I was wrong. I have downloaded latest version of gcm but still I can't receive notification. I have a GOOGLE API KEY and a sender ID.
Everything is fine when I register the ID - it works fine and it shows in database, but when I try to send a message from the server to my android device, I am not getting the message from the server.
Can any one help me? I have tried some examples as well, but they aren't working. Does anyone have working example, or is my API key is not valid?
Please check your server code whether it access the registration ID of registered android device.
The following link has exact explanation of GCM with simple client side code and server side code.
http://avilyne.com/?p=267
Related
I whish to create a simple Java project which uses FCM.
I found a lot of tutorials on the web, but unfortunately it is not really clear how it works.
I want to write a simple Java code which sends a push notification message to my phone device (android).
I read through the offical FCM website, but I cannot understand how can I make a real connection between my phone and my Java project?
It needs any device ID or token?
How it works?
Thanks a lot!
To send FCM messages from Java you can use the Firebase Admin SDK. See the documentation on sending messages for full details.
Note: this will only work from a JVM. It is not possible to use the Admin SDK in an Android project.
A little late my answer, a short code to send a notification from android, using: FCM-AndroidToOtherDevice
FirebasePush firebasePush = new FirebasePush("LEGACY_SERVER_KEY");
firebasePush.setNotification(new Notification("title","body"));
firebasePush.sendToTopic("news");
I have tried registering for GCM from Android and it works fine.
Is there any way I can register for GCM from server side using the gcm-server API?
The mechanic behind GCM message receiving is there is a process running in the background waiting for those messages sent from GCM server before passing to the specific app registered. In the other words, you need a platform to make GCM works or it has no way to receive a GCM message.
So the answer is no. You cannot register your server with GCM since there is no mechanic to send those message back to your server. So far there are only three platforms that support GCM: Android, iOS and Chrome.
In working with wso2emm, I've noticed a particular behavior that we'd like to change on our end. This is that when you issue a deploy to a set of devices, the server will send one json message informing the client of a new update to their software, and if anything goes wrong in the process of downloading the update, the json message is lost.
I've saved this on the client end so that we can catch errors and retry and resume downloads. My question is, since I'm unfamiliar with a lot of web development, where would one look to modify the logic for sending out messages to mobile clients?
If your are using LOCAL notification for android, server add the message of update/install software in an API.
When android pull from server, device read that message and marked it as read into database status. Then server remove that message from API queue.
If your are using LOCAL notification for android, you can take any of these approach to find out what really happening.
Approach 1:(little bit manually)
Change android side code for sending version of device apps into server and change server side code to display app version in deivce tab UI.
Then cross check that your app have latest version or backdated version. If it have backdated version, then send update to that device/s.
Approach 2:
Do not mark as read this update message when 1st read this by device from API message queue.
Update read status after successfully update/install new version.
I am trying to get my app id from Telegram API by using the method register.saveDeveloperInfo, but I cannot find the way to do it.
I'm using de MTProto Java library.
This is what I had done by now:
I made my own register.saveDeveloperInfo implemmentation in Java.
I call the method with the corrects params (https://core.telegram.org/api/obtaining_api_id)
The method returns a true boolean but I have not received the sms with my app_id.
When I enter in my app section of the telegram web (https://core.telegram.org/myapp) shows the "Your app is not ready yet" message.
Anyway, I'm trying to use the app_id from the source code of the official client but I can't send or receive message.
Does anyone know how to do it or where can I find more information?
You can get your app api_id and app api_hash from your Telegram app page. This is what you'll be using as of this writing. If you are asked a password, provide the mobile phone number you'll be using to develop and Telegram will send you the password.
If you are asked a password and Telegram didn't send it to you, try to provide the mobile phone number without "+".
Try disabling any anti-spam software or VPN. Disabling ABP for https://my.telegram.org/apps helped me
Im trying to make a simple app (just for learning sake) that will be able to send and receive emails from my own server. I don't have a problem sending emails from my app, my problem is:
How do you receive push notifications from the email server
Have the app check inbox, refresh the inbox list
I have tried searching for this, but have found nothing.
Thanks for your help
C2DM does push notifications, depending on your server. Search stackoverflow for it.
The app can check the inbox with whatever API is available to get the server's status. Even HTTP is possible.
The SampleSyncAdapter sample app is an example of using a sync adapter to regularly synchronize data between the server and the device, but you can use the same idea for download-only.