Programming My Life

Archive for the ‘How to’ Category

How To: Get rid of ‘Application Data Space is Low’ on the Droid Incredible

without comments

A few weeks ago, I started getting a recurring notification on my Droid Incredible telling me that ‘Application Space is low’.  After removing some apps and moving others to the SD card, the notification continued popping up.  I checked the amount of space available for each storage device in the phone (memory, internal storage, and SD card), and all three had plenty of space left.

After some searching, I found that before a factory reset (something I did not want to do), some other users had found clearing application cache could solve the problem. You can do this by clicking the notification (or if it isn’t currently up, going to Setting > Applications), sort by size, then go through the largest applications (likely Mail, Facebook, Twitter, etc.), click the name, then click, ‘Clear Data’.  After doing this for several of the largest apps (and moving apps to SD earlier), the notification has not returned for a few weeks now.

I wanted to post this in hopes that anyone else with this problem can solve it without a factory reset. Good luck!

Written by acmshar

April 30th, 2011 at 11:55 am

How To: Fix TightVNC After Moving

without comments

While I don’t use VNC to log into my home PC very often, it is a nice convenience to have if I want to check something on my home PC while I’m at work or out of town.  I recently moved to a new apartment and upon getting my PC set up (before the furniture, naturally), I saw that TightVNC no longer seemed to be working.  I tried a few simple fixes, but with no pressing reasons to use VNC, I put off setting it up.

Last night, I become determined to fix it for no apparent reason.  After trying to disable the Windows firewall (which I promptly put back up), I got frustrated again.  I considered that maybe I was missing something simple, so I asked a tech-savvy friend* if he could think of anything.  This morning he got back to me suggesting that my router might be blocking the ports that need to be accessed.  I knew this was wrong because 1)  I did that when I set up AndroidVNC, and 2) I had checked it after the problem arose.  His advice did, however, make me realize that I had not tried taking the router out of the equation to make sure it wasn’t the culprit.

To test whether my VNC server was working or not (since I had to unplug my wireless router), I used GoToMyVNC.  Without the router, I was able to get a connection on GoToMyVNC.  Clearly, the router was the culprit.  I decided to simply retrace my steps through the VNC set up I outlined on my blog for AndroidVNC (see above) to see if something had changed with the move.  Turns out, my local IP address (on the router) had changed by 1. I corrected this and now I’m back in business.

I wanted to post this mostly to show that, for the first time, blogging has helped me by having steps to retrace without having to redo the research for a simple project.

*Thanks, Nigel

Written by acmshar

September 7th, 2010 at 7:12 pm

Posted in How to,Software

Tagged with , , , ,

Unity

with one comment

Currently, my job is to create a game to teach astronomy to middle school students. Luckily for me, there is an abundance of options for game engines to help me ranging from the simple and free (Scratch and Alice) to the expensive and complex (Unreal, etc). For our project we wanted an engine deep enough to cover multiple game types in one game that was reasonably priced.  After debating over the 2D vs. 3D issue, I decided 3D might be too complex for the style of game we wanted to create.  However, after prototyping a few game ideas in several different engines, we settled on Unity for its flexibility and affordability (free for the indie version $1200 for the pro version).  Even though it is primarily a 3D engine, 2D games can be made without much trouble.

In order to get familiar with the Unity engine, I followed two tutorials I found in the Unity forums. The first was a basic shmup.

