Principle of getting new letters from my Google Account on device - java

I need information about getting new letters from my gmail mailbox: i turn on synchronization on my device, and when my mailbox get a new letter gmail client on my device will respond to it and show me notification. How does it work? Gmail client sends requests every second/minute or there is mean to respond to this event? I need it, because i have been making application which must respond to a new event in Google Calendar. Thank you.

Try this.
Might be helpful, I was trying something similar....

Related

Telegram Bot send message without user interaction

I've been searching in a couple of topics here about this matter but I can't seem to get it right for Java.
QUESTION:
How can I send a message from my bot without the enduser having to start any conversation or have any kind of interaction?
If you use C#, you Can use telegram.api and below code:
bot.sendMessage.send(bot.chat_id,"Your Message").ToString();

I want to send push notification in quickblox catting application

I am developing a real time chatting application in which i use QuickBlox demo. When user one and user tow both r on-line it works fine but when one user is of-line and some one sending a message to this user(of-line) user he doesn't get any message or notification when he come back on-line.
Can any one suggests me how to sent push notification in quickblox.
I think you should learn this carefully it defiantly work.
http://quickblox.com/developers/SimpleSample-messages_users-android

How to send a broadcast message with SmackAPI?

We're developing special devices that uses XMPP to talk to each other. A new API i am developing now, should talk to these devices too. The problem i am facing - all these devices are building little groups - for each customer we have... so we will have a chat-room for each group of devices, or, for each of our customer with his bunch of devices ;)
But now.. the api should be able to talk to every device that is connected. I don't need a real broadcast-mechanism - in the end, i will send a message only to one specific device..
But i don't want to login to each chat-room either - running a product with over 40k customers and much more devices, will end in a funny api, that is opening over 40k chat-rooms at startup... even if don't tried this yet, i can't imagine that an app like this will run well... even though we can have millions of customers in a few years.. i don't like solutions that will grow linear with the amount of customers, if you know what i mean :/
Now, basically i'm thinking of a solution, where i just can use the basic XMPPConnection to do my stuff.
MyCustomMessage msg = new MyCustomMessage();
msg.setTo("*"); // don't know what to address, i want to send it to "all"
msg.setFrom("ThatAPI"); // just a string telling that is sent from my java api ;)
msg.setEvent(event); // stuff that is coming through the parameters of the method where this code is inside
msg.setCustomStanza(data); // same here
connection.sendPacket(msg); // my try to send it to all till now..
Somewhere in the Ignite Realtime Forums i have read of one guy who "solved" it, but everything he says is "it's working now, i push my message through the sendPacket of Connection"... ok nice, my attempt of this seems not to work :(
Any better ideas/real implementations how this will work fine?
Basically i start to think that XMPP will not be the best technology to achieve something like this at all - i wish i could have a real/basic socket-implementation where something like this would be piece of cake.. But i can't choose - the third-party-system has implemented XMPP already... not enough time to change all of this... Just if you're wondering why we try this on XMPP..
You seem to have some conflicting requirements in that you want to send to all devices now, but only 1 specific device later. Are both models required at the same time, or do you plan on switching? How either is done would be different solutions.
As for your current approach, I think pubsub would make more sense than your chatroom approach, as that is oriented to generic message passing to subscribers.
You could set up a pubsub node per customer to send messages to all
of their devices.
As for a broadcast to all, you can make all devices
subscribe to a single pubsub node.
Thus you control broadcast and group messages by sending to the appropriate pubsub node.
For sending to a specific device, that is just a sendPacket to the specific entity, nothing really special there.

How can i get both sender and receivers mobile number in Android

I tried finding current mobile no of my app user but in my country the mobile no is not present in SIM so the current API returns null.
As a work around i thought i would just access the outbox of the user to get both senders and receivers no but unfortunately i am getting only receivers no.
Say for example I am user X and I send an SMS to user Y, through telephony API i am only able to get phone no of user Y to whom i am sending the SMS but not of user X.
Can any one suggest any other way i can access the current mobile no of any user??
Thanks
Pranay
Do you think this is what you are looking for? TelephonyManager::getLine1Number
(please, notice you are going to need the "android.permission.READ_PHONE_STATE" permission set in your app manifest.)

How to automate a text message?

I have a group that needs to send out announcements and current events via phone text message. I want to have a central phone number that when it receives a text message, it rebroadcasts that message to a growing list of subscribers. I'm hoping to use a Google Voice number to avoid buying an actual phone number.
Any ideas? I've thought about some type of Java/HTMLunit that continually parses the GVoice html inbox, but I just have that computer-gut feeling that there is a more intuitive way. I haven't been able to find a GVoice API, as I imagine that would be the trick.
Thanks
I've used a different approach. There's a number of E-mail to SMS services out there. So you send an e-mail (using standard JavaMail) to a specific address that is then associated with mobile phone numbers. I use TextMagic, but there are also other similar services out there. They also have API support, if thats what you'd prefer.

Categories

Resources