Building san-angeles and hello-gl2 samples from Android NDK

Recently I started playing with the Android NDK. Looking at the included samples, I stumbled upon a native compilation problem (using the latest Android NDK Revision 8b):
compilation failed for hello-gl2 and san-angeles:

Compile++ thumb : gl2jni <= gl_code.cpp
D:/Work/Apps/android-ndk/samples/hello-gl2//jni/gl_code.cpp:22:23: fatal error:
GLES2/gl2.h: No such file or directory
compilation terminated.
make: *** [D:/Work/Apps/android-ndk/samples/hello-gl2//obj/local/armeabi/objs/gl
2jni/gl_code.o] Error 1

Searching around, I found others with the same problem, but no clear solution. However, the problem is quite simple: Google forgot to include the file for these samples.

So to fix it, you need to create, or copy an existing one from another sample. You will need to set the APP_PLATFORM inside it to the one used by the Java project. Check the AndroidManifest.xml file for each sample (ie. )

Here’s my for hello-gl2:

# The ARMv7 is significanly faster due to the use of the hardware FPU
APP_ABI := armeabi armeabi-v7a
APP_PLATFORM := android-5

For san-angeles it’s this:

# The ARMv7 is significanly faster due to the use of the hardware FPU
APP_ABI := armeabi armeabi-v7a
APP_PLATFORM := android-4 

Please note that for OpenGL 1.x, the minimum platform is android-4; for OpenGL 2.x, it’s android-5.

UPDATE: I was testing the OpenGL samples, but it seems others fail as well:
native-audio (set android platform to android-9 – at least)
native-media (set android platform to android-14 – currently maximum included platform in NDK)

UPDATE 2: It seems there’s also an open issue at Google for this:

I updated it with the solution:

Issue 36133: ndk-build.cmd does not work

I hope this helps.

Code snippet: Get all User installed apps on Android

In App List I needed to get the list of all user installed apps. So I made this little utility function:

	public List<PackageInfo> getInstalledPackages()
		List<PackageInfo> allPackages = getPackageManager().getInstalledPackages(0);
		List<PackageInfo> installedPackages = new ArrayList<PackageInfo>();
		for(PackageInfo p : allPackages) //parse all packages to remove the ones with "System" flag
			if(!((p.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) == ApplicationInfo.FLAG_SYSTEM)) //package is not marked as "System"
		return installedPackages;

I hope this helps.

AdMob mediation tests

As of now I’m running some AdMob Mediation integration tests for Tapjoy, AppBrain, Madvertise and Leadbolt. So far it seems to work ok – with one mention being Leadbolt. If an ad is being displayed by this Network, it creates an Ad which obscures the other Ads. In other words, AdMob can’t destroy this Leadbolt ad, and the upcoming ads can’t be seen. I can’t seem to get a reference to the LeadBolt ad so I can pass it to AdMob for destruction. That’s a pity, I have to find a workaround.

I’ll let you know how it works 😉

Quick Android Income Report : 4 months since startup

I’ve been late with this report, mainly because of my other daily activities. In short, ever since I introduced ads and the point system in Power Schedule, Power Schedule Basic and App List, I managed to get enough money to pre-order (thanks to a friend in UK) a Google Nexus 7 tablet (Yay!). Unfortunately I will receive it later in August, when my friend from UK will visit Romania.

It’s not bad, but I can’t quit my job just yet. Some friends of mine actually make a nice passive income from other types of sources. Try, for example, online poker. There are many such services online, but they use Partypoker. It works for them. Since I’m a developer, I’m just trying to do what I know best: develop :).

Anyhow, the short breakdown is as follows:
LeadBolt income: $10
AdMob income: $6
TapJoy income: $242
Sales from SlideME: 7$
Adsense on $7
TOTAL: $272

