Gradle error with Android project added as a library (SlidingMenu)

I’ve never used Gradle before so I’m completely lost! I’ve added SlidingMenu as a library and I have access from my project to all the SlindingMenu stuff, but trying to compile will give me this error: Gradle: package com.jeremyfeinstein.slidingmenu.lib does not exist I’m using Android Studio (so IntelliJ) and this is my buildscript { […]

android RelativeLayout, equal spacing?

I’m using Relative Layout to create a calculator screen, and i have a row of buttons labeled 1, 2, and 3. I want them evenly spaced, but i’m not sure how to do this with Relative Layout I’m used to using the android:layout_weight function in LinearLayout, and give each of them a value of android:layout_width=”fill_parent”, […]

How to open music picker?

In my application, I want to make a picker that offers the user the choice to pick a music. I want to use the native android picker. I used the following code to open the native android music picker: final Intent intent2 = new Intent(Intent.ACTION_PICK); intent2.setType(“audio/*”); startActivityForResult(intent2, 1); But when I execute it, I get […]

How can I get the parent of a view using uiautomator?

I’m trying to identify the parent view of an ui element so I can navigate through the UI freely. For example, in Settings app, I can find the view with the text “Bluetooth”: UiObject btView = new UiObject(new UiSelector().text(“Bluetooth”)); Now, the part where I get stuck is this one: I want to navigate two levels […]

Failed to resolve:

I am trying to include GCM in my app. I keep getting this error message : Failed to resolve: | Install Repository and sync project | Show in Project Structure dialog If I try to Install Repository and sync project i get this error: Loading SDK information… Ignoring unknown package filter ‘extra-google-m2repository’Warning: The package […]

iPhone-like navigation dots for Android

I have to create an image gallery that navigation dots like the iPhone gallery. Check out the screenshot. I need such a widget, look at the white dots: Is there any widget available in Android that includes navigation dots? If not, how can I recreate this effect?

How to prevent Android Monitor from automatically opening when I run a project in Android Studio?

This Android Monitor window displays log activity from my phone, so I can see stack trace, etc. when my program crashes. Fortunately my program usually runs without crashing. 🙂 However this means the window is not useful to me most of the time. How can I prevent Android Monitor from opening automatically on every time […]

What is the definition of asleep for an android device?

I’m using alarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, 0, DURATION, broadcast); To schedule an repeating task that should only be executed if the device is not asleep. As I understand the API on the AlarmManager the intent will be called once the device wakes up from sleep. Now when is an Android device asleep? For testing I set the duration […]

Android Widget: previewImage size

I have a widget in Android for which I am setting a previewImage. Unfortunately, I am having issues figuring the good size for the widget: if it’s too big, it gets cropped at the bottom of the frame. I have been trying to find the recommended size, or even better, the pixel dimensions of this […]

In Android Market , how frequently developers can/should update their apk files?

What are the best practices on updating the apk files in the Android Market ? Is it ok to publish a new version as soon as i fix a minor glitch or should i consolidate a few bugs (if those or minor) and post it in a regular interval. Just released a game and got […]

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