Importing google-play-services lib into Intellij IDEA 12 (and 13)

For historical reasons, I’m going to reproduce what I did, taken from here. Many thanks to @Hesam who found it. I will vote to close the whole question. Note: the shortcuts are for OS X and Intellij 12 and 13. Make sure you have the latest SDK/ADT Tools and the play services. They change every … Read more

GooglePlayServicesUtil.getErrorDialog is null

Google suggests (also in docs) calling getErrorDialog() if the result code is SERVICE_MISSING, SERVICE_VERSION_UPDATE_REQUIRED or SERVICE_DISABLED. So it may be that the last possible status code (SERVICE_INVALID) is what’s causing trouble. I’m using the following code and so far it seems to work ok (testing in emulator, platform 2.3.3): int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(activity.getApplicationContext()); if (resultCode … Read more

Google play services 5.0.77

Found this solution by Mateusz Matela at https://groups.google.com/forum/#!topic/google-admob-ads-sdk/DkjtCx_Zvn8. I have tried on a Motorola DEFY+ that crashed from this bug two out of three times. It seems to work even when the warnings assositated with this bug appears in the log. It even says “AdWorker thread thrown an exception”. My ads even reappeard when continuing … Read more

Using Google Play Services LocationClient in background service

Full source code for a background service available here: https://gist.github.com/blackcj/20efe2ac885c7297a676 Try adding the super call to your onStartCommand. /** * Keeps the service running even after the app is closed. * */ public int onStartCommand (Intent intent, int flags, int startId) { super.onStartCommand(intent, flags, startId); setUpLocationClientIfNeeded(); if(!mLocationClient.isConnected() || !mLocationClient.isConnecting()) { mLocationClient.connect(); } return START_STICKY; }

Error adding geofences in Android (status code 1000)

You get GEOFENCE_NOT_AVAILABLE (code ‘1000’) when user disagrees to “Use Google’ location services” in Settings->Location->Mode: To fix it: go to Settings->Location->Mode set “Device only (Use GPS to determine your location)” set any other option to get the popup (e.g. “High accuracy (Use GPS, Wi-Fi and mobile networks to determine location”) dialog “”Use Google’ location services” … Read more

Android application as a service without activity

Sure! No reason you cannot have an application with only a service. …and no need to get into AIDL unless you want to. The problem is, how to make the application run. When you create an application with an Activity, you add an Intent filter, in the manifest, that makes the activity startable from the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)