Why do some telegram channels use names and others not? - telegram

Usually, telegram channels use specific names for shortcut links, e.g.:
https://t.me/lifeyt
However, sometimes I see channels without a specific name but with the join link:
https://t.me/joinchat/AAAAAEG9D2xsO4xhFP_EFQ
Any idea why is that?

This is a matter of channel types. Public channels have a link which can be set manually. A private channel has a randomly generated link. It can be revoked/reset any time.

Related

how to change device id (google smart home action)

this might sound like a weird question, but is it possible to change the id of a device?
The unique id that i was using will desapear in my system source so i would like to change it.
I noticed that if a change the ids that are returned by the sync request the users will loose their customization in google home (the name of the device if they changed it and the associated room)
I would like to change it without loosing that.
The device ID is the string that identifies the device. There is no way to change.
The ID of the device in the developer's cloud. This must be unique for the user and for the developer, as in cases of sharing we may use this to dedupe multiple views of the same device. It should be immutable for the device; if it changes, the Assistant will treat it as a new device.
If it is going to change in some source, you should find a way to continue the value through some sort of proxy.

Android notification channel maximum count

I am new to implement Android notification channel in Oreo. What is the maximum number of notification channels for a single application. Can we create unlimited channels or it has some count?
As far as I know there is no limit on the number of channels an app can create. The only purpose of NotificationChannel is to give more control of notification behavior to the user. It is no way to reduce the number of notification per app.
You can read about Notification Channel in detail at Create and Display Notification on Android Oreo | With Example
There is a limit that is not documented on the number of channels you can have at the same time, but no limit on how many times you can create a channel, as long as you have deleted other channels.
The file PreferencesHelper.java contains a limit that is currently set to 50.000
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/services/core/java/com/android/server/notification/PreferencesHelper.java
And this is being used to restrict the creation of more channels when it goes over that limit, throwing the exception "Limit exceed; cannot create more channels"
Unfortunately that value is not publicly accessible, so any limit check you might want to implement will have to be hardcoded by yourself. My suggestion is to set your own limit to a number that you think starts being unreasonable, and when that is reached you run a check on your notification channels to figure out what is going on, and fix it. For example, if your app will never need more than 5 channels to be created, then setting the limit to 6 would be a good way to start.
The commit https://github.com/aosp-mirror/platform_frameworks_base/commit/f528b337dd48b7e8071269e07e610bd4a3668c75 update the max notification channel to 5.000
Coming with Android Oreo, Notification Channels are something a developer uses to break down the notifications his or her app can give to us by type. The channels are decided by the people doing the developing, and the idea is to give us a way to separate out the notifications that are important to us from the ones that aren't, then decide how they will be shown. Some apps will have a lot of different channels. Some will have just a few and some will have only one.
In versions of Android before O, a developer used what was called a priority level to decide how to show you a notification. If they felt the notification was important, they could set it to peek (show a visual indication on your screen) or make a sound, or both. If they felt it wasn't it would just be placed in the tray for you to see the next time you went through them.
Now they break things out into channels and we get to decide how each type of notification is displayed. All notifications of the same type (for example, a reply on your Twitter feed) are placed into the same channel without any other types of notification grouped with them.
As a bonus, apps that allow us to use more than one account can have channels for each combined — your personal email and work email can follow the same rules and show you things the same way no matter which accounts received the notification.
You should read this:
https://developer.android.com/guide/topics/ui/notifiers/notifications.html#ManageChannels
Example:

Telegram Bot API: obtain all groups my bot is a member of

I'm looking for a way to see all chats/channels/groups my bot participating in except to use webhook or getUpdates method. These methods are not suitable for me because to use them you need to send a message to chat or do something like that and you have to repeat this procedure for every chat. Is there any way to get a list of all the groups at once not making any changes to them except adding the bot itself?
Unfortunately currently its not possible.

how to see if a member has left from a telegram channel?

I want to develope a bot in telegram to set as the admin of my channel.
And I want it to notify me whenever a member leaves the channel. And I want it to tell me who it was. and I prefer to have name or username.
I think you can. If you can see all subscribers in your channel and you can make a program to identify who lives your channel by checking and substracting existing members vs last members & you can set activity starter when member counts change
#fkadeal this is my idea & it's not tested yet
Unfortunately, you can only get member count at this time, even your bot is admin, can't get full list of member, you can just clumsy track users by their ID.

telegram private channel unique invite link

i create a private channel in telegram.
i want to know if there is any way to create an unique invite link that i can share to people i want to join my channel. unique like single use.
actually telegram gives you an invite link but its always the same so if i give it to a person he can give it to anyone he wants. i need a method to avoid this. i'd tried some url shortening services to hide the invite link but at the end they still show the iniztial invite link.
any suggestion?
i'd tried http://once.ly/index.html
Edit:
Now you can generate unique links for different people, and limit how many people can join and change the expiring time!
Original answer (2017):
There is no way to create a unique invite link at this time.
But if I were you, I would create a bot, send link via bot with inline button, which is default hiding link behind text.
For example, you give your user a link like t.me/bot?start=channel_link, and when your bot received /start channel_link, send a message with inline button with url parameter.
Try this one from the documentation.
start=channel_link
Ok, now this is possible using tg bots: the createchatinvitelink endpoint is available and has member_limit param. Set the latter to 1 and the link becomes "unique".

Resources