Monday, October 11, 2010
Class 3 -Moarrr Android!
Multiple Activities - The different 'pages' of the program. Each time a new page appears, its a new activity.
Modifying the XML using the GUI - Simple drag and drop interface.
Activity lifecycle - Need to read the state of the program. For example, if the program is still running while onPause(), the phone's battery will needlessly drain very quickly.
Interesting tidbit, the whole program re-renders itself every time the landscape is changed. We figured this out by setting up a count on our emulator, rotating the screen, and the count returned back to 0.
I like the humor of some of the Android creators. There's a public static int wtf(string, string) function, which stands for "What a Terrible Failure" and is used to report for an exception that should never occur.
Monday, October 4, 2010
Class 2 - Terminal Commands and my first App!
- android - Opens Android Standard Development Kit (SDK) and Android Virtual Device (AVD) Manager
- emulator - Run emulator for devices
- adb - Android Debug Bridge allows debugging, view logs, and shell commands
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
public class FlashLightActivity extends Activity {
//Tag testing: private static final String TAG = "Flashlight";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
View view = new View(this);
view.setBackgroundColor(Color.WHITE);
// Get rid of title bar
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
//New - Added to increase phone's brightness levels to max brightness
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = 1;
getWindow().setAttributes(lp);
setContentView(view);
}
}
Tuesday, September 28, 2010
Class 1 - Intro to Android
- Download and install the latest Sun Java Release
- Download and install the Eclipse Integrated Development Environment with the Android Development Tools plugin
- Download and install Android Software Development Kit (SDK)
Sunday, September 12, 2010
Tuesday, September 7, 2010
Mix CD
Friday, September 3, 2010
Heard it somewhere...
Tuesday, August 31, 2010
HTML5
Arcade Fire's 'interactive' music video; content that changes based on your hometown (location). Neat.