Search Results : android » HunterDavis.com

May 062013
 

During the first week in May, I considered myself quite thrifty. I bought a used magnifying glass from a thrift store, along with an ancient pair of studio headphones I plan to refurbish. Neither are produced by companies that still exist. Having not made a corporate purchase since the 1st, I was feeling fairly economical. On May 6th, that all changed.

nook

You see, on May 8th I fly down for a long weekend in Virginia Beach. Having just sold off the remaining tablets I had in my possession last month (in preparation for the Google I/O yearly tablet price drop), I was in the market for a media consumption device to use on the plane.

My first consideration was the Google Nexus 10. This seemed like a bad idea for 2 reasons:

  1. There’s likely to be a hardware refresh at I/O this month
  2. Google’s stock price is over 3x the cost of the tablet itself

I did find myself enamored by its 1080+ screen. A high resolution screen like that could be used to great effect in document (and code) editing, and my primary complaint with my last batch of tablets (both Android and Win8 RT/Pro) was their (now antiquated feeling) 1280×800 resolution screens.

Fate intervened in the form of a failing business (Barnes and Nobles (B&N)) trying to sell off stock and gain market share. On May 5th, B&N dropped the price of their 1080+ resolution tablet down to 180$. You also can get 2x 25$ gift cards by going through their ‘refer a friend’ program. That drops the effective price of the tablet down to 130$. Quite a deal, especially when you factor in B&N’s current stock price of $18.

Why then, is this write-up titled ‘throwing common sense out the window’? It’s obvious to anyone in our industry that B&N is struggling, badly, and is likely to fold.

“Common sense” would clearly dictate that you shouldn’t buy stock in a company you think will fold soon.

Does common sense have a place in the high-frequency cesspool that is modern investing? Only time (and data metrics) will tell.

Overall stock + cash purchase for a 1080+ Android tablet (which recently got the Google Play store): 148$. Not bad.

Share
 Posted by at 3:53 pm
Apr 272013
 

