Let’s learn how to share an image on Facebook in Android using their ever-changing API. If you have used Facebook’s Android SDK, you know it can be a PITA to say the least. I think Mark should give the developers a vacation for heck’s sake!
How To Share An Image On Facebook In Android – Sample Code
Before you can use Facebook’s Android SDK in your Android application (to add features like sharing, liking etc), you have several options of including their SDK in your project. For instance:
Retrofit library is a Type-safe REST client for android and Java, courtesy of Square Inc. Most modern android apps make HTTP requests to some remote server somewhere in Antarctica or who knows where! Making such requests can sometimes be a pain in the … what did you just say? Using this retrofit library will save you a lot of pain as well as boiler-plate code. In this simple tutorial, I will show you everything you need to get started with it. Let us get started!
Retrofit Library Implementation Steps
Below are the steps we will follow while implementing this retrofit library in our android application.
Once in a while, you challenge yourself. Perhaps you have listened to so many people tell you that you couldn’t do it. You have read so many tutorials, so many books, watched so many YouTube videos; yet there is nothing to show for it. You are almost tempted to believe the hype; the idea that only a few talented people can write code (or craft code) and you are not one of them.
But one fine morning, you wake up feeling like you could take over the world. You believe in your powers. You convince yourself that you were born to do great things; because you don’t need someone to tell you that you don’t have what it takes.
Android swipe views provide lateral navigation between sibling screens such as tabs with a horizontal finger gesture (a pattern sometimes known as horizontal paging). In this post, I will be using a simple android app that I created this past weekend to show you how to create android swipe views. If you have used many android apps, there is a good chance you have seen android swipe views. If not, well, this is your chance to try them. So, here is how the app looks like using swipe views.
An android app prototype can be helpful when you want to build your next android app. Often, jumping straight to code is not the best thing to do, regardless of your experience developing applications. That being said however, sometimes the cost of prototyping tools is out of reach for many starting developers. Before Photoshop started offering their software for a monthly fee, you had to pay a huge amount to get it. If you do not want to pay that much money, Google Docs Drawing tool is your friend. All you need is creativity and time.
Let’s learn how to rotate an image in android. Perhaps one of your requirements is to display rotated images in your latest android app and you just want to get that done so you can move on to other important things like taking over the world. In this post, I will show just that. As you step through this code, I would urge you to read it carefully and see if you can notice anything good or bad about its readability. I try to improve everyday as I lean towards writing clean code. Please be my judge – I will not strangle you!
NetworkOnMainThreadException is a pretty popular exception among those new to android development. This exception is mainly thrown whenever an application attempts to make a networking operation (like an API call or Http request) on its main thread. The other aspect of this exception is that it is only thrown by applications targeting the Honeycomb SDK or higher. That means that anything below that will allow you to make network operations or requests in your main thread without causing the popular “YourAppName has stopped working …force close or wait” message. In this post, I will show you how to solve this problem once and for all.
Let’s learn how to create custom dialog in android and while we are at it, let us also do simple validation of the data the user entered before clicking the OK button! What is an alert dialog in android? It is a small window that asks a user to make a decision or enter more information in an app. You have probably seen a lot of them if you have used android apps in your smartphone. Anyway, the reason why I am showing you how to create custom dialog is because sometimes you may wish to have a different looking dialog box than what comes with your sdk and more importantly, you may wish to validate the data – without using your own custom dialog, it can be tricky …but not anymore! Let us take a look!
Welcome to: how to communicate between fragments and activities in your android applications. If you have not done so already, please check out my previous post on dynamic layout design using weights and fragments that I wrote yesterday! In the above linked post, I briefly talk about how to solve the problem of dealing with different device sizes by letting the android system adjust accordingly! In today’s post, we are going to take a quick look at how fragments can communicate back to the activity – basically how they can call back and forth to pass information when needed. Also, if you ever use fragments, you should always avoid trying to let fragments communicate with one another – it is a bad idea (will explain this later).