How to filter Android logcat by application?

This question already has an answer here: Filter LogCat to get only the messages from My Application in Android? 25 answers

Difference between onPause and onStop()

From android doc here http://developer.android.com/reference/android/app/Activity.html, it said ‘Activity comes into foreground’ will call onPause(), and ‘Activity is no longer visible’ will call onStop(). Isn’t ‘Activity comes into foreground’ same as ‘Activity is no longer visible’? Can you please tell me what is the difference between them?

handle textview link click in my android app

I’m currently rendering HTML input in a TextView like so: tv.setText(Html.fromHtml(“<a href=’test’>test</a>”)); The HTML being displayed is provided to me via an external resource, so I cannot change things around as I will, but I can, of course, do some regex tampering with the HTML, to change the href value, say, to something else. What […]

Android – Camera preview is sideways

I am using a Preview to display what the camera see’s on the screen. I can get everything working fine, surface created, surface set and the surface is displayed. However it always displays the picture at an incorrect 90 degree angle in portrait mode. Such as in the picture: I am aware that using the […]

AVD Manager – Cannot Create Android Virtual Device

I just installed the Android Eclipse Plugin and the Android SDK from Google yesterday. I open the AVD Manager window by going to Window -> Android Virtual Device Manager. I then click “New” and am presented with the “Create new Android Virtual Device (AVD)” window. The problem is, I can’t get the “OK” button to […]

No service of type Factory available in ProjectScopeServices

apply plugin: ‘com.github.dcendents.android-maven’ apply plugin: ‘com.jfrog.bintray’ // load properties Properties properties = new Properties() File localPropertiesFile = project.file(“local.properties”); if(localPropertiesFile.exists()){ properties.load(localPropertiesFile.newDataInputStream()) } File projectPropertiesFile = project.file(“project.properties”); if(projectPropertiesFile.exists()){ properties.load(projectPropertiesFile.newDataInputStream()) } //read properties def projectName = properties.getProperty(“project.name”) def projectGroupId = properties.getProperty(“project.groupId”) def projectArtifactId = properties.getProperty(“project.artifactId”) def projectVersionName = android.defaultConfig.versionName def projectPackaging = properties.getProperty(“project.packaging”) def projectSiteUrl = properties.getProperty(“project.siteUrl”) def […]

Android – Setting a Timeout for an AsyncTask?

I have an AsyncTask class that I execute that downloads a big list of data from a website. In the case that the end user has a very slow or spotty data connection at the time of use, I’d like to make the AsyncTask timeout after a period of time. My first approach to this […]

How to enable Heap updates on my android client

Under DDMS, there is a HEAP tab, and then I click my android application under ‘Devices’. But it said: Heap updates are NOT ENABLED for this client How can I enable Heap update for my android application?

Why do I want to avoid non-default constructors in fragments?

I am creating an app with Fragments and in one of them, I created a non-default constructor and got this warning: Avoid non-default constructors in fragments: use a default constructor plus Fragment#setArguments(Bundle) instead Can someone tell me why this is not a good idea? Can you also suggest how I would accomplish this: public static […]

How to scroll to top of long ScrollView layout?

For part of my app, the user is presented with a list of names and is asked to group them as they see fit. (Note, the ListView code was copied verbatim from the Android Views tutorial. I haven’t yet customized it to my needs, I’m just trying to figure out how to make this work.) […]

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