Understand Android market
Tips for developing Android app
Lessons learned
Nowadays, Android is not just on tens of thousands of different phones and tablets. It’s on your wrist, in your living room, in your car, and as soon we start assigning IP addresses to inanimate objects, it is going to be pretty much everywhere around us. A lot of ground for even an experienced Android developer to cover! Also there are over one million apps just on Google Play, not counting Amazon AppStore or markets we are not generally interested in, like China. So, how can an independent developer create a successful app in this huge market with big players? I have no idea, I haven’t made a successful app! But, I have made a cute one, and I’d like to share my story with you.
It features:
I must note that all of this would be unnecessary if I knew how to work with OpenGL! It’s on my TODO list, since anything more complex than what we have now will require a hardware acceleration. But, for the time being I have to work harder, not smarter (I’m open to suggestions in the comments). So here’s what we did:
This is important because it provides consequences for their actions. Don’t make the same mistake our educational system does, making the users passive content consumers. Make them in charge. Give them the option to control their own devices and create their own personal experience. If you manage to package all this into a cute bundle that steals a smile on the first splash, than is not too far fetched to ask the user for spammy favors for content unlocking. In the end, you need to evolve your Android app development based on this data as a guide. Although primarily intended for moms/kids, this app may become popular in other demographics. It may not fit into our original vision, but users needs must be met. Otherwise they’ll find someone who can.
Published with permission of toptal
Lesson 1: Connect The Dots
Success (usually) doesn’t happen overnight and this is not my first app. I have ones ranging from unexpected over-the-weekend development hits like Macedonian Orthodox Calendar, with over 30,000 users in a language that no more than 4 million people can understand, to more successful failures like TweetsPie, an app with heavy media coverage and a terrible user-base of just over 600 active users. A lot of lessons there! While these apps helped me understand the mind of the “elusive creature called the User” a bit better, the one that inspired me was a two-hour project. Originally developed to make me a millionaire, once 1,428,571 users purchased the app as Google takes 30 cents out of every dollar, The Dollar App was made to test my merchants account. Little did I know that years later I will receive an email from a happy mom stating that it was the best dollar that she ever spent since her boy was smiling every time my app gave him a hug. And that’s how an idea was born! Why not use the fundamental human need for a hug and make it pretty? Make it for a specific audience, interactive, challenging, fun to use, and even more fun to share.Lesson 2: Understand The Android Market
All the things I mentioned above added up to a live wallpaper app. The basics are not that hard to guess. Android has a bigger market share than iOS, but iOS users purchase more. Messaging apps are wildly popular, but freemium games top the earnings. China, India, Brazil and Russia are emerging markets, but lack spending habits. You can read the App Annie Index for more insights. So how does a live wallpaper app fit into this? First of all, it eliminates most of the platforms since a live wallpaper is an Android thing. Second, this feature was added in Android 2.1 so it has a large community and quite a few beautiful examples. Most notably Paperland and Roman Nurik’s open source Muzei, probably the best reference point for Android development. While there are lot of live wallpapers out there, most of them fall under the scenic/weather category, and very few fall under the cuteness overload category. This is something we wanted to change and offer something that gives you a smile each time you unlock your phone, even though you unlocked it for a completely different reason. We gave you a cute little bundle of joy to hug you before you go to bed at night, or when you turn off your alarm in the morning. And even better, make it personal and customizable. Without further ado, and before we go into technical details, I proudly present you: Ooshies - The Live WallpaperIt features:
- free live wallpaper app that gives you hugs
- 12 unique ooshies to choose from
- free, un-lockable, and purchasable content
- current weather updates
- social login and data sync
- seasonal greetings
- many surprises
- a ninja cat
- did we mention hugs?
Lesson 3: Try To Make It Happen
Ooshies seemed like a pretty straightforward Android app idea. Paint a background, overlay some clouds and stars, put a bear with a balloon on top, and you are good to go. But no, it’s Android! What seems easy is often quite difficult and we tend to repeat the same common mistakes over and over again. Here’s a quick rundown of the challenges I faced:- Hardware acceleration - why draw using the CPU when the GPU is so much better at it? Well, it turns out that drawing bitmaps on a canvas cannot be hardware accelerated. At least not for the time being.
- OpenGL - if we want hardware acceleration we need to use OpenGL ES or even better a framework that does most of the work for us.
- Bitmap loading - a well known memory consumption issue. We need to allocate 1 byte [0-255] of memory, for each channel in the #ARGB, to display a single pixel. Also the images we use often have higher resolutions than the device’s display. Loading them all will quickly result in OutOfMemroyException.
- Home launchers - the live wallpaper will be hosted in the home launcher process, and different launcher tend to give different callbacks to the live wallpaper service (most notably Nova and TouchWiz).
- Battery life - if not done right, the live wallpapers and the widgets can drain a lot of battery. With all the buzz about the Lollipop (Android 5.0) terrible battery life the first app to go will be the live wallpaper.
canvas.drawBitmap(background, 0 - offsetX / 4, 0, null);
canvas.drawBitmap(weatherOverlay, 0 - offsetX / 2, 0, null);
if (!validDoubleTap) {
canvas.drawBitmap(ooshieNormal, positionX - offsetX, positionY, null);
}
else {
canvas.drawBitmap(ooshieTapped, positionX - offsetX, positionY, null);
}
The offset
is a percentage of the distance user has scrolled. It’s a callback that the wallpaper engine provides: @Override
public void onOffsetsChanged(float xOffset, float yOffset, float xOffsetStep, float yOffsetStep,
int xPixelOffset, int yPixelOffset){
super.onOffsetsChanged(xOffset, yOffset, xOffsetStep, yOffsetStep, xPixelOffset, yPixelOffset);
// athe current offset should be a fraction of the screen offset to achieve parallax
if (!isPreview()) {
float newXOffset = xOffset * 0.15f;
wallpaperDrawHelper.setOffsetX(newXOffset);
if (isVisible() && hasActiveSurface) {
wallpaperDrawHelper.drawFrame(false);
}
}
}
I must note that all of this would be unnecessary if I knew how to work with OpenGL! It’s on my TODO list, since anything more complex than what we have now will require a hardware acceleration. But, for the time being I have to work harder, not smarter (I’m open to suggestions in the comments). So here’s what we did:
Lesson 4: Work With What You Have
As a big supporters of theminSdk=15
initiative, from the start we eliminated all the 2.x devices. The effort for maintaining backward compatibility is greater than the possible revenue from users unable\unwilling to upgrade their phones. So, in most cases, we’ll be able to achieve smooth experience with an added option to disable the parallax if desired. Another big optimization is how we handle the bitmaps. A very similar parallax effect can be achieved with drawing two bitmaps instead of three: - Ooshie overlay - trimmed and carefully scaled Ooshie bitmap (can be accessorized)
- Combined overlay - a combined background and weather bitmap that moves with a fraction of the Ooshie speed
long lastUpdate = prefStore.getLong(SharedPrefStore.Pref.WEATHER_TIMESTAMP);
if (System.currentTimeMillis() - lastUpdate > Consts.WEATHER_UPDATE_INTERVAL){
// update the weather if obsolete
Intent intent = new Intent(getApplicationContext(), WeatherUpdateService.class);
startService(intent);
}
So, basically, here’s the checklist for a memory optimized smooth software bitmap drawing: - Combine bitmaps once
- Draw less bitmaps
- Redraw only on demand
- Avoid background tasks
- Offer users some control over the process
Lesson 5: Test. Test. Test
I cannot stress how important this is! Never, I repeat NEVER, release your app before testing it! And, I don’t mean that YOU should do the testing. You wrote the code, you know how it works, and you influence the result by knowing the expectations. I’m not talking about JUnit testing (although recommended), but about staged rollouts i.e. alpha and beta testing. If you are into Android software development the terms are straightforward, but here is a quick rundown:- Alpha testers - a small group of people consisting of your teammates and people from the industry, preferably Android developers. Chances are they are going the have high-end devices and will play around with the developers options. They’ll send you stack traces, bug reports, and even give you some code/UI optimization tips and tricks. Perfect for early releases with partial/missing features.
- Beta testers - a much broader audience with various demographics. Stable releases should be published here. Even if your ninja level is too damn high, you can never predict, let alone account, for all the possible Android distributions and ways people use their phones.
- Different launchers have different default home screens - usually the first or the middle one, and ,as far as I know, there is no way of knowing it’s position.
- It’s hard to center the Ooshie without knowing the default home screen position - thus the settings slider for adjusting the parallax offset.
- An average user doesn’t know what parallax offset means - much simpler terminology should be used on the settings page.
- A random user will suggest your next feature.
Lesson 6: Let The Data Speak
Making an Android app that stands out today is a bit more difficult than making a calculator app, when there were none back in 2009. Making the perfect app is hard. Mainly because perfection is in the eye of the beholder. What is good for me, doesn’t necessarily mean it’s good for you. That’s why it’s important to let the app grow. Our roadmap checklist for new features shows that we have enough work for the whole 2015. Among other things we’ll soon include:- Sounds
- Seasonal backgrounds
- Customizations (background color, weather packs, ooshie skins, etc.)
- Region specific ooshies (ex. babushkas)
- A lot of new ooshies and ways to unlock them
- he/she received a hug
- how many rainy days were brightened up by a smile
- how many taps were needed to unlock an Ooshie with a mini-game
- how many friends installed the app because of you
This is important because it provides consequences for their actions. Don’t make the same mistake our educational system does, making the users passive content consumers. Make them in charge. Give them the option to control their own devices and create their own personal experience. If you manage to package all this into a cute bundle that steals a smile on the first splash, than is not too far fetched to ask the user for spammy favors for content unlocking. In the end, you need to evolve your Android app development based on this data as a guide. Although primarily intended for moms/kids, this app may become popular in other demographics. It may not fit into our original vision, but users needs must be met. Otherwise they’ll find someone who can.
Conclusion
Let’s return to my most successful failure TweetsPie. Despite couple of awards and huge media coverage, the app failed to retain it’s users (the reasons why are beyond the scope of this article). Success is not always apparent. Thanks to the whole experience I learned a lot. I gave, at least, a dozen lectures on How (not) to fail as a startup on various events and hackathons, and managed to get a couple of clients at Toptal. Even more important, I try not to repeat the same Android development mistakes with Ooshies by following the tips and tricks in this guide. To wrap up this long guide, what we define as a success is, at later stage, tightly coupled with what we set as goal in the beginning. The most common success measure is, of course, making a lot of money. No matter if your app makes it or not, you must try to make it happen, and believe me at the end you’ll become a better person (hopefully one that manages to learn OpenGL). You’ll make new friends, few enemies, and if you are lucky/smart enough you’ll make a lot of users happy. You can check our website or download Ooshies to give it a try.Published with permission of toptal
Hi,
ReplyDeleteI would like to thank you for sharing this factual information with us. I totally agree with all you know about dot net developers. dot net developers are exploding on the internet in 2022. Therefore, one needs to be aware of the market trends.