Photo
I’m taking a software engineering class, and for our group project we had to come up with a piece of software and then design it over the semester.  My biggest problem with the class was that it doesn’t actually get into any programming;  It just covers the processes behind software creation (Agile Software Development, the Waterfall Method, Use Case diagrams, etc).  That’s fun and all (and important), but I like doing the actual dirty work instead of talking about doing the dirty work.
So, here’s Tippa.  We decided on a really basic program so our diagrams and such wouldn’t be overly complicated throughout the semester.  I thought it’d be pretty a pretty easy app for Android, so I threw it together in a little over a day.  It wasn’t that bad, but there were still some things that slowed my progress down.
Anyway, Tippa helps you calculate tips based off of different percentages.  You can then split the check between different people and it will tell you the total.  It also has a tip suggestion screen that gives you general guidelines for tipping different people (Delivery, taxi, bar, etc).  That’s about it.  Yeah, I know, there are millions of tip calculators out there, but it was fun and easy and it gave me a chance to use ViewPagers and some other things I’ve never used before.  So get it NOW!!!!!
Google Play (or Market or whatever it is) Link Here!

I’m taking a software engineering class, and for our group project we had to come up with a piece of software and then design it over the semester.  My biggest problem with the class was that it doesn’t actually get into any programming;  It just covers the processes behind software creation (Agile Software Development, the Waterfall Method, Use Case diagrams, etc).  That’s fun and all (and important), but I like doing the actual dirty work instead of talking about doing the dirty work.

So, here’s Tippa.  We decided on a really basic program so our diagrams and such wouldn’t be overly complicated throughout the semester.  I thought it’d be pretty a pretty easy app for Android, so I threw it together in a little over a day.  It wasn’t that bad, but there were still some things that slowed my progress down.

Anyway, Tippa helps you calculate tips based off of different percentages.  You can then split the check between different people and it will tell you the total.  It also has a tip suggestion screen that gives you general guidelines for tipping different people (Delivery, taxi, bar, etc).  That’s about it.  Yeah, I know, there are millions of tip calculators out there, but it was fun and easy and it gave me a chance to use ViewPagers and some other things I’ve never used before.  So get it NOW!!!!!

Google Play (or Market or whatever it is) Link Here!

Text

Android Widget Orientation Changes

I just thought I would talk a bit about how I solved an annoying problem with my DSI: Miami widget since I had a really hard time finding a solution online. The problem would show up every time the home screen would change orientations (from portrait to landscape and vice versa).  If there was an orientation change, the widget would freeze and the button/text box wouldn’t respond anymore.  This drove me nuts!  I finally solve the stupid problem today.  This is what was happening:

-I have an IntentService class called UpdateService which basically throws a PendingIntent out there to listen for the button press.  Here’s the code that is in it’s buildUpdate method:

        private RemoteViews buildUpdate(Context context) {
            RemoteViews updateViews = new RemoteViews(context.getPackageName(), R.layout.widget_message);

            Intent i = new Intent(this, DSIMiamiWidget.class);
            i.setAction(REFRESH_QUOTE);
            PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);
            updateViews.setOnClickPendingIntent(R.id.WidgetButton, pi);
                   
            return (updateViews);
        }

-This code was fine, actually.  It worked great when the home screen stayed in the orientation in which the widget was born.

-The problem was when the button was pressed, it called a changeText() method which updated the text box, requiring me to do a new RemoteViews update. Here’s the gist of the code:

     public void changeText(Context context)
     {
        RemoteViews updateViews = new RemoteViews(context.getPackageName(), R.layout.widget_message);
//         int textSize;
        
         if (!randomQuotes.isEmpty())
             updateViews.setTextViewText(R.id.WidgetTextView, randomQuotes.get(0));
         else
         {
             if (quotes == null)
                 this.quotes = context.getResources().getStringArray(R.array.quotes);
             convertArrayToList();
             randomizeQuotes();
             updateViews.setTextViewText(R.id.WidgetTextView, randomQuotes.get(0));
         }
        
         randomQuotes.remove(0);
        
        ComponentName thisWidget = new ComponentName(context, DSIMiamiWidget.class);
        AppWidgetManager manager = AppWidgetManager.getInstance(context);
        manager.updateAppWidget(thisWidget, updateViews);
     }

-Well, I didn’t realize that I had to REDO all the PendingIntent stuff after doing that, too.  So, I threw this in right before “ComponentName thisWidget = new ComponentName…” at the bottom:

        Intent i = new Intent(context, this.getClass());
        i.setAction(REFRESH_QUOTE);
        PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);
        updateViews.setOnClickPendingIntent(R.id.WidgetButton, pi);

TADAAAAAAAAAA.  That was a pain…

Text

New Game Engine…

So I’m working on a game engine for Android right now.  It’s gonna use OpenGL ES and hopefully it’ll be super sweet sauce (awesome alliteration there).  In the end I hope to have the typical sprites/parallax scrolling backgrounds/physics, along with particle effects and some extra doodads.

I’ll try to keep this blog updated in the process.

Photo
Well lookie here!  It’s my first Android app!  I call it DSI: Miami.  Now you too can be a part of a crime scene investigation team!  For extreme epicness, combine with sunglasses (not included).
Search for “dsi” in the Android Market or scan this QR code with the barcode app:

Well lookie here!  It’s my first Android app!  I call it DSI: Miami.  Now you too can be a part of a crime scene investigation team!  For extreme epicness, combine with sunglasses (not included).

Search for “dsi” in the Android Market or scan this QR code with the barcode app:

QR Code