Tag Archives: developers

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 Application.mk file for these samples.

So to fix it, you need to create Application.mk, 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 Application.mk 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"
			{
				installedPackages.add(p);
			}
		}
		return installedPackages;
	}

I hope this helps.

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.

Power Schedule 1.4

I’m working hard for version 2 (which was basically rewritten), however I made this minor update (1.4), due to users complaining “Data Connection” doesn’t work on Gingerbread devices (see this article to understand why: Google is destroying Android). Basically, in 1.4 you will get a warning message when trying to access the Data Connection menu, with a link to the open issue at Google. Please star it to support developers (not just myself) – and not let Google create a(nother) precedent.

Thank you.

Google is destroying Android…

I received some disturbing news from some users. It seems the “Data Connectivity” does not work any more on Android 2.3 (Gingerbread). So I wanted to know why is this happening. Well, Google decided that a certain permission (MODIFY_PHONE_STATE) is no longer for us mere mortals, and only system applications are allowed to use it.
This permission is required for quite a number of apps in the Market, not just mine, so it will break ALL of them.

They did this before: they didn’t allow apps to change the GPS status, for example (starting with 1.5). Their reason is “privacy”. If the user wants his GPS off, it should stay off (of course, this doesn’t prevent Google – or Apple, for that matter – from tracking you). So no “track my girlfriend” kind of apps are possible 😉

Anyhow, to get serious. Google chose this security model for apps, where if the user knows that an application does need to do something and he allows it, it should be allowed to do so.
So why shouldn’t an application that specifically says it will enable / disable data connection (or GPS etc.) be allowed to do it ?!

I have *some* Windows Mobile development background, and I always blamed Microsoft for using their complicate signing procedure for applications. But it turns out this model is more “open” than Google’s:
– if an app was signed with a “privileged” certificate, it could access all functionality
– if an app wasn’t signed (or signed with an “unprivileged” certificate), it didn’t have access to all areas
These certificates were kind of hard to get (complicate procedure, paperwork etc.), but in the end they were linked to your person / company, so evil-doers *wink* could be easily identified.
So this model opened up a lot of possibilities for developers and apps.

Frankly, I don’t like how Google reacts to bad apps. They see a bad-acting app and what do they do? “Oh, we’ll lock this function up. Easy.”. They will do this until apps are only allowed display “Hello, world!”, and only for a limited amount of time.

In the end, there can be only one: Google’s app.

EDIT: here’s other people complaining about it as well: http://code.google.com/p/android/issues/detail?id=15031

Working…

I’ve been working on a brand new Power Schedule (I will call it 2.0, since it’s re-written from the ground up). The problem I’m still facing is that the user interface is getting quite complex (and by that, I mean the app is now larger in size). Unfortunately, Android has a BIG limitation when you’re trying to some special things (like having background services running): you must install the app in internal memory. And this is what users hate most, they’re running out of internal storage space quite quickly.
Therefore, you end up with a lot of angry users uninstalling apps.

So what to do then? Make the User Interface simpler? It’s not “fancy” enough for some. Install the app on SD Card? Not possible for this kind of app. Hopefully either Google comes up with a better solution for this situation, or manufacturers add more internal memory to their phones.

Hopefully I’ll find a solution which suits all 🙂

Android Market problems

I just tried to upload a small bugfix to Power Schedule – but guess what, big surprise: the developer account is not working (404 error). It seems I’m not the only one experiencing these problems (see here). So this question pops up : is Google working on some new developer account feature (hint: expand the country list already!) or they’re just having some technical problems.
Frankly, I would prefer the first one 😉

EDIT: Well, it’s getting even funnier (or not). I was finally able to get in, but I got a few messages that I’m not the owner of this app (lol). It seems some guys on the forums also get the same message.
Pity. I was just about to post a bugfix version (fixed “event at same hour in weekend / weekdays” bug, also some wrong times being displayed on the time selector – due to different time zones, and also a crash for some devices without Bluetooth).

Amazon AppStore – your turn, Google

Amazon launched their own Android Appstore (name is still under clarification with Apple – but that’s a different topic). It’s only available to Android users in the US for now, but I’m sure this will change soon enough. But the big news (for me, anyway) is that they also accept developers from many different countries – including Romania 🙂 . I couldn’t find a list yet, but I think if you have an Amazon account, you’re eligible).
They withhold the US tax – 30%, but if you have an US Tax ID (one can be obtained relatively easily, for free), it can be as low as 0%, for some countries (depending on tax agreement between US and your country). Of course, you still need to pay the required taxes in your country.

The point is, selling Android apps is more than possible, from all countries, even from a legal point of view… now I’m still confused why Google doesn’t allow it as well yet :(.
I refuse to think they really don’t care (that would be a major dissapointment).