Category: java

SSL Pinning and Android

We are used to the idea that with SSL comes security and encryption but that’s not always the case, issues arise to the extent of compromising security entirely if we start thinking that as long as we use SSL we are safe. (more…)

Alarm Manager every week

This is how to fire an Alarm every week on Android. Since the Android device may restart multiple times during that period of time I’ve had a hard time setting triggerAtMillis in setInexactRepeating. I’ve finally settled on the following solution. (more…)

How to Nine-Patch Android

Nine-Patch for Android… I found this awesome tutorial here:

Slide Animations when switching from one activity to another – Java Android

Create a anim/ folder inside res/ in your Android Project and create the following files: slide_in_left.xml<set xmlns:android=””    android:shareInterpolator=”false” >    <translate        android:duration=”200″        android:fromXDelta=”-100%”        android:fromYDelta=”0%”        android:toXDelta=”0%”        android:toYDelta=”0%” /></set>slide_in_right.xml<set xmlns:android=””    android:shareInterpolator=”false” >    <translate        android:duration=”200″     

Handle Swipe Gestures in Java Android: Right to Left (Forward)

Hi guys, Instead of using a ViewPager you can handle touch gestures like this (Useful when you have only two views and you’d like to swipe only in a single direction – For example: Only Right to Left to go forward):  //This method is called everytime the user touches the screen    public boolean onTouchEvent(MotionEvent

How to pass CustomObject/ArrayList from one activity to another? Using Parcelable

We’d like to pass an Object from one Activity to another in Java Android, there are two ways to do this operation, the first one is to use a Serializable Object while the second one is to use a Parcelable Object.It is strongly recommended due to performance issues to use the first solution.Imagine you have a

Sort ArrayList, List Alphabetically in Java Android? No problem ;)

Just…  //Sort Alphabetically        Collections.sort(myList, new Comparator<String>() {            @Override            public int compare(String o1, String o2) {                return o1.compareToIgnoreCase(o2);            }        }); where myList is your List or ArrayList 😉

YouTube Downloader Android

YouTube Downloader: My New App! 😉  Download your videos from YouTube and convert them to MP3 from your Android Device! Convert your videos from YouTube to MP3s directly from your smartphone. Just open the official YouTube App, choose your video and tap on the share icon (top-right corner) and select YouTube Downloader, then Download your