Monday, June 13, 2011
New Project: "Happily Ever After"
The last week I've been playing with a few different story line ideas and have come up with a foundation for the design. I've pitched it to a few friends and so far they all think it's a good idea. I don't think this project will be able to wow anyone with its programming or art, but the combination of simple features and solid story might make this stand out.
The only description I have is that "This is not your typical RPG".
Saturday, May 28, 2011
Flu Aware App published!
Please vote for my app here for the CDC Flu Challenge:
http://fluapp.challenge.gov/
It's available for free on the Android Market:
https://market.android.com/details?id=com.wliu.cdcfluaware&feature=search_result
Here's a few screen shots:
Saturday, May 21, 2011
Sunday, March 13, 2011
New Hardware
The only other bottleneck was the 5400 RPM hard drive, which I promptly switched to a 256 GB Sata III solid state drive. Even though OSX doesn't have TRIM support yet, I'm hoping the hard drive performance won't degrade too much before Lion is released in June (which should have built in third party TRIM support).
In terms of what I'm using the hardware for, I've been documenting what I've learned about Android programming over at code.google.com/p/wliu/ under the 'Wiki' section. I'm still not sure how to use collaborative software like github, but it doesn't really matter yet since I'm still a one man team.
Right now I'm working on the framework for a flashcard program; I figure I can study for my Medical Terminology class and learn how to program at the same time. There's a lot of possible neat twists on how people learn, but for now my goal is a simple working application. Basics first I guess.
Friday, November 5, 2010
Saturday, October 30, 2010
Last Android Class Notes
Cal Poly Web Site with Android material: https://sites.google.com/site/androidappcourse/home
code.google.com/android
anddev.org
Look through Lunar Lander example for sprite manipulation and physics engine
Should know more java (basic concepts like):
Inner class, polymorphism
Note to self: look up Josh Block book - Intermediate & Advanced Java concepts
Adding Audio:
Add song.mp3 to res/raw/song.mp3 folder
Warning: filenames must be all lowercase! To solve, refactor all filenames.
For Video Viewing:
Use android.widget.VideoView
Play videos in mp4, etc.
Bringing up a web browser (Sample Code)
case 0:
Uri uri = Uri.prase("http://developer.android.com");
Intent inetnt = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
break;
Use Content Providers for Text Messages
Content Providers for Cameras and Camcorders
Always access via 'content://'
Needs a unique string identifying the content provider
Optional to have more than one data type
Optional to have instances of a given data type
Steps to create a Content Provider
1.) Create Provider Class (Includie a static final that defines your content uri)
2.) Create Properties
3.) Update Manifest
Underlying system is Linux based - use same formatting for locations (i.e. use all undercase)
To get external storage - from android.os
Environment.getExternalStorageDirectory()
Environment.getExternalStoragePublicDirector()
I also might be collaborating with some of my fellow classmates on projects outside of class!
Saturday, October 16, 2010
Class 4 -Layouts

Concept: Tips on Layouts within Layouts
Tip: Make one change at a time, then check if it make sense? Does it do what I think it'll do?
The image on the left is two LinearLayouts (each with two buttons) within one LinearLayout (with vertical orientation). Notice Outline setup.
- The iPhone market is popular, but already saturated. As an indie developer, I wouldn't have the manpower to compete against thousands of experienced full time programmers.
- Windows has a history of failure. There was a rumor that went around class that during the unveiling of the new Windows smart phones, the presenter attempted dialing a number only to have the 'blue screen of death' appear.
- Google looks promising and has been gaining market share very rapidly, yet the Android Market is not (currently) saturated. It's also Google; you know a company's made it big when the name is being used as a common verb. I'm going to put my money on Android.
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)






