Sometimes you’ll see android messages in the logcat that are confusing, amusing, interesting, and sometimes even downright funny. I decided to keep a running list of them here. 3-14-11 Watch the watchdog 03-14 13:43:14.630: DEBUG/WifiWatchdogService(178): (android.server.ServerThread) rga@350 (00:1a:1e:84:d7:e0) does not require the watchdog
This is part two of my example of communicating between android and a pc over usb. This shows a simple java client based on this oracle tutorial and I use it to test communication between android and the PC. Here’s the code: package com.rga.vzw; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintStream; import java.net.Socket; import
*Update* There is some new documentation on the android dev guide. I suggest you start there. http://developer.android.com/guide/topics/usb/index.html This will be a two part mini tutorial on how to establish device to host computer communication through usb by using adb. A lot of this is based on Alex Florescu’s work on the subject. My thanks go
When you create layoutAnimations and you set the fillBefore or fillAfter in the animation sets referenced by the layoutAnimation the xml attributes of dont work. You have to set them through code. //doesn’t work! You have to set through code: LayoutAnimationController layoutAnim = AnimationUtils .loadLayoutAnimation(this, R.anim.landingpage_right_anim_out); Animation anim = layouAnim.getAnimation(); anim.setFillEnabled(true); anim.setFillBefore(true); anim.setFillAfter(true);
If you ever need to launch another app from your own it’s actually easier than you think.
The PackageManager class provides some handy methods that make this a snap.
SCREEN_ON / SCREEN_OFF intent filters do not work!
Sometimes you will need to know when the user turns the screen on and off.
A quick google search leads to the intent filter
How to read an xml from the sdcard and parse it using XMLPullParser.
At some point you’ll find yourself needing to get information about the activities running in a certain taks.
Here is a quick and simple way to have videos play one after another in a loop.
Here’s a great reference for working with the TabHost control Learn Android: Tabbed Applications in Android.