This question already has answers here:
How can I detect whether a user deletes the Telegram Bot chat?
(4 answers)
Closed 6 years ago.
What should happen when bot sends any message to user which blocked/stopped him? Can I catch this events with Bot API?
You can understand if bot was blocked/stopped only if you send a message to a user - you will get an error. It's the only way for now :(
Related
This question already has answers here:
How to target a logged user with FCM? [duplicate]
(1 answer)
Sending Firebase Push Notifications to Logged-in Users Only
(2 answers)
Closed 2 years ago.
I would like to send notifications (or at least make them readable) only to users that are logged in on their devices. I could on each login and signout edit the realtime database and let the function that sends out notifications check it, but I was wondering if there was a simpler way to do this.
Firebase Cloud Messaging has no knowledge of users, so any time you want to relate messages to users you will have write code to do this. What you're describing is indeed a common way of doing this: write the token to a database when the user signs in, remove it from that database when they sign out.
Also see:
Sending Firebase Push Notifications to Logged-in Users Only
How to target a logged user with FCM?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 3 years ago.
Improve this question
I have applied for public account twice in the last year and i never received an email from Viber that I have been approved for a public account. And now i don't even see the form you have to sign up in order to apply for a public account and get the api key from Viber.
I want to be able to send messages to my clients using Viber, is there a way I can do that?
btw, I know you have to be a big company in order to have a Viber key, but in my country I saw that they are companies that are big as mine and have obtained a key and I can't and that drive me nuts :( Any help will be thankful.
I want to try and use this library - https://github.com/Bogdaan/viber-bot-php
Viber Public Accounts are no longer supported and have been replaced with Viber communities. Right now, there is no way how to programmatically send messages to Viber Communities. I think that you search for Viber Bots or Viber Service messages - notification messages replacing SMS.
In the first case, you can use https://partners.viber.com/ to register your account and get the api key.
Viber Service Messages are paid per message sent and available through several providers.
Simply got to https://partners.viber.com/ and register new account.
You'll receive approve code to your viber app, and you'll be able to receive chat bot API key when complete registration at yours viber APP.
This question already has answers here:
Detect permission of media library ios
(3 answers)
Closed 6 years ago.
In iOS 10, if an app accesses the music library, an Alert will be presented asking if the user gives permission for this access. This Alert is not part of the App. Is there some notification mechanism so that the App can be informed (a) that the Alert has been presented and (b) when the user has responded one way or the other?
The only work-around I have found is to relaunch the App after giving permission - not a very satisfactory way to deal with this.
Before accessing, request authorization yourself. See MPMediaLibrary.requestAuthorization(). It has a callback with the resulting status. You can also check the authorizationStatus() directly.
This question already has answers here:
Send mail without MFMailComposeViewController
(3 answers)
Closed 8 years ago.
I want to send email from my iOS App, without showing native mailComposeController.
I want to fill its email text body and other attributes at back end, I know this is possible but my question is how can I send email without presenting mailComposeController instead of on just the button click(my email sent).
Any help will be appreciated.
Thanks!
You can't, since this will be a breach of privacy.
For example you could get the user e-mail address without their consent.
An option would be to create your own API to send the e-mail or send it via SMTP directly.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
How to programmatically send SMS on the iPhone?
How to develop/code an application which could send sms from iPhone with text in it.
It's not possible to send an sms message from your application. You could for example make an application that connects to your server and sends the message from there.