An Explanation of My Recent "Self Destruct" Application

Self Destruct” is simply an application I made for fun, as a proof of concept. This application demonstrates a way to create an application that is able to “destroy” itself, preventing it from running until it is uninstalled, and then reinstalled later. I’d like to personally thank HandlerExploit for giving me a hint about how to do this (he mentioned that he found the trick in the provisioning code). HandlerExploit uses a similar technique in his application, “iBrick Proof of Concept”. As soon as the user opens the application, it removes it’s main class from the Dalvik package manager, preventing itself from being able to run again. The only way to run the application again after opening it is to uninstall the application, and reinstall it. This application serves no real purpose other than to demonstrate an interesting trick, and it is not malicious in any way. Please note that after running the application, it’s icon will remain in the launcher, although you won’t be able to open it. Uninstalling the application will remove the icon. I’d release the entire source code for this application, but really, the only part that actually matters is the part that removes the class from Dalvik and prevents the application from running again. Interestingly, this application requires absolutely no permissions, at all in order to do this. In case you are interested in how I did this, here is the source code for the main class in the project:

package com.dylantaylor.selfdestruct;
import android.app.Activity;
import android.content.ComponentName;
import android.content.pm.PackageManager;
import android.os.Bundle;

public class Main extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        PackageManager pm = getPackageManager(); ComponentName name = new ComponentName(this, Main.class);
        pm.setComponentEnabledSetting(name, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
    }
}

Yes, I realize that this application serves no real purpose, but it’s just something interesting that I made for fun. If you don’t want it, don’t download it. Otherwise, have fun! :)

P.S. Do whatever you want with that source code, it’s virtually worthless to me anyways.

Sound Added to "Simple Dice"!

I added sound to “Simple Dice” when you roll the dice. The sound played is a modified, low quality version of Mike Koenig’s “Shake and Roll Dice Sound”. The file takes up less than 10 additional kilobytes, and the sound is only played if the “Media volume” is not muted, to avoid disturbing others.  I also plan on adding the sound to “Dice Betting” when it is released. The sound truly makes the application more realistic feeling and more interesting. Expect to see the changes on GitHub and the Android market shortly!

UPDATE: The sounds are now in the git repository, and the new version is up on the market!

Introducing "Simple Dice"

This isn’t quite the dice game that I’m currently working on, but I liked the animation I made so much in the other game (“Dice Betting”) that I just had to release an Android application with just the dice images and the animation. Simply tap anywhere on the screen in order to roll the dice. Dice rolls are random. Simple Dice will definitely be released under version 3 of the GNU General Public license, and the source will be available online as soon as I get a chance to upload it. I will update this post with the link to the source code once it’s online. Until then, check it out in the Android market! It’s 100% free! Also, the entire application takes up only a measly 24KB! ;)

UPDATE: The source code is now available on GitHub! Check it out! :)

Working on a New Simple Dice Game

I’ve been working on creating a basic dice game for Android with animation, rules, betting, and more! The game is currently a work in progress, but I’m really excited to release it! The animation works wonderfully, and the interface, although very unfinished is already starting to look polished, especially in the game’s menus. For now, the game is simply called “Dice Betting”, and yes, I realize how lame and generic that sounds, but I might end up changing the name of the game before it is released. Similar to “Find the Mouse”, I’ll probably end up open sourcing this game (under the GNU General Public License, of course), although it isn’t even remotely close to being released yet. The game will have a built-in statistics tracking system, and the rolling of the dice will be completely animated. Right now, the animation I have done looks really cool, and I’m incredibly anxious to publicly release this. Check back soon! :)

Find The Mouse Improvements Complete!

I finished making the changes to “Find The Mouse”, and the new code is up on github. I’m already in the process of signing and uploading the new version to the Android market. You should be able to download it very soon! The new version automatically advances to the next level after you successfully find the mouse, it keeps track of your winning streak and current score, and the user interface feels much nicer. Enjoy! :)

UPDATE: The new version is now up on the market! Check it out!

Pssst… Planned Improvements for "Find The Mouse"

I realize that “Find The Mouse” isn’t that much fun yet. I’m working on implementing a feature to keep track of scoring. For each round successfully completed, you will get one point plus one point for every click left. The game will also keep track of how many games were won in a row. Keep in mind that this game was never originally designed to be very fun, it was meant to be an example to teach (very) basic Android programming. These upcoming features are simply the result me giving into peer pressure and trying to make the game more enjoyable. Keep in mind that this is an open source project and anyone is welcome to contribute code if they would like to see it in the game. The feature is done as far as coding, I just have to work on the new layout.

Introducing "Find The Mouse", a Basic Open Source Android Game!

So, a friend of mine asked me to show them how to make a basic Android game, which resulted in me coding up something simple for him. “Find The Mouse” is the result of this coding. This entire game was started and finished in around 20 minutes today, and the counter was added in later. All of the artwork in the game is public domain artwork found on sites like clker.com. The card background was heavily modified in order to reduce file size and make it look nicer on mobile screens. The object of the game is to find the mouse hidden behind one of five cards. You have three chances to find the mouse before you lose. The game is, as I stated earlier, incredibly simple, yet somewhat useful to someone who is learning to code for the Android operating system. The entire source code as well as all resources are available on GitHub, and I will probably end up putting this on the Android market soon, so that all of you without the Android SDK or the time to compile source code can play with this. This game will definitely be 100% free, and I have no intention of ever charging for it. The version on the market will likely have an AdMob advertisement in it, however, the version on github will not if you have the time to compile it and run it yourself. I am releasing this project under version 3 of the GNU General Public License, and all original artwork created by me in relation to this project is released to the public domain. You may copy, edit, modify and redistibute this project as long as you follow the terms of version 3 of the GPL. Enjoy! The project’s source code can be found on this GitHub repository. ;)

P.S. Hitting the Search button or the Menu button resets the game.

I’m Now Accepting Donations For Clippy

I just finished setting up a Pledgie campaign in order to raise money to support the development of Clippy, my clipboard manager for Android. If you use Clippy, and find useful, please consider making a small donation. Clippy is currently a 100% free application, no strings attached, and in order to keep it that way, I need a way to make a little bit of money. Clippy is currently a one-man project, and I do all the work I do on it during my spare time. I have invested many hours into developing Clippy, and I’m hoping that some of that work will start to pay off soon.  The more money that is donated to the Clippy project, the more time I’m able to invest in developing and supporting Clippy. Also, as an added incentive to encourage donations, if I receive over $20,000 $1,000 in donations, I will release the entire source code for Clippy under version 3 of the GNU General Public License, and all of the resources, including the original vector graphic files, under the Creative Commons Attribution 3.0 Unported License.  In addition to that, I’ll set up a repository on github to encourage open development, and allow others to contribute code. I got the inspiration for this idea from an independent gaming package called the “Humble Indie Bundle“, where you could pay what you want for a package of 5 games. Basically, they offered to make their games open source if they could raise $1 Million. Needless to say, they succeeded. So, in the spirit of the Humble Indie Bundle, I’m offering to make my application open source if I can raise $1,000, which is practically pocket change compared to the goal they set, yet still a very substantial amount to me. If you don’t feel like signing up for Pledgie, you can make a donation using traditional PayPal, but I’d have to manually enter your donation into Pledgie for it to count towards the $1,000 goal.

Click here to lend your support to: Clippy Clipboard Manager and make a donation at www.pledgie.com !

New Clippy Icons (Colored and Grayscale!)

