OkHttp Post Body as JSON

References https://stackoverflow.com/questions/34179922/okhttp-post-body-as-json

Continue reading »

Detect screen rotation on Android

Manifest:

Activity:

References https://stackoverflow.com/questions/6896243/how-can-i-detect-screen-rotation

Continue reading »

Show Progress bar while loading image using Glide

References https://stackoverflow.com/questions/35305875/progress-bar-while-loading-image-using-glide

Continue reading »

Building a Url with Query parameters in OkHttp

References https://medium.com/square-corner-blog/okhttps-new-url-class-515460eea661

Continue reading »

Detect if App is in release or debug mode in android

Make sure you are referencing your project’s BuildConfig class, not from any of your dependency libraries.

References https://stackoverflow.com/questions/23844667/detect-if-i-am-in-release-or-debug-mode-in-android http://tekeye.uk/android/examples/android-debug-vs-release-build

Continue reading »

Avoid delay in Android GCM messages / change heartbeat

References https://stackoverflow.com/questions/19560448/how-to-avoid-delay-in-android-gcm-messages-change-heartbeat https://github.com/joaopedronardari/AndroidHeartBeatFixer

Continue reading »

Detect when the last item is shown on RecyclerView

Useful info

References https://stackoverflow.com/questions/26543131/how-to-implement-endless-list-with-recyclerview

Continue reading »

Badge for TabLayout using setCustomView

layout/tab_header_badge.xml

References https://mobikul.com/make-custom-tabs-icons-android/ https://stackoverflow.com/questions/41530141/how-to-show-notification-counter-in-a-tablayout https://stackoverflow.com/questions/43266079/how-to-add-badge-to-android-tablayout

Continue reading »
1 2 3 27