How to Download telegram animated stickers with telethon - telethon

I've downloaded an animated sticker with client.download_media(sticker_document, "any_stciker.webp"). The client is telethon bot client; for instance client = TelegramClient('', api_id, api_hash).start(bot_token=token). But downloaded stickers are corrupted and I can't open them. I've downloaded normal stickers(not animated) through this method and they are ok.

Related

Push notifications using ConnectyCube on React Native

I'm trying to using push notifications using ConnectyCube on React Native. Main problem is that if I send a notification from the admin panel of ConnectyCube (or from source code), the admin panel says that the notification has been successfully delivered, but nothing happens on the android emulator. Maybe someone can think that there are some bugs client-side in the implementation of my onMessageListener:
notificationListener = firebase.notifications().onNotification((notification) => {
console.log("Hi!")
});
Anyway, if I try to send a notification through the Firebase console, all works and I receive the notification. Can you help me?
It seems that you are using a wrong method: https://rnfirebase.io/docs/v5.x.x/notifications/introduction
The React Native Firebase Notifications Module deals with notification-only and notification + data FCM remote messages.
For data-only FCM messages please see the Messaging module.
ConnectyCube sends a data push messages.
Therefore, please try using Messaging module according to this guide:
https://rnfirebase.io/docs/v5.x.x/messaging/receiving-messages

What could cause ti.cloud to stop display Android Push Notifications (GCM) in status bar

I previously setup an Appcelerator Titanium project with push notifications (as per my Stack Overflow question How to configure Android Push Notifications (GCM) in Appcelerator Titanium Dashboard?) and for some months my Android app has been receiving the appropriate push notification from GCM, but I'm now receiving reports that this no longer works from end-users.
The flow usually goes like this...
Android app sends android push token to my Java server
Java server persists the Android push token
Java server sets up Amazon Web Service SNS endpoint for GCM and stores this endpoint for later use.
(some time passes)
Java server invokes Amazon Web Service SNS endpoint with a GCM payload
Amazon SNS passes message to Google GCM
GCM passes message to ti.cloud / ti.cloudpush
Phone displays push notification
The app does receive the push notification and I display an application dialog to show the contents of the message, but NO system-tray push notification is displayed, whereas I thought it was doing this in the past. No system sound is played either.
I can see that if the app is not running, then when the push notification is received the app is launched, but if the display isn't on (or locked) then the message will not be discovered for some time. I really need the native/system push notification to be in the tray.
Does anyone know why system / status notifications are not displayed? Should it be when using the ti.cloud / ti.cloudpush for Android?
Thanks
Rob.

WL push notification callback not being invoked in iOS when app is in background

We have push notifications working successfully. Backend event source is a Worklight adapter written in JS using the 'WL.Server.createDefaultNotification' and 'WL.Server.notifyAllDevices' API calls to send unicast notifications. In the front-end, the app is registered for push notification call back using 'WL.Client.Push.registerEventSourceCallback' JS API.
These particular scenarios are not working:
App is open in the background after login. Notification message is received, but user does not tap notification banner message - and instead just opens app by touching app icon. Notification callback method is not called - and subsequently payload from the backend is not available for the method.
App is open in the background after login. Notification message is received which only has iOS badge change and payload but no notification message for the banner or lock screen. In which case user has nothing to tap on. When user opens the app again - notification callback is not called.
Knowledgecenter documentation seems to indicate that the callback method should be getting invoked even if the app is running in the background. This is with Worklight 6.2.0.1.
Push is indeed supposed to work as you've describe. This is a bug.
This is no manual workaround for this.
If you are an IBM customer or Business Partner you will need to open a PMR (support ticket).

How to send image using gcm in android?

I am working on a project which will implement chat feature. I am using GCM to send message and working fine. But i want to send image just like facebook chat. After searching google i found that we can send image by encoding the image into base64 string. But the message size of gcm is up to 4kb so i can not send image like that. Here i need to upload the image into server and then needs to send the user a link and fetch the image from that link. But i think this will be a slow process . What can i do know?
I am sending message to others directly from my device using gcm. Please help me. I already found AirBop. But is there any other solution to send image?
you have to upload the image without GCM, On your server you have to had application that read the file from your device (Via Socket), and return the URL of the saved image, then the device send a link via gcm (as text) the partner gets the link and download the image.

how to send push notification without apple device

is it possible to send push notification for apple without apple device? I would like to send push notification using any page or service from apple, but not using an app created in xcode for example. My app that will get the push is ready and working, but I would like to send the push from a normal page, not from mac or iphone app.
Apple push notifications can only be send to Apple devices (iOS, OSX or Safari for Mac).
However, you can send the notification from any type of operating system using the Apple Push Notification Service API:
https://developer.apple.com/library/ios/documentation/networkinginternet/conceptual/remotenotificationspg/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9
Yes, you can do that for free with using a push notification API, such as Spontit.
See the API docs here: https://api.spontit.com/
See the Python wrapper here: https://github.com/spontit/spontit-api-python-wrapper