<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vedprakash Rout on Medium]]></title>
        <description><![CDATA[Stories by Vedprakash Rout on Medium]]></description>
        <link>https://medium.com/@vedprakashrout?source=rss-3ce52d25e110------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RjSxhK6MELTL8pr9XBXv2A.jpeg</url>
            <title>Stories by Vedprakash Rout on Medium</title>
            <link>https://medium.com/@vedprakashrout?source=rss-3ce52d25e110------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 22:25:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vedprakashrout/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Security issues with Android Accessibility]]></title>
            <link>https://medium.com/android-news/android-accessibility-75fdc5810025?source=rss-3ce52d25e110------2</link>
            <guid isPermaLink="false">https://medium.com/p/75fdc5810025</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[voodoo]]></category>
            <category><![CDATA[android-security]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Vedprakash Rout]]></dc:creator>
            <pubDate>Mon, 22 Aug 2016 19:24:10 GMT</pubDate>
            <atom:updated>2016-09-15T19:22:58.825Z</atom:updated>
            <content:encoded><![CDATA[<p>There is a pretty famous app in India known as <a href="https://play.google.com/store/apps/details?id=com.voodoo.android&amp;hl=en">Voodoo</a>. What it does is it reads text from certain e-commerce apps and then compares it across other platforms and then shows you best options to buy. A lot of other apps also ask for this Accessibility permission. Reading screen text is a area which developers rarely touch and care about but this can cause to a major security loophole in your app.</p><p>So to begin with, Voodoo asks the users for the accessibility permission in order to work. Now the accessibility permission is tricky. It says the app can read text from the screen. But the users assume all the sensitive fields are blocked from the accessibility scope. This is where developers have to take care of.</p><p>There is a new login design widely used these days in which users are given an option to show or hide the password while typing or before submitting. Now all the views emit Accessibility events and an app with the accessibility permissions can receive those events and can get access to some crucial information. For a Text-Field(EditText in android) one can get the id Of the view,the activity where the view is and the <strong>“Text typed on the Text-Field”</strong>.</p><p>This issue is a problem as really big tech companies(e.g <a href="https://play.google.com/store/apps/details?id=com.flipkart.android&amp;hl=en">Flipkart</a> and <a href="https://play.google.com/store/apps/details?id=net.one97.paytm&amp;hl=en">paytm</a>) are vulnerable to this issue.Even your <a href="https://play.google.com/store/apps/details?id=com.whatsapp&amp;hl=en">WhatsApp</a>. Here are some screenshots of this issue in action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*gHD27MwnKCz9Pmhfdqrk5Q.gif" /><figcaption>Reading messages from WhatsApp</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/209/1*pytiYoD0vzqdZQFj6nq2KQ.gif" /><figcaption>Reading password from Paytm app</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/209/1*jSnpJsE7-R643GvhC0EDVw.gif" /><figcaption>Reading password from Flipkart app</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/209/1*uZC-nS8u9OAwwhWf-DdoCQ.gif" /><figcaption>PhonePe(Flipkart’s UPI app in India)</figcaption></figure><p>So the issue here is the text on text fields with input type set as password are default set to null but in order to show the text some apps set the input type to normal on user action and end up exposing the password. Since it emits the view’s id and we can know the current screen it’s easy to get the user’s sensitive information.</p><blockquote>Since Marshmallow in some cases the ID can be null but still one can figure out the activity name and from all the get all the text printed on a screen launch and get the credentials easily</blockquote><p>I have made a sample app which you can downlaod from this github <a href="https://github.com/bpr10/AccessibilityDemo">repo</a>(Inside APK folder).This app need accessibility permission to work. With accessibility permission it prints all the readable texts on it’s own UI.</p><p>This can be harmful as the users are currently unaware of the implications of accessibility permission and assume that sensitive information will anyways be hidden even to the apps with accessibility permission. So it’s up to the developers to handle these scenarios. Well it’s fairly simple.</p><pre>ViewCompat.<em>setImportantForAccessibility</em>(your_view,<br>ViewCompat.<strong><em>IMPORTANT_FOR_ACCESSIBILITY_NO</em></strong>);</pre><p>As per the responses to this post by <a href="https://medium.com/u/4e0218afaa61">Alan Viverette</a> and <a href="https://medium.com/u/c09b24c8e7b2">Ataul Munim</a> doing this will stop legitimate accessibility apps like <strong>Talkback</strong> to access these views. So for visually impaired users it will be hard to use these fields. <a href="https://medium.com/u/c09b24c8e7b2">Ataul Munim</a> suggests another <a href="https://medium.com/@ataulm/a-few-weeks-ago-android-weekly-promoted-a-post-highlighting-a-security-issue-with-the-android-5eae7ff6b8aa"><strong>approach</strong></a> which warns the user if any other accessibility service is running. So you can consider using that as well.</p><p>But considering the major app user audience and the any other apps which ask for accessibility which can not be trusted this fix suggested can help.So use this fix with<strong> caution.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75fdc5810025" width="1" height="1" alt=""><hr><p><a href="https://medium.com/android-news/android-accessibility-75fdc5810025">Security issues with Android Accessibility</a> was originally published in <a href="https://medium.com/android-news">AndroidPub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lamda Expressions in JAVA 8 and Android Studio]]></title>
            <link>https://medium.com/@vedprakashrout/lamda-expressions-in-java-8-and-android-studio-e0ad2cc11f82?source=rss-3ce52d25e110------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0ad2cc11f82</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[java8]]></category>
            <category><![CDATA[lamda]]></category>
            <dc:creator><![CDATA[Vedprakash Rout]]></dc:creator>
            <pubDate>Tue, 07 Jun 2016 07:00:06 GMT</pubDate>
            <atom:updated>2017-01-09T13:20:43.460Z</atom:updated>
            <content:encoded><![CDATA[<p>JAVA is cool,but when it comes to callbacks via interfaces the boilerplate code seems way too much which kind of irritates all programmers. From now on starting with JAVA 8 we can solve this problem with using Lamda expressions. Though the title suggest its for both JAVA 8 and Android, but I will primarily write about using Lamda expressions in Android Development with Android Studio as that kind of covers both. So lets get started.</p><h4>Benefits:</h4><p>Before jumping into how to implement this let’s just look how much Lamda expressions can help in reducing boiler plate code:</p><p><strong>Before</strong></p><pre>view.setOnClickListener(<strong>new </strong>View.OnClickListener() {<br>  @Override<br>  <strong>public void </strong>onClick(View v) {<br>    v.setVisibility(View.GONE);<br>  }<br>});</pre><p><strong>After</strong></p><pre>view.setOnClickListener(v -&gt; v.setVisibility(View.GONE));</pre><p>Cool,Right!!</p><p>So, there are two ways to add lamda expression support in Android Studio. <strong>RetroLambda </strong>and Using <strong>JackCompiler</strong></p><p><strong>JackCompiler</strong>:</p><p>To use JAVA 8 features on your andorid project add this to your build.gradle file of your <strong>module</strong> .</p><pre>android {<br>  ...<br>  defaultConfig {<br>    ...<br>    jackOptions {<br>      enabled true<br>    }<br>  }<br>  compileOptions {<br>    sourceCompatibility JavaVersion.VERSION_1_8<br>    targetCompatibility JavaVersion.VERSION_1_8<br>  }<br>}</pre><p><strong>RetroLambda:</strong></p><p>Add <em>me.tatarka:gradle-retrolamba</em> plugin to your application level build.gradle file as dependency.</p><pre>buildscript {<br>    repositories {<br>        jcenter()<br>    }<br>    dependencies {<br>        classpath &#39;com.android.tools.build:gradle:1.4.0&#39;<br>        classpath &#39;me.tatarka:gradle-retrolambda:3.2.5&#39;<br>   }<br>}</pre><p>In your app module build.gradle file add this.</p><pre>apply plugin: &#39;com.android.application&#39;<br><strong>apply plugin: &#39;me.tatarka.retrolambda&#39;</strong><br><br>android {<br>    compileSdkVersion 22<br>    buildToolsVersion &quot;23.0.0 rc2&quot;<br><br>    defaultConfig {<br>        applicationId &quot;com.demo.retrolambda&quot;<br>        minSdkVersion 22<br>        targetSdkVersion 22<br>        versionCode 1<br>        versionName &quot;1.0&quot;<br>    }<br>    buildTypes {<br>        release {<br>            minifyEnabled false<br>            proguardFiles getDefaultProguardFile(&#39;proguard-android.txt&#39;), &#39;proguard-rules.pro&#39;<br>        }<br>    }<br><br>    <strong>compileOptions {<br>        sourceCompatibility JavaVersion.VERSION_1_8<br>        targetCompatibility JavaVersion.VERSION_1_8<br>    }</strong><br>}<br><br><br><br>dependencies {<br>    compile fileTree(dir: &#39;libs&#39;, include: [&#39;*.jar&#39;])</pre><pre>}</pre><p>Done. Now you can have java 8 features along with Lamda expressions on your project.</p><p>Now to help you with deciding which one you should use here is an comparison of number of methods from <a href="https://medium.com/u/8ddd94878165">Jake Wharton</a>’s talk which clearly says <strong>Jack Compiler</strong> <strong>is your best friend</strong> if you are using build tool version 24.0.1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*RKgIC1m-b6DCE-bcPyAlBA.png" /><figcaption>Jake Wharton: Exploring Java’s Hidden Costs <a href="https://www.youtube.com/watch?v=WALV33rWye4">https://www.youtube.com/watch?v=WALV33rWye4</a></figcaption></figure><p><strong>Issue with Lamda expression. </strong><br>1. Can’t be used with interfaces that have multiple methods with same method signatures.</p><p><strong>Some Samples</strong></p><pre>n -&gt; n % 2 != 0;<br>(char c) -&gt; c == &#39;y&#39;;<br>(x, y) -&gt; x + y;<br>(int a, int b) -&gt; a * a + b * b;<br>() -&gt; 42<br>() -&gt; { return 3.14 };<br>(String s) -&gt; { System.out.println(s); };<br>() -&gt; { System.out.println(&quot;Hello World!&quot;); };</pre><p>Check out this <a href="https://dzone.com/articles/java-lambda-expressions-basics">link</a> for more:</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0ad2cc11f82" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>