When I originally designed the Clippy icon, I made it using a free, open source graphics editing program called GIMP, and saved it as a 720×720 PNG image. While 720×720 is a large resolution, large enough for almost anything I need to use my icon for, it’s still a raster image format, and it doesn’t scale well. This also results in it being more difficult to edit the image and make changes, such as editing colors, resizing it, etc. If you don’t care about all the technical details, scroll down to the end of this post to check out the new icons. Otherwise, continue reading. To solve this problem, I opened up the original image in Inkscape, a free and open source vector graphics editing program, and traced the paths of the “clip” and the “writing” from the original clipboard image, converting them into vectorized paths. I used the “Exclusion” tool to create the hole in the clip. I then created a new rounded rectangle as the new ‘base’ of the clipboard, with a fill color that matched the inside color of the base in the raster image, and a stroke color that matched the color around the edge of the clipboard in the old raster image. After making sure that I had the stroke width exactly the same length as the border of the base of the old image, I lined up the rounded rectangle with the upper left corner of the base of the old image, and resized it so that the bottom right corner lined up with the bottom right corner in the previous image. I then messed with the radius of the new base’s corners until it lined up almost perfectly with what I had before.  At this point, I had the “writing” scribbles, the “clip”, and the new clipboard base recreated in glorious SVG format. I then put all three parts on their own layers, organizing them (from top to bottom): “Clip”, “Writing”, “Board”. Because I had the base of the clipboard done at this point, I locked that layer so I wouldn’t accidentally mess it up, and then I selected all of the writing. I then changed the fill color of all of the writing at once to match the fill color in the previous image. Since at this point I already had the “writing” exactly where I wanted it, and the writing was already in path form, I used the “Simplify” feature under the path menu, to clean up the paths of the writing a little bit, as it doesn’t have to be exact, since the “writing” is only a bunch of wavy lines anyways. Now that I had the “writing” taken care of, and the “board” complete, with their colors similar to what I had in my previous icon, I was mostly done. All I had to worry about now was shading the “clip” (at that point in time, I only had the outline of the clip, with no fill color), and recreating the “paper”, for the “writing” to go on. I used the “hide layer” function to get the clip out of the way for now, and I began creating a new rectangle (not rounded this time) with the exact same dimensions as the old image’s “paper”, by, once again, lining up the upper left and bottom right corners. After making sure that I had the border length exactly the same as the border length of the old “paper”, and then I set the fill color and stroke color to match the colors in the original image. All that was left was filling in the “clip” with a gradient. After playing around with the linear gradient settings for a while, I finally had something that I was satisfied with, and I truly believed that it might even be better than the original Clippy icon. Since the new icon came out so great, I figured that it would be a good idea to make a grayscale version of the icon, for things like the notification bar icon, which typically don’t have any coloration. So, I saved the colored image, and fired up Inkscape again, and got to work. Keeping all the sizes and positioning of the layers the same, I messed with the fill and stroke colors until I had a nice looking, Android-style grayscale image. Unfortunately, due to WordPress.com‘s file type limitations, I can’t upload any SVG files, so, unfortunately, you won’t be able to see these images in their original, lossless forms, but I can, however, upload rasterized renderings of the images saved as PNG files. To accurately show the difference between the new vector images and the old raster images, I rendered these images at a very high resolution. As you can clearly see, just by looking at the images, there is absolutely no loss of clarity in the vector image rendering, where the original raster image becomes significantly pixelated when scaled. Also, even though it’s possible to scale the vector icons to almost any size without the quality degrading, their size is actually significantly less than the original raster images. Anyways, here are the links to the images, so you can check them out for yourself:

Let me know what you think about the new icon by leaving a comment on this post!

Note: There is no “old” grayscale image, as I created it originally when I converted the colored image to SVG.

UPDATE: I made some slight changes to the gradient used in the ‘clip’ of the colored logo. It now looks shinier, and closer to the original raster image. Also, I slightly improved the subtle gradient used in the ‘board’ of both vector images. The images on this page are now updated to reflect that change.

Addressing FiOS WEP Calculator PRO (Free Version) Complaints

