1. Thats wrong, the variable sendingText is generated of Intent.EXTRA_TEXT (see <a href="http:&#x2F;&#x2F;developer.android.com&#x2F;training&#x2F;sharing&#x2F;send.html" rel="nofollow">http:&#x2F;&#x2F;developer.android.com&#x2F;training&#x2F;sharing&#x2F;send.html</a> for details) so it is definitely for handling shared content.<p>2. error=true is set in the else if case, which can not be stepped into anymore after having checked if the text contains &quot;WhatsApp&quot;