Overall, I would say Tapjoy is working. Some users do like “incentive advertising”, while others not. Leadbolt and AdMob (banner based) ads are not so well suited for my apps, as they are “fire and forget” kind of apps (users rarely open them after installation). I’m currently working on some updates for all apps, I will try to use AdMob’s mediation service in conjunction with other advertisers (LeadBolt, Madvertise, AppBrain). Maybe I’ll also sign up with other AdMob Mediation approved advertisers as well (however I’m trying not to dilute the earnings between too many advertisers, since it may delay my checks by a while :).

Android App fragmentation

Well Android fragmentation is one thing. However for me the most severe one is app fragmentation. Take a look at the below screenshot from Power Schedule Google Play statistics. The lime line is currently the 1.5 version. Orange is the 1.6 line, while the others represent the 2.x versions. The blue ascending line is the latest version, 2.1.2 – this seems to have a steep update rate, which is a sign that initial 2.x problems were solved.
It seems many users don’t update apps that often (as opposed to me, I always want to have the latest and greatest :P).

power schedule fragmentation

eCPM results with Tapjoy

I’ve had mixed feelings about implementing the Tapjoy “points” system. I can tell you that after a week, so do the users. Some don’t like it at all, and ask me for a paid version insted. I would gladly have one, but as I mentioned countless times before, I can’t sell on Google Play (reason being Google, not me).
Anyhow, I will also add Google Analytics, to analyze some things (such as average events used by each user etc.), to see how users interact with Power Schedule.

But coming back to Tapjoy, the results are promising. I’m getting an average of $7.04 eCPM over the first week since implementation. Also the trend is increasing (since only around 30% of users are using the 2.x version). I hope once people get used to the point system and also the new User Interface, things will get even better.
There are some other things which I plan to keep an eye on: localization. I really want to see the effect of translating Power Schedule to Slovak and French. I hope this will add some completely new users, which didn’t see the original 1.x version at all.

Stay tuned.

Unlimited Power Schedule version on Amazon Appstore

I have some new updates which I didn’t post online yet. First of all, the new 2.1+ versions got Power Schedule users back. Yes, the 2.0 version was quite a disaster, as it was quite complicated to use. Also the point system was not sufficiently explained. Here’s the chart from Google Play:

Anyhow, I’m glad things are getting back on track.
Also, the new 2.1.2 version is translated to Slovak, French and Romanian (more languages to come). By the way, if you know Japanese, Italian or Spanish and want to help me out with the translation, drop me a message.
Today I just uploaded the “point free” Power Schedule version to Amazon Appstore and SlideME alternative Android markets. Yes, it seems they are more open to developers, as they allow me to sell apps there. Power Schedule “unlimited events” edition costs just 0.99$. If you don’t like the point system, you can get the paid version. No ads, no points – just events. As many as you like :)

It will take a few days until the Amazon and SlideME staff review and approve the app (hopefully :)). I will post the purchasing links then.

Also, stay tuned for an income report update. This time, from AdMob, Leadbolt and Tapjoy.

New Update – Power Schedule 2.1.1

Last night I updated Power Schedule to version 2.1. I listened to people who complained about the new User Interface. Yes, now that I look at it, it was poorly designed. But somehow I missed this because I got used to it (while working on it).

Anyhow, I hope you like the new one. It’s much more clean and intuitive. I also added a “reboot” event – for Power Users who rooted their phones. You can set up a reboot each night, to have a “clean” phone in the morning (for example).

I plan to add a lot of other features as well – some suggested by users.
Many thanks go to these people (in no particular order):
Andy F
Carlos Blasco
Francisco Bautista
Levon Janpoladyan
Ferenc Harcos
Sujit Dey
Masoud Beheshti
Peter Jancar
Timothy Arceri
David Abdelli
Kevin (Darkbyte)

They helped me fix some issues and contributed with some ideas (or translations). I will also add their names (with their permission) in the About page (inside the App).

Looking forward to the next version

I need some volunteers translating Power Schedule

Translators needed! I translated the strings to Romanian. However I need help in translating the new strings in other languages as well. If you want Power Schedule in your language, just drop me a message or e-mail me at [email protected]