As you may or may not know, for a limited time, I used to offer the full version of FiOS WEP Calculator PRO without any advertisements free. This version has received 96 downloads so far, but it is no longer published in the Android market. The reason for this is because I am not making any money on my applications right now. In fact, I’m actually losing money. Also, there is a free version of FiOS WEP Calculator, titled “Lite” that offers all the functionality found in the paid “PRO” version, except there is an advertisement at the top of the screen. The truth is, however, advertisements haven’t been making me very much money at all (not even $2 yet), so most of the money I receive is directly from the FiOS WEP Calculator PRO sales. Although I would love to offer my applications for free, I need to make some money, otherwise the amount of effort I put into making my applications doesn’t pay off. As a student, all my coding is done in my free time. If I don’t sell copies of my applications, I don’t get paid for my work. However, I honestly would prefer to offer my applications for free, as open source software, and without any copy protection, but realistically, with the current low amount of sales I get, and the very minimal amount of advertising revenue I receive, even with hundreds of legitimate advertisement clicks in my application (I don’t click on my own advertisements, or encourage others to do so) that’s not realistically possible. Part of the problem might be the fact that AdMob isn’t displaying very interesting or relevant advertisements in my application, but that’s another story. By offering the “PRO” version of my application for only $0.99, the least I’m allowed to sell my application for on the Android market, I believe that I’m making it perfectly reasonable and affordable for a user to upgrade from the advertisement-supported “Lite” version of my application to a version without annoying advertisements. I know that most users of my application don’t mind the advertisements, but it would be really great if I could get some more sales for my application. As it is right now, I’m actually _losing_ money, as I haven’t even sold enough copies to offset the developer registration cost for the Android market, and I definitely haven’t sold enough copies to purchase an Android phone. As an independent developer, it’s much more difficult to sell an application, than if I was an established or well-known company. So, by now you are probably wondering what brought this topic up. Well, in order to promote sales of the full version of my application, I thought it was perfectly reasonable to modify the “PRO” version of my application that was available for free for a limited time only. Now, I’m going to assume that I know what you’re thinking, and say that what I did is nothing nearly as bad and irritating as what Shazam did with the free version of their Android application, when they limited the usage of their application to 5 song taggings per month. I simply put a notification in the PRO version of the application stating that I am no longer maintaining the free version of the app, and I nicely asked users to consider purchasing the “PRO” version of the application, in order to support development. In fact, I’ll even include a screenshot of the message shown to users upon opening the application, as well as a word-for-word copy of what the message says, so you can judge for yourself whether or not you think what I did was reasonable. Here is a full, word-for-word copy of the message:

Dear User,
You are using the free version of FiOS WEP Calc PRO. This version is no longer supported, and will not be updated. This app will continue to function, but please consider buying this app for only $0.99. The money will help support the development of my future apps, and this message will not appear in the full version. Thanks for your support! :)

This message is shown once every time the application is opened. Below the message, there are two buttons. On the left, there is a button labeled “Buy Now”, which takes you to the page in the Android market for “FiOS WEP Calculator PRO”, where you can choose to purchase it. On the right, there is a button labeled “Later”, which closes the message, and allows you to use the application, without advertisements, and exactly like the full, paid “PRO” version. There is no limit to how many times you can choose “Later”, and the application will never stop working. It takes less than a second to click “Later”, and you are not, in any way, forced to choose to buy the full version. I believe that this is perfectly reasonable, as I make no money at all from the users of the “free PRO” version, not even advertising revenue. If the users are annoyed by the message, there is nothing preventing them from removing the application, and installing the Lite version, which also does the same thing for free. The reason I am writing all of this is because I have been reading the comments on my application, and I noticed one in particular from a user named “peskykid“, written on August 3rd, 2010. The commenter rated my application one star (out of 5), and wrote this (I think their message got cut-off or something, but I was able to understand what they are saying):

After this upgrade I wouldn’t support the developer out of spite.. What a Shi**y way of doing business.. Every time the app opens you have to close a.

What I think they meant to say was “every time the app opens, you have to close an advertisement.” I believe that this commenter is ungrateful that I let them download my application for free, and inconsiderate about the fact that I’m trying to make a small amount of money selling the application. Closing the advertisement isn’t that annoying, and it only takes less than a second. If you can’t handle closing the advertisement, then you have several choices:

  • Download the “Lite” version, which does the exact same same thing, except with an advertisement at the top of the screen
  • Purchase the “PRO” version for only $0.99, which will support future app development, and won’t have the pop-up message every time the application starts
  • Uninstall the application completely, and get on with your life, without any of the functionality provided by my application

Nobody is forcing you to purchase the application, and I’m letting you continue to use the application as long as you would like for free. Sorry for writing so much, but I felt the need to explain why I added that message, and rant about the feedback I have received since I implemented it. If you have any comments, whether or not you agree with me, about encouraging those who got the “PRO” version for free to purchase the application to support future development, let me know by commenting on this article. I’d love to know what you think.