Google Play Services automatically add new permissions

com.google.android.gms:play-services-ads:7.5.0

Issue

After upgrading Google Play Services from 6.1.11 to 7.5.0, bunch of new permissions are automatically added to the application's manifest.

Android Permissions

The app actually only uses Admob (Google Mobile Ads) libraries from Google Play Services and permissions such as "ACCESS_COARSE_LOCATION", "ACCESS_ACCOUNTS", "USE_CREDENTIALS" are completely unnecessary.

Android - Some UTF-8 characters get lost during HttpPost

Issue

Some non ASCII characters get lost when submitting HttpPost (or HttpPut) requests to a remote web service. All text after the problematic character also gets stripped out.
There were no issues on the server side as other clients could submit any non standard characters without any issues.

PHP json_encode() fails with error "Invalid UTF-8 sequence in argument"

Issue

PHP / MySQL web service fails to return JSON encoded data when it contains some non standard ASCII characters. Text in MySQL looks correctly and database has "utf8_unicode_ci" collation.
The issue occurs while running json_encode() function. The web service returns following error:

Type : Error Exception
Message: json_encode(): Invalid UTF-8 sequence in argument

Android - getActionBar() returns null after upgrading to SDK 21

I was working on a new app in Android Studio Beta with target SDK 20. It was all well and good, but after updating target SDK version to 21 (and appcompat-v7 to 21.0.0) the app started crashing on launch.

Quick debugging revealed that the issue was cased by the line of code actionBar = getActionBar(); inside main activity onCreate method. getActionBar() was now returning NULL.

After some digging I resolved the issue by changing application theme from Theme.AppCompat to android:Theme.Holo. This will only work if your minimum SDK is 14 or higher, which was the case in this instance.

Newsletter

Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait