AccountManagerFuture.getResult() results in “Couldn't sign in” screen

I am attempting to use AccountManager to get a token for an installed Google account. When I call getResult() on my AccountManagerFuture object, I get the “Couldn’t sign in” screen on the device (which further says, “There was a probem communicating with Google servers. Try again later.). I checked that a network connection is available […]

How can we set height and width dp for imageview in android?

I would like to set dp for imageview in android programatically and dynamically.How can I achieve this,kindly provide me with an example or snippet to achieve this.Thank you

Get index of enum from string?

I have a string value, I also have an array of strings and an enum containing the range also. To get the index of the string in the array, from the value supplied I write this: Arrays.asList(myClass.BAUD_RATES).indexOf(username) How do I do this for an enum? Can I use ordinal? Or do i have to make […]

Android customize stackview

I”m trying to customize the StackView widget to look a little bit different. The stackview default order and view is this : And i”m trying to get to something more like this : Any help will be appreciated Shimi

How to set bitmap in circular imageview?

I have 1 circular imageview and I want to place bitmap inside the imageview. but when I set the compressed bitmap image it is always rectangle. Please help me to set bitmap in circular imageview. Thanks

exit android application programmatically

I have two activities, the first is a splash activity. I would like to know how to exit the application from the second activity to the homepage. I’ve used this method it works BUT it takes to the launcher. public void AppExit() { this.finish(); Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_HOME); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); }

What is the best primary key strategy for an online/offline multi-client mobile application with SQLite and Azure SQL database as the central store?

What primary key strategy would be best to use for a relational database model given the following? tens of thousands of users multiple clients per user (phone, tablet, desktop) millions of rows per table (continually growing) Azure SQL will be the central data store which will be exposed via Web API. The clients will include […]

Having a EditText over a soft keyboard with a GL View in the background programmatically

I am working on a game and I want an EditText position above the soft keyboard when it pops up. Here is what my code looks like when I build the View Hierarchy in my Main Activity: getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); viewGroup = new RelativeLayout(this); viewGroup.setLayoutParams(new ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); view = new GameView(this); RelativeLayout.LayoutParams vLayoutParams = new […]

ByteArrayBuffer missing in SDK23

when updating android SDK 22->23 org.apache.http.util.ByteArrayBuffer is not there anymore – is there a replacement or is this a bug?

Eclipse and Android error 'parseSdkContent failed'

Having this issue since I upgraded the Android Tools to 21.1. When I start eclipse, even in a clean workspace, I get the error parseSdkContent failed and the details say: (Ljava/lang/String;Lcom/android/utils/ILogger;) Lcom/android/sdklib/devices/DeviceManager; I have searched the internet and tried almost every solution but to no avail. When I go to Android preferences and try […]

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