Re:WhatsApp is blocking Telegram links
by mschultheiss on Tuesday December 01, 2015 @12:52PM
(#10657343)
I guess this code is only used when sharing something from WhatsApp to Telegram. If you share a picture for example, it removes the "Sent from Whatsapp" advertisment message.
Correct me if i am wrong...
[ Parent
| on HN ]
Re:WhatsApp is blocking Telegram links
by rms_returns on Tuesday December 01, 2015 @01:15PM
(#10657525)
No. This is inside the handleIntent() method which is like a main entry-point inside that Activity. And the intent being handled here is the ACTION_SEND. In simple words, when a message is being sent:
Intent.ACTION_SEND.equals(intent.getAction()))
And no, it isn't just removing "Sent from Whatsapp", it is setting the sendingText variable to null, which will result in:1. The message not being delivered.
2. The exception block being fired where this toast message will be displayed to the user: "Unsupported content"
Re:WhatsApp is blocking Telegram links
by mschultheiss on Tuesday December 01, 2015 @01:29PM
(#10657617)
1. Thats wrong, the variable sendingText is generated of Intent.EXTRA_TEXT (see http://developer.android.com/training/sharing/send.html for details) so it is definitely for handling shared content.
2. error=true is set in the else if case, which can not be stepped into anymore after having checked if the text contains "WhatsApp"