In my current project at work, I had a task to add run time permissions in an android app whose code is very old and using legacy methods and frameworks/tools. Normally, I use Ted Permissions in all my apps for the runtime permissions and I must say that it’s one hell of an amazing library I ever saw and given the complex scenario and flow of runtime permissions in Android (thanks to Google who always makes sure to make every thing more complicated than ever), this library makes the runtime permissions like a breeze.

Continue reading

Today, when I was working on a project, so I had a situation where I had to perform a very tiny operation in background in Android. I had lots of ideas such as AsyncTask or Thread or using such powerful framework like RxJava or using new APIs such as JobDispatcher or WorkManager etc. You can read about these options in this good article by Ali Muzaffar. But my major concern was that my requirement was a very simple and little one.

Continue reading

Next Stop: Flutter

My first talk on Flutter vs. Other Frameworks Me giving talk on Flutter I recently shared with you about Pakistan’s first Flutter meetup in Karachi. Well, it happened on 10th November, 2018. Flutter Meetup #1 — Karachi It was organized by Flutter Karachi in collaboration with 10 Pearls University as venue partner. There were about 40+ persons who attended the meetup. More than 75% were professionals in various tech such as web development, mobile development, backend etc.

Continue reading

Today, I had a huge Json in my app and I wanted to fetch all these values in a general way. I also wanted to parse Json for only one time to avoid try/catch each time I access any value. So, first thing I had in mind was to convert the JSONObject in the HashMap or Map<> etc. So if you are using Gson in your apps for json mapping, then you can use this one line code for conversion.

Continue reading

I don’t know much about this but I will try my best! Photo of Deosai Plains (Pakistan) February 2018. I left my previous job and started looking for a new job. I had some interviews lined up. I had 7+ years of hands-on experience on mobile development, two world wide published books on Android, few open source libraries and a good portfolio. What I didn’t have was the self esteem and confidence.

Continue reading

To showing/hiding the password dots in the EditText in android, here’s the easy one-line way. Here’s the dummy layout with an EditText and a CheckBox for toggling the password dots. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="16dp" android:orientation="vertical"> <EditText android:id="@+id/edtPassword" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Enter password" android:inputType="textPassword" /> <android.support.v7.widget.AppCompatCheckBox android:id="@+id/checkbox" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Show Password" /> </LinearLayout> Now, you can toggle the password on the OnCheckedChangeListener using this snippet. checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean value) { if (value) { // Show Password edtPassword.

Continue reading

I have always been more focused on writing and reading medium than the listening and speaking. But, recently I have started giving talks and doing public speaking a little. And I must say that I have been enjoying it a lot. And then an opportunity knocked my door and presented an other option for me to explore. That was podcasting and sharing my knowledge through audio channels. I have never created or talked in any podcast, so I was curious and interested at same time to explore this and see how this plays for me.

Continue reading

Author's picture

Wajahat Karim

Android Developer. Open Source Contributor. Writer. Speaker

Senior Android Developer

Karachi, Pakistan