Menu
  • HOME
  • TAGS

How to make a circular progressBar like telegram?

android,telegram

Create a rotate.xml in res/anim folder: <?xml version="1.0" encoding="UTF-8"?> <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:duration="1600" android:fromDegrees="0" android:interpolator="@android:anim/linear_interpolator" android:pivotX="50%" android:pivotY="50%" android:repeatCount="infinite" android:toDegrees="360" /> Load anim and run in code: view.startAnimation(AnimationUtils.loadAnimation(activity, R.anim.rotate)); ...

How to send message from Website To Telegram APP

javascript,html,mobile,sendmessage,telegram

iT's called URI Scheme Hope this one save someone else's time :) <a href="tg://msg?text=your MsG!" id="telegram_share" class="mobileShare" title="inviteFriends" alt="telegram_share"></a> right Now it only works on IOS...

Pass string to a linux cli interactive program with a script

linux,bash,telegram

See here: remote control with Telegram To intercept a new incoming message we create a file action.lua "Lua is a powerful, fast, lightweight, embeddable scripting language. Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting...

unicode characters (like emoticons) in telegram bot message (or keyboard)

php,unicode,telegram

"\u2b50" PHP string literal syntax doesn't have \u escapes, primarily because PHP strings are not Unicode-based, they're just a list of bytes. Consequently if you want to include a non-ASCII character in a string you need to encode the character to bytes using whatever encoding the consumer of your...

Telegram Bot custom keyboard in PHP

php,bots,telegram

The docs seem to indicate you need to provide the reply_markup parameter as a JSON serialised object... kinda stupid for a form POST endpoint: $replyMarkup = array( 'keyboard' => array( array("A", "B") ) ); $encodedMarkup = json_encode($replyMarkup); $content = array( 'chat_id' => <chat_id>, 'reply_markup' => $encodedMarkup, 'text' => "Test" );...

How to obtain Telegram chat_id for a specific user?

telegram

The message updates you receive via getUpdates or your webhook will contain the chat ID for the specific message. It will be contained under the message.chat.id key. This seems like the only way you are able to retrieve the chat ID. So if you want to write something where the...

How to receive images with the Telegram API?

php,json,bots,telegram

As it currently stands, it is not possible to download files from the Telegram servers with the Bot API. We can only hope they add this feature anytime soon.

Java Telegram API library - did someone use it?

java,rpc,telegram

I used older version of telegram-api, telegram-cl, telegram-mt and other depends to build Telegram S Edition, I success build it, but older version using old layer of telegram api so not supported new features. You can find older versions on github like: https://github.com/ex3ndr/telegram-api/tree/da63cf65f7332d7a4f17626de9b00e9030ecf5cc

Initial authentication: sending `auth.sendCode` and receiving `msg_container` instead of `auth.SentCode` in python

python,authentication,telegram

Well the problem was bad handling of the socket.. the server just sent two packets. The first packet was some Message_Service and the second packet was the data i actually want.. Its weird because it didnt say anything about these messages in the documentation...

Telegram bot API no JSON POST data on webhook

telegram

As they said we will send an HTTPS POST request to the specified url, containing a JSON-serialized It's a post, but they didn't mentioned any parameter for us to get it, just a JSON value, so try get the raw Input. For example in PHP I got it by using...

How to convert json to php array and use foreach on it?

php,json,telegram

<?php $response = json_decode(data(), true); if ( !$response['ok'] ) { die('not ok'); } else { foreach($response['result'] as $result) { echo $result['update_id'], ' ', $result['message']['chat']['id'], "\r\n"; } } function data() { return '{"ok":true,"result":[{"update_id":709393586,...

Do I need my server if I am using Telegram api's in Android?

android,xmpp,telegram

No. You dont need to setup server for your app. Telegram API will handle every backend activity. But if you want to make chat app using your own server, you can use Google App Engine or Parse.com

source code of Telegram iOS app could'not run on Xcode

ios,xcode,source,telegram

MtProtoKit requires https://github.com/kstenerud/iOS-Universal-Framework, so clone it, install "Real Framework", restart Xcode and enjoy!

Telegram on iOS application [closed]

ios,iphone,telegram

Use their API http://core.telegram.org They have an open sourced their official iOS App too. You can easily follow the code and build your own. https://telegram.org/apps#telegram-for-iphone...

Sending photo from URL with Telegram Bot

python,telegram

Try this: import telebot import time import urllib url = 'http://scontent-b.cdninstagram.com/hphotos-xfa1/t51.2885-15/e15/10919672_584633251672188_179950734_n.jpg' f = open('out.jpg','wb') f.write(urllib.request.urlopen(url).read()) f.close() def listener(*messages): for m in messages: chat_id = m.chat.id if m.content_type == 'text': text = m.text msgid = m.message_id if text.startswith('/photo'): tb.send_chat_action(chat_id, 'upload_photo') img = open('out.jpg', 'rb') tb.send_photo(chat_id, img, reply_to_message_id=msgid) img.close() tb =...

Peculiar Eclipse java.lang.UnsupportedClassVersionError, Unsupported major.minor version 52.0

java,eclipse,telegram

The JAVA_HOME environment variable is irrelevant to how Eclipse will run code, as far as I'm aware. Likewise the compiler settings you've shown for a project don't affect how code is run. Instead, you need to look at the Run Configuration you're using when you run it, and check the...

Telegram API send messages with php or javascript? [closed]

javascript,php,api,telegram

You can make use of the Telegram Bot API, it is an easy to use HTTP interface to the Telegram service. Use their BotFather to create a bot token. JavaScript (NodeJS) usage example: var TelegramBot = require('telegrambot'); var api = new TelegramBot('<YOUR TOKEN HERE>'); // You can either use getUpdates...

How does telegram shows the Icon of some websites?

html,css,metadata,telegram

Just add these tags to your website <meta property="og:title" content="Title" /> <meta property="og:site_name" content="Site name"/> <meta property="og:description" content="Description" /> <meta property="og:image" content="Link to your logo" /> ...

Android resizable Toolbar accordingly to scroll on Observable ScrollView

android,scrollview,toolbar,telegram

Android-ObservableScrollView is a library which helps build this functionality. It supports: ListView ScrollView WebView RecyclerView GridView ...

How we should send query to Telegram bot API?

api,telegram

You just send a POST request to: https://api.telegram.org/bot{token}/{method} For example: https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/sendMessage In the body of the request, you URL encode the parameters: chat_id=12345&text=hello%20friend For example, in Python using the requests module: import requests response = requests.post( url='https://api.telegram.org/bot{0}/{1}'.format(token, method), data={'chat_id': 12345, 'text': 'hello friend'} ).json() When a user chats with your...

Calling Telegram API to create a feedreader bot

php,api,telegram

You could just use my new library for the bot api of telegram! https://github.com/tekook/TelegramLibrary It features all functions of a new api and is an easy to use and event based libarry! Have fun!...