The second tutorial was a redux (in C#)  of the first plus an extension that included models for the ship and asteroid.  While I followed along with this tutorial, I decided to keep everything in JavaScript.  This helped me to clarify some of the elements of the Unity engine independent of language.

After completing the tutorials, I decided to extend the game a bit to include bombs, more asteroids and large asteroids.  As of this writing, I haven’t made final decisions for how to complete the game (whether it will be a score the player must or a set time limit), but the current version can be found here:

http://programmingmylife.com/spaceShooter/spaceShooter.html

Unity makes the process of uploading any game you build in the engine to a website incredibly easy.  When making a build of a game you simply have to use the following settings:

File >  Build settings > web player      (make sure to include all scenes)

When you build the game it will create a *.unity and a *.html file (the * represents the name of the game that you set).  Assuming your web host knows what to do with the .unity file, you can simply upload the two files and the game will run at that web location.  If, like me, your web host doesn’t support the .unity file format likely this will cause your browser to fail to download the content.  I received an error on Chrome stating ‘Failed to download data file’ with details ‘Download failed, try again’, but on Firefox, the download status simply stayed at zero. To fix this,  you will simply need to include in the directory with the .unity and .html file the following in a file called web.config:

<?xml version="1.0" encoding="utf-8" ?>

<configuration>
    <system.webServer>

        <staticContent>
            <mimeMap fileExtension=".unity3d" mimeType="application/vnd.unity" />

     </staticContent>
    </system.webServer>

</configuration>

I was able to find these instructions from this query at Unity Answers.  Unity Answers is a great service that runs in addition to the Unity forums.  These two complementary services along with the users give Unity a strong community that should allow users from novice to advanced to find answers to any problems they might have.

Written by acmshar

May 17th, 2010 at 4:16 pm

How to Set up androidVNC with TightVNC and a Linksys WRT54G Router (Windows)

with 2 comments

Have you ever gotten to work and realized you forgot to start the download for that movie that just released today?  Or maybe Steam is having a sale and you want the game downloaded before you get home so you don’t have to wait to play.  VNC clients allow you to do just that, and now you can do it from anywhere with an Android device and a data plan (or on Wifi).

In the past week since I bought my Droid Incredible, I have been scouring the internet and asking friends to suggest their favorite apps.  Nearly all of the apps have been easy to install and use, save for one.  AndroidVNC requires a small amount of setup by the user (especially if your home network is not configured for outside VNC access). I wanted to create this post because while this isn’t a complicated process, I wasn’t able to find a set of instructions with all the steps in one place.

I intend to make ‘How to’ posts for any software or hardware project I do that requires me to use multiple sources to finish.  This will hopefully serve to help others that use similar configurations in the future and to remain as a record of what I’ve done for my own reference.

NB:  If you are trying to do this with a different router, you should determine how to forward the ports (5900, 5800, 5500) on your router, then skip to step 2.

Step 1:

To begin, we need to setup port forwarding on our WRT54G router.  First, you will need to enter the setup page for your router. The default address for this page is 192.168.1.1 which you can simply enter into your browser address bar.  If this doesn’t work, you likely either have a dynamic IP (here is how to set up a static IP), or your router’s IP address has been set to a different address and you will need to go there instead.  Upon entering the settings page, you should be asked for a username and password.  The defaults here are to leave username blank and enter the password ‘admin’ without the single quotes. I do suggest changing these to include a real username and a non-dictionary word password for better home netowrk security.

Now that you are logged in to your router settings page, you need to click the security tab and uncheck the ‘Block Anonymous Internet Requests’ box seen here:

After you have done that, be sure to click the ‘Save Settings’ button at the bottom of the page.

Before we can forward our ports, we need to know what the local address of the PC is.  You will need to open the ‘Run’ box of your operating system.  In Windows 7 and Vista, just type run into the search box in the start menu.  For XP, click the run button in the start menu.  Type ‘cmd’ (again, without single quotes) into the box and hit enter.  In the window, type ‘ipconfig’ (no quotes), hit enter, and look for the value next to IPv4 Address.  It should be of the form ’192.168.1.XXX’.  Write this down.

Finally, we are ready to forward the ports!  Back in the WRT54G setup window, click the ‘Applications and Gaming’ tab.  Type the ports to forward as seen below, check the enable boxes (on the three lines you are changing), enter the last part of the IP address you found above in the IP address boxes, and hit the Save settings button again.  If done correctly, the settings should be on the page when it reloads.  If you do not enter an IP address into the box(es), the ports will not save and you will need to re-enter the information.

Step 2:  Finding your IP Address

This one is simple.  Simply click the following link:

What is my IP Adrress?

Look for the number after ‘Your IP Address is:’.  Write this down.

Step 3:  Setting up TightVNC

Go to the TightVNC website, and download the software.  Be sure to get the latest beta version if you are using Windows 7 or Windows Vista.  Now, install the software using the default settings. During the installation, TightVNC should ask you for an administration and primary password.  Be sure to set these up now and write them down.  Now that TightVNC is set up, go to the start menu and run TightVNC Server.  Run application mode if you want the service to end on log out (if you have multiple users on your system or if you have safety concerns).  Otherwise, either application mode or running as a service should be fine.

Step 4:  Setting up AndroidVNC on the Device

First, download the AndroidVNC program from the Android Marketplace, or scan the following QR code:

Open the program, leave the ‘Nickname’ field blank, enter the primary password that you created for TightVNC (not the administrative password, if you made them different), and enter your IP Address from step 2.  Click connect and you should be able to control your PC from your Android device!

Written by acmshar

May 8th, 2010 at 11:31 am