Textures are heavy. Bloat-y. They weigh down your apps, and consume memory. Sometimes you just want to efficiently animate something procedurally. One useful technique to have in your bag of tricks is that of basic skeletal animation. In this article series, I’ll run you though the basics of 2-d skeletal animation. I’ll be implementing this as part of a variant of the popular ‘run as far as you can’ games on the Android platform using AndEngine/OpenGL as the rendering back-end. Those more interested in reading code can follow along at the 5 Seconds GitHub commit history. At the end of this series, you’ll be able to implement basic skeletal animation in the language of your choice. I’ll be using Android/Java/*OpenGL as the pedagogical example, but the code should port easily to other platforms.

*Note that if you’re following along in code, you’ll see the original game engine was a basic multi-threaded game loop/render loop combo I created for this article series (any 5-seconds games using OpenGL would inherit from these base classes I cooked up).  After a few months of some awesome projects at work taking up my time, I switched it out to andEngine.  That said I’ll still be running through a bit of basic engine design.  If you’re looking to get a feel for basic Android game programming without the OpenGL and much of the multi-threaded bits, I’d recommend reading through the source code of the ‘Pop X Color Balloons’ game contained within the project. As always, you can try the code out at anytime on your own Android device because everything about it is open sourced on GitHub. Eventually I’ll make this game series available on the Play store as a compilation game (think Wario-Ware), Until then, GitHub will be the place to grab the project.

Skip Ahead:
Let’s Talk about “Boundage”
Prequel: Choosing your Draw Ordering, and The Importance of The Separation Between Game Logic and Game Graphics
Ensuring Thread Concurrency and Avoiding Deadlocks
Baby Steps: Step One: Start with an Arm is an Arm is a Leg?
Baby Steps: Step Two: Now Form The Head
Some Thoughts On Procrastination

 

Let’s Talk about “Boundage”

For me, it all starts with an off-the-cuff sketch on paper. This often occurs while I’m doing something else with my family. Why burn your eyes out doing design work at your laptop? A good design can be translated from sketch to mathematics on paper. When you’ve got a good solution mathematically, then you can consider the implementation details. When it’s time for coding, you’ll know it.

page1 page2 page3

Continue reading »

Share
 Posted by at 4:13 pm
Jan 122013
 

First generation Android-on-a-stick PCs can be had for as low as 30$ now, and I routinely find old webcams available for 5$ everywhere. Now that Google+ users get free unlimited storage for their photos (up to a certain resolution), the time has never been better to build a home security system. Why? Because Google has thoughtfully enabled ‘instant upload’ for Google+. Using a few simple (and free) Android apps you can turn your old stick PC (or old Android phone) into a home security system with unlimited cloud storage.

IMAG0248

While IP camera apps which turn your phone into network streaming video servers are quite useful in their own right, they don’t answer the question of ‘where does that data go?’. With an app which supports time-lapse photography, we know the answer to that question, as Google+ can automatically upload every photo taken thanks to ‘Instant Upload’.

If you’re using a android-on-a-stick and not an old phone then you’ll need to make sure your time-lapse app supports your USB webcam. Here’s a good thread on which cameras are confirmed working. Many free photo apps (example) (and perhaps even the photo app that came with your stick pc) support time-lapse photography.

Google recently changed their privacy policy to allow for one user to hold multiple accounts. I’d recommend setting one up for your security system, so as not to cloud your regular Google+ instant uploads folder with an infinite history of security photos.

Most of these stick PCs come with 8gb of internal storage, though some come with 4gb. You can also generally use micro-SD cards as well. I picked up a 32gb micro-sd card for 20$ at my local big-box store. As the photos we’ll be shooting will be relatively small, you will only have to clear out your storage every
(megabytes free storage)/((photo file size in megabytes) * (Photos Per Month))
months. So for my setup, I have 28gb of free space, the photo size is 60 kilobytes (.6 megabyte), and I have a photo taken every 30 seconds. One photo every 30 seconds is about 86 thousand images per month. So I plug that into the above equation and I get (28000)/((.06) * 86000) which works out to be every 5.4 months. So roughly twice a year I’ll need to either format the SD card or wipe the images from it (or you can store it securely as a security backup somewhere). If I dropped that down to one every ten minutes I would only have to change SD cards every 5 years.

And that’s that. You can leave your stick PC plugged in, sipping away at an old phone charger, pulling at max 2 amps of power. That’s less than 3$ per year in electricity costs, and zero for storage.

If anyone has had trouble uploading that many images to Google+ I’d be curious to hear about it. I probably have 20,000 images uploaded personally with no issues so far.

Share
 Posted by at 10:55 am
Jan 082013
 

It’s not often I post up about something about my professional career. I think that most of my readers get their business/professional/industry news from other outlets, and there’s not generally much for me to say on a topic that’s been covered my the mainstream media. Knowing this, I tend to post up those things which appeal to my readers: personal projects, hacks, games, cool software tricks, hardware builds, etc. There are some times, however, where I do think it’s OK to put on my work hat for a while and post up something about how things are going for me in the professional software industry.

rhapsodyfordsync

Today, things are going rather well. Rhapsody + Ford Sync was launched today to much fanfare at the International Consumer Electronics Show (CES). After many months my NDA is lifted and I can finally publicly talk about one of my secret projects! Everyone who has Rhapsody on their Android device can get into a Sync enabled Ford car and use this functionality today, functionality which I implemented myself last fall! If you saw the live announcement today they actually praise Rhapsody’s Android + Ford Sync development team. That’s not to say this work was done in a vacuum, oh no! I’m backed up by a tremendous team of folks from business, QA, design, product development, and marketing (not to mention a terrific iOS developer) who make my job all too easy sometimes. It certainly puts a smile on my face to see another successful product launch.

News reports have been coming in all day:
Bloomberg
Hot Hardware (apparently Bloomberg leaked the news first)
Ford’s official announcement page
The Verge
Pocket-Lint mentions us 1st
Auto News (via Bloomberg)
Automotive World
Slash Gear
The New York Times
Motor Authority
Motor Trend
Cnet
And many, many more!

Share
 Posted by at 4:17 am
Dec 302012
 

When looking back on 2012, it was a pretty successful year for both myself, and Google. They released a hot new tablet, and their app store has done remarkably well. One of my personal successes was the open sourcing of all of my android apps and other software back in April. Now, at the end of 2012 I feel that in the spirit of open source software I should share all the metrics about my apps on the Play store. The bottom line is, things are going pretty well. Installs are on the rise, and I love sharing software with people.

You can view or download the embedded spreadsheet below. I’ve highlighted some interesting findings in the list directly below.

  • My apps have been downloaded from the Play store a total of 223,872 times.
  • My apps have (today) 27,508 active installs from the Play store.
  • The average number of installs per app is 3k.
  • The average active installs per app (today) is 410.
  • During 2012 I received 10 total emails from users of my apps requesting bug fixes. I responded to every one.
  • During 2012 I received 15 total emails for feature requests, I implemented 8 of them.
  • Since becoming a Play store developer in May 2011, I have published 68 apps. I have pulled one app and had one app suspended due to DMCA request by Atari (custom pong.)
  • All of my apps have crashed a total of 63 times. That’s less than one crash per year per app on average.
  • The #1 most downloaded app is ‘Easy Cat Whistle‘ with 48K, followed by ‘Easy Pest Control‘ with 17k, and a three way tie with ‘Easy Side by Side‘, ‘Easy Graph Paper‘, and ‘Easy File Split and Join‘ each having about 10-11k.
  • The app with the most active installs is ‘Easy Side by Side‘ with 3860, followed by ‘Easy Cat Whistle‘ with 3459 and ‘Easy Inventory‘ with 2629
  • The average rating for one of my apps is 3.6 (out of 5). The average number of people who actually rate an app is ten.
  • My one paid app (Super Whistle) took about two hours to complete and has been purchased 53 times, netting me ~40$
  • I make about 50$ monthly on in-app advertising during the summer months, and 100$ during the winter months (this is not captured in this document, only through my bank statements). That’s about 2 times as much as I made from my monthly book sales in 2012, but only 1/150th of my monthly salary from working 9-5 jobs in 2012. Do note however, that most of these apps haven’t been updated since I initially published them in 2011, and advertising revenue continues to slowly rise. This slowly increases the return on those hours spent writing the apps initially.

As you can see, as an Android developer, I still get significantly more financial return from my time investment by working for an established organization. Not that money should generally be the driving force in your career, but for most of us it weighs in significantly. Mobile developers are the hot commodity right now, and companies can’t hire them fast enough or compensate them highly enough. It’s a volatile and exciting market that once again won’t be the same in a year. It likely won’t even resemble what it was a year ago. Those who know how to navigate the choppy waters of new technologies can, as usual, write their own checks. That said, it’s always good to have another revenue stream.

There’s also something incredibly satisfying about sharing software with people, especially when it is open sourced.

Download (XLS, 18KB)

Share
 Posted by at 6:49 pm
Dec 302012
 

Pop Them Balloons! – The first game from the 5-Seconds mini-game and article series compilation has been released on the Google Play store. You can download it (for free) here. This may take up to a full day from this posting to reach your particular Play market, so if you don’t see it on your Play market, be sure to check back later this evening!

Pop Them Balloons! is a casual game where you try to pop a certain number of different colored balloons within a time limit.

balloonstopop easymediumhardscreen youpopped3yellowballoons

Please note, It’s ad-supported, but no in-game ads, only title screen. I feel this is a fair compromise, especially since everything about the game is open source on GitHub and free for you to use however you like.

Share
 Posted by at 3:36 am
Dec 292012
 

While UI is often the last thing a programmer thinks about when starting on a new project, it’s often the very first thing a user knows about your project. Why then don’t we all use the latest and greatest UI patterns? Perhaps many coders find visual design to be out of their domain, or perhaps they feel that the execution of the algorithms contained within their program are of paramount concern to users. Regardless of the reason, disgruntled users have started to leave once trusted programs whose interfaces have not kept up with the times. How then to update your app(or game!) to the newest visual hotness?

In this article I’ll be taking you through the creation of a dynamic game selection screen based on the excellent ViewPagerIndicator library by Jake Wharton. As always, you can follow along in code at the 5 Seconds GitHub repository. When you finish the article, you should be able to easily implement a icon-enabled view pager for your Android app or game.

thisistheendFrontNoAdvert

  1. Open Source FTW
  2. Creating your Activity
  3. UI Layouts and Unobtrusive Advertising
  4. Creating your Generic Fragment with Saving and Loading of State Values
  5. Creating Your Adapter
  6. Putting it all Together – Instantiation
  7. Icing On the Cake – Title Music Loading
  8. Conclusion

Read on for the full article!
Continue reading »

Share
 Posted by at 10:35 pm

Adding Embedded Quick Grapher to Your Site

 

So you’ve seen the power of Quick Grapher and want to add it to your site? What’s the absolute fastest way to do this? Well, you can always grab the source from the GitHub repo, but if you don’t want to mess with all that, just include the files from hunterdavis.com like:


< script type='text/javascript' src='http://hunterdavis.com/resume/js/jquery-1.4.4.min.js'> < /script>
< script type='text/javascript' src='http://hunterdavis.com/resume/js/jquery-ui-1.8.9.custom.min.js'> < /script>
< script type='text/javascript' src='http://hunterdavis.com/resume/js/modernizr-1.6.min.js'> </script>
< script type='text/javascript' src='http://hunterdavis.com/resume/js/quickgrapher/embedded_everything.js'> < /script>

And that’s that! As for using embedded Quick Grapher, just follow the guide below:

Here’s the Original Embedded Quick Grapher Tutorial :

A New Kind of Graphing Tool
If you’ve been using any of the betas at www.quickgrapher.com you may have found yourself wondering how it works, what libraries we use, and if the tech is available for public consumption. QuickGrapher is based on two of our pure Javascript libraries, our solver library and our graphing library. Due to the increased interest in these libraries, we’ve bundled them both together into a single javascript library you can include on your site, which allows you unprecedented graphing power in a fully client-side javascript environment. You can display unlimited graphs with scores of points and complex equations faster than you ever thought possible, and without requiring your users to download a bandwidth-intensive image or flash applet. Our graph+solve library allows you to embed a graph of arbitrary algorithmic and point complexity using a single “graph” tag, just like any other html tag. Our library is compatiblie with Chrome, Safari, Opera, IE, and even embedded browsers for your iPhone, Blackberry, and Android devices.

Gallery

Seriously Easy
Ok, so you’re writing a post in your blog and you want to display your data on a graph. Maybe you’re a huge corporation with thousands of employees, maybe you’re an election enthusiast who wants to show some key demographic, or maybe you’re just writing in your personal WordPress blog. You don’t pay for application hosting, and even if you did you don’t know or don’t have the time to install a server process to generate graphs. Why should it be so complicated? Why can’t you just do it with a single html tag?
Now you can. Graph+Solve allows you to instantly and easily insert graphs anywhere into your site. Fully stylable via CSS and HTML5 compliant, Graph+Solve allows any level of user from novice to web designer the power to visually display your data.

Example 1
Say you’re writing a blog post about trigonometry. Maybe you’re an engineer, maybe you’re a student, maybe you just like math. You’re explaining sin and cos waves, and you’d like to show their periodicity. You could use traditional methods (screenshots of math utilities, excel sheets, etc), or you could have it done in 5 second with Graph+Solve library. Graph+Solve allows you to graph sine, cosine, and many more functions in a single tag. The following tag is all that is required to generate a graph of cosine and sine.
<graph equation1=”sin(x)” equation2=”cos(y)” />

Versatile Options
Graph+Solve supports a wide range of options and CSS styles. Simply by setting the correct attributes one may use Graph+Solve to instantly create cross-platform maps and terrain graphs. Dimensions, colors, backgrounds, grids, legends and so much more can be easily set using standard html and css tag attributes. Perhaps you’re not interested in a background grid, XY coordinates, multiple equations, legends, etc. Graph+Solve allows you to set exactly the options you care about, and can auto-generate any necessary attributes not specified by the user.

Example 2
Say you’re writing a blog post about military tactics. Maybe you’re a soldier, maybe you’re a history buff, maybe you just like tactics. You’d like to show the positions of soldiers on a battlefield grid, and you don’t want to have to continually edit maps by hand. With Graph+Solve, you can instantly share your strategies with no image editing. The following tag is all that is needed to generate the following graph.
<graph values=”10,10;30,11;40,12;20,8;50,7;60,15;70,5;21,10;33,12;44,24;” label=”confederate soldiers” type=”point” values2=”3,20;10,20;15,23;20,25;33,28;30,22;40,18;55,22;70,18″ type2=”point” label2=”union soliders” background=”http://www.hunterdavis.com/discursivelabs/images/3lakes.png” title=”Battle of The Three Lakes” style=”height:400px; width:400px;”/>

Serious Bandwidth Reduction
Our pure clientside Javascript graph+solve library in its entirety weighs in at 40 kilobytes. That’s roughly equivalent to a very small, highly compressed jpeg from a camera phone circa 2005. With this one 40 kilobyte library (less than what adsense loads), you can replace every single graph or equation plot on your website. If you’re running a graph heavy website this can be a reduction of many thousands of times. What’s more, our graph+solve library is used by many websites, and may be cached by the users browser. If a user is coming in from another graph+solve enabled site, they download nothing. This is a serious reduction in page load times for all browsers, but especially for those on 3g networks or hampered by a slow connection.

Example 3
Let’s say you’re writing an article on statistics, and you’d like to show a random distribution. A really large random distribution would be best, as the more data the better visual. You could generate a million points using a programming language, then feed it into an existing tool such as excel or matlab. Then, using the same tool you could plot another guide line along the median to show where the mean distribution should be. That is, if you can figure out how to add a line to a plot graph. Or, you could do it in ten seconds in a single line of html using the Graph+Solve library. The following line of html generates a hundred random points and plots a line across the median of the graph. Note how you are able to style the graph using standard CSS tags, and simultaneously display line graphs, point graphs, and equation graphs using the same tag.
<graph equation1=”rand(x)” minstepmax1=”0,10,1000″ title=”Mean Random Distrubtion” values1=”1,.5;100,.5″ label2=”Median Line” type2=”line”/>

Serious Efficiency
Just because graph+solve is executed by a client’s browser, don’t expect it to be slow. Graph+solve requires no external plugin of any kind, Flash or otherwise. It speedily graphs thousands of points in a few moments on a Pentium 3 class computer, quite ancient now in 2011. Graphs of complex equations with thousands of data points and complex algebraic functions load faster than a single equivalent image on mobile 3g devices.

Example 4
So you’re looking to plot a large number of data points in a graph, and you want it to be easy? Good luck! Unless you’re using our Graph+Solve library, you are in for a headache. Find the data source, paste it into your graph generator, save it as an image, upload that image to your web host and align for your page. Need to update a single data point? You’ve got to do it over. Want to change to a plot graph from a line graph? You’ve got to do it over. What to update the graph styling, size, etc? You’ve got to do it over. Want it to look good on all devices? Well you’d better make a new image size for each device! Starting to get frustrated? Do it with a single line of QuickGrapher, update it whenver you like in moments, and never think of it again. The following two lines of html generate line graphs using points taken from an graphing calculator games worksheet. As you can see, switching between a point and a line graph is as simple as selecting “point” or “line”

<graph title=”Our Mystery Point Graph” values=”20,11;19,6;19,2;17,2;17,6;16,5;15,2;13,2;14,5;14,6;12,6;12,2;10,2;10,4;9,2;7,2;9,6;7,6;4,4;2,3;0,2;1,3;3,5;5,9;9,11;17,11;21,17;23,18;25,17;24,16;20,11;” label=”Mystery Points” type=”point” style=”width:250px;float:left;” />
<graph title=”Not A Mystery Anymore” values=”20,11;19,6;19,2;17,2;17,6;16,5;15,2;13,2;14,5;14,6;12,6;12,2;10,2;10,4;9,2;7,2;9,6;7,6;4,4;2,3;0,2;1,3;3,5;5,9;9,11;17,11;21,17;23,18;25,17;24,16;20,11;” label=”Point Connecting Lines” type=”line” style=”width:250px;float:left;align:right;” />

Share
 Posted by at 6:30 pm
Dec 072012
 

While pushing out an update to ‘The Grind‘ this week, I had a few users who reported crashes with the newest content pack update. Unfortunately, Google Play’s dev console did not show the errors, and the users were not sure where the crashes were occurring. What is a developer to do?

Keep reading for a quick tutorial on setting up Crittercism crash reporting in your app.

Crittercism Logo

Continue reading »

Share
 Posted by at 5:34 pm
Nov 262012
 

This is the second in an article series about Android development, open source software, audio production, and so much more. You can read part 1 here.

Preface – A New Game!
Using the Hardware at Hand
Capture List, Gotta Capt’ em All!
Fun with Audio Capture
Editing your Audio – Audacity
Removing Ambient Noise with Audacity
Recording a Title Theme with Audacity

Preface – A New Game!

When I wrote the first article in this series, I never thought It would take me where it has. I’ve been all over town recording audio samples on my little boom mic, learned quite a bit about basic audio and recording techniques, and received a ton of excellent feedback from friends and strangers alike. My original intention was simply to update all of my previous Android apps to use my new audio library, but the sparks of creativity cannot be contained. I am therefore starting work on a new minigame collection titled ’5 seconds’. It will; of course, be fully open source. Expect cameos from all of my previous game characters and a good dose of fun. You can also expect site updates describing the game development process and how ’5 Seconds’ is evolving. You can checkout the GitHub page for it here.

Continue reading »

Share
 Posted by at 2:04 am