Surprise Android Permission Requests

I found an interesting demo app on another blog and thought I would try it out on my phone. I downloaded the code, built the project, and then decided I’d package it as an apk file so I could share it easily in email. I sent it to myself and was ready to install it. I was a bit surprised to see a request for permissions. The app was requesting permission to modify SD card contents and to read phone state and identity.

Generally, it has been my policy not to install any Android app that asks for too much access to my Android device. Upon seeing this, I stopped. There was no reason for any permissions. A fix would certainly be easy, I thought.

I checked the Android manifest file, expecting to see those permissions, but there was nothing there.  At first, I suspected that there  was some alternate way to request permissions or cause these requests. It turned out that the answer was much simpler than that. Permissions introduced in newer  versions of Android are unknown to very old versions. If your app does not say where it can be used, the check is done with the assumption that you might be on one of those old versions.

So always specify the min SDK version in your manifest file. As soon as I added these lines in my manifest, installation was fine. No more permission requests.

<uses-sdk android:minSdkVersion="8" 

The answer to this is out there in several places. The answer I found is this one: Why do so many Android apps require permissions to read phone state?  It took me awhile to find the answer so I’ve written it up here, as a reminder to myself and other developers regarding packaging apps for release.

(By the way, the demo app I was trying is quite fascinating. See Particle Explosion With Android for a really good demo app where particles explode and bounce around on the screen.)

About Bill Lahti

Bill Lahti is a software engineer building mobile applications and knowledge management solutions. Two of his interests are writing for this blog and building Android apps, with strategy games being an area of particular interest.
This entry was posted in Android and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s