Key hash for Android-Facebook app

I’m working on an Android app, in which I want to integrate a Facebook posting feature. I downloaded the Facebook-Android SDK, and I got the (text file) in there, in which it is mentioned to generate the key hash for Android. How do I generate it?

Embedding ads on Android app?

I would like to make a free version of the Android app I have, but would like to embed ad on it. I am not sure where I should start? Is there a well known mobile ad company out there that is specialized in mobile advertising?

How can I detect when an Android application is running in the emulator?

I would like to have my code run slightly differently when running on the emulator than when running on a device. (For example, using instead of a public URL to run against a development server automatically.) What is the best way to detect when an Android application is running in the emulator?

getViewTypeCount and getItemViewType methods of ArrayAdapter

Can somebody in plain words explain me the usage of getViewTypeCount() and getItemViewType() methods of ArrayAdapter?

How do I add a newline to a TextView in Android?

When I define a TextView in xml, how do I add a new line to it? \n seems not to work. <TextView android:id=”@+id/txtTitlevalue” android:text=”Line1: \n-Line2\n-Line3″ android:layout_width=”54dip” android:layout_height=”fill_parent” android:textSize=”11px” />

android TextView: setting the background color dynamically doesn't work

Setting the background color programatically of an android TextView doesn’t seem to work. I’m I missing something! TextView et = new TextView(activity); et.setText(“350″); et.setBackgroundColor(R.color.white); I also have this file (colors.xml) in my res/values folder <resources> <color name=”white”>#ffffffff</color> <color name=”black”>#ff000000</color> </resources> [EDIT]: Also, setting the text color causes the TextView to disappear. TextView c1 = new […]

Android Shared preferences example

I want to retrieve user input in an app for later usage. For example, the user is prompted to enter all 7 days of the week and types into the editText box “Monday”, “Tuesday” etc. Then later in the app a question will come up and ask what is your favorite day? And the spinner […]

Listing all extras of an Intent

For debugging reasons I want to list all extras (and their values) of an Intent. Now, getting the keys isn’t a problem Set<String> keys = intent.getExtras().keySet(); but getting the values of the keys is one for me, because some values are strings, some are boolean… How could I get the values in a loop (looping […]

Which design patterns are used on Android?

I’m doing a small research of mobile platforms and I would like to know which design patterns are used in Android? e.g. in iOS Model-view-controller is very widely used together with delegation and other patterns. What patterns and where in particular does Android use? EDIT I’m not asking for design patterns used deep in kernel, […]

How to animate RecyclerView items when they appear

How can I animate the RecyclerViews when there are appearing? The default item animator only animates when a data is added or removed after the recycler data has been set. I’m new developing applications, and don’t have any clue where to start. Any ideas how to achieve this?

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.