FAQ Database Discussion Community


UNEXPECTED TOP-LEVEL EXCEPTION when adding play-services

android,google-play-services,build.gradle
I have a project where I need to use the Google play service libary. But when I add it to my dependencies i get the following error: UNEXPECTED TOP-LEVEL EXCEPTION Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Eclipse\adt-bundle-windows-x86_64-20140702\sdk\build-tools\21.1.2\dx.bat --dex --no-optimize --output C:\Users\Reigstad\Documents\secret-tyrion-android\Tyrion\app\build\intermediates\dex\debug...

How to publish leaderboard on Google Plus from Google Play Games lib in Android

android,google-play-services,google-play-games
I'm developing an application that uses Google Play Games Leaderboard and BaseGameUtils. The thing is that I want to publish the leaderboard on user's Google Plus and I can't find any exmaple showing how can I do that. Can that be done? Thanks in advance!...

replacing com.google.android.gms:play-services with google-play-services.jar

android,google-play-services,google-maps-api-2
I am building a google maps app on android using android studio When I released the first version of my app, no one was able to view the google maps as google play services must be installed on the devices by users ( I cant ask people to download that...

Google play service make app crash

android,google-play-services
Here is my gradle: compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:22.0.0' compile 'com.android.support:recyclerview-v7:21.0.0' compile 'com.github.bumptech.glide:glide:3.6.0' compile 'com.android.support:support-v4:22.0.0' compile 'com.google.android.gms:play-services:7.3.0' When I remove compile 'com.google.android.gms:play-services:7.3.0' , app works fine, but when put it in, app crashes: Here is logcat: java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV11 at...

getMapAsync() - call once and save the result, or call every time I need the map?

android,google-maps,google-play-services,android-maps-v2
Google Play Services 6.5 added the getMapAsync method, which allows us to asynchronously retrieve the GoogleMap object that backs a MapFragment (or MapView). The documentation states that The GoogleMap object provided by the callback is non-null. I don't have a great understanding of why asynchronous retrieval is required here (i.e.,...

AndroidChromecastSDK (Xamarin Bindings) : Getting the RemoteMediaPlayer.MediaStatus always return null

c#,monodroid,google-play-services,chromecast
I'm developping a custom sender application for chromecast in C# using Xamarin. At this point, I can send MediaInfo to the receiver app and play a song correctly on my TV. The problem I have is when I try to stop the RemoteMediaPlayer. Calling Stop() on the player returns a...

not able to get advertising id in android

android,google-play,google-play-services,genymotion
I am using below code to get advertising id in android, but its giving following exception. 06-12 12:14:19.034: E/AndroidRuntime(13631): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.authorwjf.amianemulator/com.authorwjf.amianemulator.Main}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.android.gms.ads.identifier.AdvertisingIdClient$Info.getId()' on a null object reference I have added google play service library and meta tag in android...

Does Google Play Services pre-release versions to developers?

android,google-play,google-play-services
I might be spoiled having worked on iOS for so long, but does Google release Google Play Service beta versions for developers prior to releasing the full versions to the public? I'm currently working on an SDK project, and would like to test out the latest Google Play Services versions...

Error in Google Play Services: read failed: EPERM (Operation not permitted)

java,android,google-play-services,ioexception,google-cloud-messaging
Here is the LogCat error I am getting: android java.io.IOException: read failed: EPERM (Operation not permitted) at libcore.io.IoBridge.read(IoBridge.java:435) The error is given in the following code, where I am trying to register a device using AsyncTask: private void registerInBackground(){ mRegisterIdTask = new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void......

Writing to Google Play Leaderboard API callback returns successfully but no scores are recorded

android,unity3d,google-play-services
I've implemented Google Play Services into my Unity-Android game using the plugin here. All other aspects of the API work fine, I can unlock achievements, authenticate sign ins, bring up the leaderboard UI. However, when I request for a score to be submitted, the API callback is successful, as evidenced...

I can't see my app in beta distribution

android,google-play,google-play-services
I have my app in beta distribution, but I don't have a production apk yet. I already configured the google group with the tester and they have accepted the invitation of beta testers. It's something weird If I write the url of google play with my app. Google play shows...

Download Google Play Services

android,error-handling,google-play-services
In my android app I use google play services to view google maps When a device does now have google play services installed, android shows a button says "Get Google Play Services" this button is from android itself, i did not create it. the problem is that when ever user...

How to change the text of a Dialog in Android?

java,android,google-play-services,android-gcm,android-dialog
I am trying to follow the gcm tutorial from Googles docs. They say to call this method if Play Services are out of date: GooglePlayServicesUtil.getErrorDialog(resultCode, activity, 9000).show(); That's fine, but it puts a dialog that says "This app won't run unless you update Google Play Services" with an "Update" button....

Access Google+ photos from Android app

android,google-play-services,picasa
Is there an API for accessing photos / albums in Android? I would like to create photo picker from it....

How can i ensure that my app support minimum Google Play Services 4.1 version?

android,google-play-services
I need to get ConnectionResult.SUCCESS when I'm checking Google Play Services availability if installed Google Play Services version is 4.1+: int code = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); Currently I'm geting code == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED, when Google Play Services version is 5.0.84. I know that all i need is to add some tag to manifest...

android Unable to execute dex: method ID not in [0, 0xffff]: 65536 even with Multidex.jar

android,google-play-services,appcompat
In my application i have added appcompat-v7 lib project and google-play-services(need maps and drive api) lib project. And some more libraries which are necessary to execute my menu functions in application. Used libraries: google-api-client-1.14.1-beta.jar google-api-client-android-1.14.1-beta.jar google-api-services-drive-v2-rev65-1.14.1-beta.jar google-http-client-1.14.1-beta.jar google-http-client-android-1.14.1-beta.jar google-http-client-gson-1.14.1-beta.jar google-oauth-client-1.14.1-beta.jar gson-2.1.jar itextpdf-5.5.3.jar...

How should I Implement TBMP Rematch?

android,google-play-services,android-notifications,google-play-games
I'm creating a multiplayer tic tac toe game and it works for the most part, but when it's time to rematch I'm getting less than desirable functionality. So originally I used the same implementation of Games.TurnBasedMultiplayer.rematch as the TBMPSkeleton sample project. Basically after calling Games.TurnBasedMultiplayer.finish, I check whether or not...

java.lang.NoClassDefFoundError: com.google.android.gms.gcm.GoogleCloudMessaging using java.lang.NoClassDefFoundError:

java,android,eclipse,google-play-services,google-cloud-messaging
This is really annoying. I've wasted a whole day but haven't received any proper result. I'm trying to add Google Cloud Messages into my app. I'm using Eclipse last version. ADT last version. I've added google-play-services_lib as Library, added the jar file in Build path but my app drops at...

Are there any advantages of using FusedLocationProviderApi over LocationManager?

android,google-play-services,android-location,android-maps-utils
Earlier to get user current location I have used LocationManager: LocationManager locationManager = (LocationManager) getActivity().getSystemService(Context.LOCATION_SERVICE); if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) { location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); } else if (locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) { location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); } It is easy to read and very straightforward...

Download an APK from a website and prompt the installation to the user

android,download,google-play,apk,google-play-services
My approach is simple, I have an APK hosted on my site and when the user completes the download I would like to present the installation wizard instead of having to look for the file in downloads or even using a file manager for older devices etc. Is that possible...

Intellij idea. Can't publish apk to Google play

java,android,intellij-idea,google-play,google-play-services
I can't publish my apk to google play service and I can't understand why. I'm new to android development so appreciate any feedback Some screenshots are below. Here is how my project looks in idea: Here is app manifest: 1) I create a certificate and signed apk. 2) I tried...

App occasionally crashes when accessing google play services

android,google-plus,google-play-services,google-plus-one
In my app I'm using the PlusOneButton and I simulated an automatic click on the actual button - to save the user one more click. For users that aren't signed in with their Google account the next screen that will be displayed is the builtin google dialog to choose an...

android - google play services 7.3.0 causes crash

android,google-play-services
I was using google play services 6.5.87 until now but I wanted to use Android place picker in my app. This requires play services version 7.0.0 and above. I changed google play services version to 7.3.0(latest, tried 7.0.0 as well), but this started causing crash on kit kat and below...

In CoCos2dx how to use admob and google play sevices together

admob,cocos2d-x,google-play-services
I was trying to integrate both Google pay services and Admob together in my Android game developing in Cocos2dx.But I'm getting this error Unable to execute dex: Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode; Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode; Please help me to...

Google Play Services Version for Android Studio

android,android-studio,google-play-services
I'm in the process of switching over to Android Studio from Eclipse. Adding GPServices to my project was pretty straight forward in Eclipse. Just make sure the latest SDK was installed in the SDK manager and copy the library into my workspace from the SDK bundle. With AS, I have...

Google Play Services 7.0 settings Dialog

android,google-play-services
Google describe in their blog post a one touch settings dialog that asks the user to turn on their location (letting the user turn on location without sending them to their phone's settings). I just cannot find the appropiate method / approach to do this in their API docs. Anyone...

Attempt to invoke virtual method when getting current location

java,android,geolocation,google-play,google-play-services
I am trying to get current location using Google Play Services. Below is my code. public class MainActivity extends ActionBarActivity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { public double latitude; public double longitude; public static final String TAG = MainActivity.class.getSimpleName(); private GoogleApiClient mGoogleApiClient = null; protected Location mLastLocation; // Some butterknife code public...

android studio cannot resilve symbol LocationClient

android,android-studio,google-play-services,location-client
I'm working with AndroidStudio and trying to use the googleplayservices for geocode. I've followed the android tutorial: http://developer.android.com/google/play-services/setup.html but in my imports i've got underlined : import android.location.LocationClient; that says: Cannot resolve symbol Location Client Any ideas? My code goes as next: //imports ... import android.location.Location; import com.google.android.gms.location.LocationClient; import android.location.LocationClient;...

Why do I have java.lang.ClassnotFoundException while implementing location listener? (using ECLIPSE)

java,android,eclipse,location,google-play-services
I know that similar questions have been on SO and I have read through and tried to implement the solutions mentioned but nothing is working. The specific problem is like this (using ECLIPSE): I am trying to implement location awareness in one of the activities (triggered through menu selection) in...

Can't find Google fit class

java,android,android-studio,google-play-services,google-fit
I'm trying to copy the official Google Fit sample from here Setup and Sensors. I'm having problems with the DataSourceListener. When I try to add that class in AndroidStudio it doesn't seem to find it, the class doesn't seem to exist...

import com.google.android.gms.common.api.GoogleApiClient; cannot be resolved

android,google-plus,google-play-services
I want to make a login with Google+ login button like this Tutorial I have copied the codes, set google_play_services libraries, added package name and SHA1 key in google api console, but there are some import errors : This import is not an error : import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesUtil; import...

How can I determine the version of Google Play services?

android,android-studio,gradle,google-play-services
I am migrating from Eclipse to Android Studio. I have a project that I imported into Android Studio that uses Google Play Services, so I am following the documentation I found here: http://developer.android.com/google/play-services/setup.html This documentation says that I need to edit my build.gradle file. They give the example: apply plugin:...

findFragmentById(R.id.map) returns null in Android L

android,google-maps,google-play-services,android-5.0-lollipop,android-maps-v2
While testing a location based app in Android 4.4 we were able to properly see and use map via Android maps v2 Since the time I upgraded to Android L it is not able to fetch MapFragment with the following code: In MainActivity there's a FrameLayout in which I load...

mGoogleApiClient.isConnected() returns null

android,google-play-services,google-api-client
I have gone through all the StackOverflow questions and tried every method but still the problem persists. public class PlaceInfoActivity extends ActionBarActivity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { private static final String LOG_TAG = "PlaceInfoActivity"; private static final int GOOGLE_API_CLIENT_ID = 0; private GoogleApiClient mGoogleApiClient; TextView mTextView; String content = ""; @Override...

Android Wear Error ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null}

android,google-play-services,android-wear,moto-360,data-layer
I've wanted to make an easy wearable app and connect through the data layer. Everything works fine with the handheld module (using: S5), but the wearable (using: Moto 360) always throw the error: onConnectionFailed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null} The play services at the handheld are up-to-date I've added compile 'com.google.android.gms:play-services:7.3.0' to both,...

Android - “Connecting to Google Play” still gives Error Code 4?

android,google-api,google-play-services,google-play-games
I'm still a bit new to the Google APIs and the GoogleApiClient class, so I followed this tutorial hoping to get set up enough to display a leaderboard. At the moment I've implemented this code into my game activity. public void onConnectionFailed(ConnectionResult arg0) { Log.d("fes", "error " + arg0.getErrorCode()); if...

Stop location updates by using the last google play services api location

android,geolocation,listener,google-play-services
I'm building a simple weather application and I'm using the last google play services API to get the location. By calling the following: LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this); we are able to get the location updates and thanks to the listener: @Override public void onLocationChanged(Location location) { // update the location }...

Auto-Deploy to Google-Play Store

android,google-play,google-play-services
Does anyone know a solution that allows me to auto-deploy to google-play whenever I launch a new version of an app? The objective is to automate the process to have no human intervention....

cannot get folderId that i just created on google drive

android,google-drive-sdk,google-play-services,google-drive-android-api
public class Helpers extends Activity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { SharedPreferences preferences; private static final String TAG = "BaseDriveActivity"; public static String EXISTING_FOLDER_ID; protected static final int REQUEST_CODE_RESOLUTION = 1; protected static final int NEXT_AVAILABLE_REQUEST_CODE = 2; public static final String folderId = "FOLDER_ID"; public static final String fileName = "folderId";...

Google Play Services resultCode = 10004

android,google-play-services
I used the google demo example TypeANumber from developer.android.com/training. I configured the app correctly in the play.google.com developer console, even published it, configured as well correctly the game service TypeANumber in the developer console and linked the previous mentioned app, even published the service and I still keep getting the...

Is the user required to be logged in to Google Play if I am using Google Play Services?

android,google-play-services,android-location
Is the user required to be logged in to Google Play if I am using Google Play Services? Specifically, I am using LocationClient and LocationRequest APIs....

Update to already published game on Google Play giving error with SHA1 key

android,eclipse,google-play-services,sha1,google-play-games
I have a problem with my already published game at Google Play Store. In my first published game I have not used any Google APIs. But in my next update I have used Google Play Game Services. Now I have uploaded updated APK for Alpha testing. When I have downloaded...

Best approach for creating a reusable object to get users location?

android,android-fragments,location,google-play-services
I have an app which currently consists of 2 activities. Inside the first activity there is a Fragment which itself contains a MapFragment. The other activity contains a ViewPager which holds two fragments, one of which is also a Fragment that itself holds a MapFragment. In both fragments that contain...

Invalid file: google-play-services_lib/build.xml in android

android,xml,eclipse,ant,google-play-services
I have an android project in which i am trying to use services like maps etc., and so i came to know that i need to use google-play-services_lib library. So i just taken it from source sdk(sdk/extras/google/google_play_services/libproject) folder and copied it to location /Users/name/android/ on my computer. Now i imported...

How to specify google play services dependency in maven

android,maven,google-play-services
I build a project with maven, I want to add a dependency to Google play services wear. My Gradle build file has compile 'com.google.android.gms:play-services-wearable:+' and in my pom.xml under "dependencies" I put <dependency> <groupId>com.google.android.gms</groupId> <artifactId>google-play-services</artifactId> <version>5</version> <type>aar</type> </dependency> but maven keeps complaining "Could not find artifact". How do I specify...

onHandleIntent not firing with location updates

java,android,google-play-services,android-location
I am trying to listen to location changes using the Play Services Location API. What I'm trying to do is go for the background app approach and get the updates using a PendingIntent. However, the onHandleIntent() function does not get called at all. I didn't find a single source of...

I can not delete Snapshots (Googleplay services C++ 1.3 SDK)

google-play-services,google-play-games
My code is pretty simple: auto response = Snapshots.FetchAllBlocking(); if (IsSuccess(response.status)) { for (auto& fetch : response.data) { Snapshots.Delete(fetch); } This throws an exception: 01-27 01:14:11.675: E/GamesNativeSDK(3448): Exception in com/google/android/gms/games/snapshot/Snapshots.delete: java.lang.IllegalArgumentException: Buffer is closed.. What does this mean? BTW. in my App and client I have two snapshots, and one...

Google Play game services | ShowSelectSavedGameUI Unity android

unity3d,google-play-services,android-savedstate
I am getting following exception on showing saved game ui.Here is my code: PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder() .EnableSavedGames() .Build(); PlayGamesPlatform.InitializeInstance(config); // Activate the Play Games platform. This will make it the default // implementation of Social.Active PlayGamesPlatform.Activate(); // Sign in to Google Play Games mAuthenticating = true; Social.localUser.Authenticate((bool success)...

View leaderboard for app in Google Play Games

android,google-play-services,google-play-games
I just published in app to the Play Store that uses the Google Play Services API. I setup a leaderboard in my developer console, and can successfully publish scores and display the leaderboard in game (along with everyone else's score in my circles, and the public "all-social" leaderboard). However, when...

GC overhead limit exceeded with google play services

android,google-play-services
I am trying to run my android project on eclipse and platform ubuntu 64 bit. Everything goes well but When I Add Google play Services to the project appear a big problem. 1.Running android app, hight CPU load. Eclipse Show wrong message "GC overhead limit exceeded". Finally Close Eclipse. When...

Is it possible to use the GoogleApiClient in an Android app without Google+ sign in?

android,google-maps,google-plus,google-play-services,facebook-android-sdk
My Android app has maps and location updates involved. The location updates in particular require a GoogleApiClient instance: LocationServices.FusedLocationApi.requestLocationUpdates(service.getGoogleApiClient(), locationRequest, this); I'd like to offer both Google+ and Facebook as login options and have built that out. But on testing the Facebook login, I've noticed by GoogleApiClient instance is not...

GoogleAnalytics SDK v4 For Android - Integration - Corrupts my application

android,eclipse,google-play-services,google-analytics-v4
This is a bit weird and i am not sure how to put it. I am trying to integrate GoogleAnalytics SDK v4 from official site. Here is what i have done till now.. Copied the google-play-services_lib folder from android-sdks/extras/google/google_play_services/libproject/google-play-services_lib and placed in my root folder of the application. In Eclipse...

LocationServices.SettingsApi Reset SETTINGS_CHANGE_UNAVAILABLE flag

android,google-play-services
Updating to Google Play Services v7.0+, and based in this sample for LocationUpdates in Android, I have the following code to connect to the LocationServices.SettingsApi and check if user has everything OK for the Application receive the location updates. LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder(); builder.addLocationRequest(mLocationRequest); mLocationSettingsRequest = builder.build(); PendingResult<LocationSettingsResult> result...

AdMob ads not showing, getting Ad is not visible. Not refreshing ad

android,admob,google-play-services
I am trying to initialize AdMob ad programatically, without xml code, but I am not getting shown anything, and I am receiving these warnings in LogCat And here is how I am initializing the ad in OnCreate: AdRequest adRequest = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR).build(); AdView adView = new AdView(this); adView.setAdSize(AdSize.BANNER); adView.setAdUnitId("some id...

Improper configured Google play game services in android game

android,google-play-services,google-oauth
I have used Google play game services in my android game. But when i download it from test account I get "The application is incorrectly configured. Check that the package name and signing certificate match the client ID created in Developer Console. Also, if the application is not yet published,...

error: package com.google.android.gcm does not exist - After migrating to Gradle

android,android-studio,google-play-services,android-gradle,android-build
I have a problem with an old project which was developed in IntelliJ without Gradle. I wanted to migrate it to Android Studio and Gradle, but I am experiencing a lot of problems. Since the project was quite old, the old Google Play Services version was used. In Intellij I...

java.lang.NoClassDefFoundError for any google-play-services feature

java,android,eclipse,google-play-services
I'm using the last version of Eclipse, ADT and the newest Android SDK. If I'm trying to use something in a simple HelloWorld Android project Google Play feature, for instance, int res = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); the app crashes with 04-27 21:52:23.905: D/ActivityThread(4379): handleBindApplication:my.app.test 04-27 21:52:23.905: D/ActivityThread(4379): setTargetHeapUtilization:0.75 04-27 21:52:23.905: D/ActivityThread(4379): setTargetHeapMinFree:2097152...

App Invites for Android: How to set received message content

android,google-play-services,google-app-invites
I'm trying to test the new Google Play Services api "App Invites for Android" that is currently in Beta. Maybe I'm missing something but after tried the sample app, reading the documentation, and tested it in my app I cannot figure out how to set the content message that will...

Google play services | Cloud saved game | Fetch friends game state

unity3d,google-play-services,google-play-games,google-cloud-save
I am working on unity3d based Farm game using Google play services Cloud saved game. I need to fetch my friends game state to visit their farms. Is it possible using Google play game services?? ...

App Invites for Android: Message failed to send with missing container client ID

android,google-play-services
I am trying to integrate new Google Play Services api "App Invites for Android". I followed all the steps as per guide and generated the gogole-services.json file. But when I send an invite to a selected friend via SMS or Email, I get the same error everytime. Message failed to...

Android Studio USB Debugging Google Play Services Out Of Date

android,android-studio,google-play-services,usb-debugging
I'm using Android Studio 1.2 and I'm trying to run an app (that requires Google Maps) using USB Debugging. My phone is running Android 4.1.2 (API 16 - Sony Xperia T). On Android Studio I was able to run successfully the app using Android 5.0.1 (API 21). However, using USB...

Unable to setup Google Play Services

android,eclipse,google-play-services,android-mapview,android-maps-v2
I have been stuck over a day to use the Google Play Service. This is a very bad procedure created by Google. Why it is that difficult?? I want to use Google Play Service in order to develop some apps which depends on the Map. I have been tried everything...

ActivityRecognitionIntentService onHandleIntent only occasionally fires

android,google-play-services,activity-recognition
I am trying to get Activity Recognition updates for my app but it only seems to be partially working. First I thought it wasn't working but every once in a while the debug log shows an activity type which means the ActivityRecognitionIntentService onHandleIntent() was hit but it never makes it...

Android Studio: cannot upgrade google play services

android,google-maps,android-studio,google-play-services,google-play-developer-api
I have tried download the latest version on the sdk manager, but is still not working. I have seen other posts telling users to enter the following... compile 'com.google.android.gms:play-services:4.2.+' I do not understand where to enter it. I tried in the terminal feature of the android studio but it gives...

Cannot resolve symbol 'LocationClient' in Android Studio

android,android-studio,google-play-services,location-client,location-services
I'm getting this error developing an application in Android Studio that I would like to use location services in.I know this question has been asked before but I beleive the previous was with an app developed in Eclipse. I beleive this may be an issue with the setup of Google...

Android Studio would not show map in app

android,facebook,google-maps,android-studio,google-play-services
Hi I have an app that displays a map. All is good but I want to debug it using the emulator but on the emulator I get this error. "Google play services not installed on your device!" OK I dig around and I found it had to do something with...

get current location with runOnUiThread

java,android,geolocation,google-play-services
I am a learner in android. I am trying to get weather on current location. There is a "Refresh" button in my app to update the UI with latest weather details. When the app loads, it shows weather of 0.0, 0.0 latitude and longitude. When I click on "Refresh" button,...

Google maps api asking for permissions even though I already specified them

android,google-maps,google-play-services
The application tag of my manifest: <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme"> <activity android:name=".MapActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <meta-data android:name="com.google.android.gms.version"...

End a multiplayer game on finishMatch

android,google-play,google-play-services,google-play-games
I am developing a turn based multiplayer game in Android using Google Play Game Services. I have successfully ended the game when the user clicks the Finish Button: Games.TurnBasedMultiplayer.finishMatch(mGoogleApiClient, mMatch.getMatchId(), mMatch.getData(), creatorResult, opponentResult) .setResultCallback(new ResultCallback<TurnBasedMultiplayer.UpdateMatchResult>() { @Override public void onResult(TurnBasedMultiplayer.UpdateMatchResult result) { processResult(result); } }); The current player's game gets...

Android native extension - Could not find class 'com.google.android.gms.ads.AdView'

admob,google-play-services
Trying to make an android native extension (ane) with an AdMob banner for my AIR project. Problem is, when i run the final apk on my phone, Eclipse DDMS gives me an error: Could not find class 'com.google.android.gms.ads.AdView' referenced from method blah blah And the AdMob banner does not appear....

All libraries are showing error after updating SDK version to 24.3 in Android

android,svn,google-play-services,subclipse,android-sdk-tools
All libraries ware fine before updating the sdk. Just now I update the sdk through sdk manager and everything is out of control now. All libraries are showing only one cross mark on its folder and no error inside. I have taken some images to show something here. v7 lib:...

“Select ”Import from existing model- Gradle“ ” - Whaaa?

android,android-studio,google-play-services
I was reading the instructions on how to run a Google Play services sample in Android Studio (Particularly ButtonClicker2000), and saw that step 5 says: "Select "Import from existing model - Gradle"" what does Google mean by this? Where can I find this element to select? Thanks in advance! Here...

Google Services After Updating

java,android,google-play-services
Today I was trying to implement an in-app purchase to my app. I was trying to follow the tutorial from google and it was going fine. In the meantime I was updating some of the SDK's. After all these something somewhere went wrong and all of my Java files gave...

Android Activity Recognition updates are not regular

android,google-play-services,activity-recognition
Related to this question. I am experiencing that Activity Recognition updates are not delivered on a regular basis. The power saving mode on my phone is disabled and I set the fastest possible detection interval (0), yet sometimes intents are not delivered for more than 10-20 seconds. It seems the...

Unable to execute dex: GC overhead limit exceeded, Google Play Services. Freeze when launching

java,android,eclipse,osx,google-play-services
I have encountered this problem after trying to implement Google Play Services in my application. I figured I did not give enough "power" to eclipse so I changed my eclipse.ini file. However it does not help even though I increase the value. My eclipse.ini: -startup ../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar --launcher.library ../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20140116-2212 -product org.eclipse.epp.package.standard.product...

Detecting out of date ITurnBasedMatch on Android

android,google-play-services,multiplayer,google-play-games
I am writing a Turn-Based multiplayer Android game using the Google Play API. Thinking ahead to future versions of the app, I realize I may need to change the format of my Byte Data Blob that gets passed around by the ITurnBasedMatch object. And if I change the blob format,...

how to implement multiple(for different game levels) leaderboard in android libgdx game?

android,libgdx,google-play-services
I am having 3 different game levels.So there would be three different high scores that need to be posted for Leaderboard on google play services. I dont understand this. what I did is that I have created a method public void submitScoreGPGS(int score); { Games.Leaderboards.submitScore(gameHelper.getApiClient(),"id", score); } public void getLeaderboardGPGS()...

Google old GCM vs. Google New GoogleCloudMessaging

android,android-gcm,google-play-services,google-cloud-messaging
i'm developing a news application and i'm confused between using the old GCM and the new GoogleCloudMessaging, they said GCM is deprecated, but it runs well when you get the gcm.jar and compile it in your app. So my question: is it safe to use the old deprecated GCM method...

Prevent starting GcmTaskService twice

android,google-play-services
I have created a very simple service that updates the user location on the Server: public class LocationSchedulerService extends GcmTaskService { @Override public int onRunTask(TaskParams taskParams) { // Update to server stuff return GcmNetworkManager.RESULT_SUCCESS; } } I created an simple BootBroadcastReceiver to start the service when the device boots: PeriodicTask...

Problems implementing the new GCM Client for Android

java,android,eclipse,android-gcm,google-play-services
I'm trying to implement the new GCM Client on Android following the guidelines from Google (https://developers.google.com/cloud-messaging/android/client). I'm receiving slightly different errors for two different devices. I noticed that I receive NoSuchMethodError for method getNoBackupFilesDir for both the devices. This is the logcat for an Android 4.2.2: 06-08 09:01:09.920: I/dalvikvm(9138): Could...

Proguarding Google Play Services 7.+ results in com.google.android.gms.internal.zzig: can't find referenced method 'boolean isAttachedToWindow()'

android,google-play-services,proguard,android-proguard
I have an app that is close to the 65K method count limit. I'm currently using Proguard without obfuscation # This is a configuration (rules) file for ProGuard. -dontobfuscate -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers # Dex does not like code run through the ProGuard optimize and preverify steps # (and performs some...

Adding google_play_services_lib to my android app makes it 5 Mega larger

android,eclipse,apk,google-play-services
This is something that didn't happen to me in the previous project I did (this is only my second project). After adding Google Play Services via Properties -> android -> add -> google-play-services_lib the apk size grew by 5 Megabit! Maybe it's important to mention that I work with eclipse,...

Add a marker to a dynamic Google Map

android,google-maps,google-play-services,marker,supportmapfragment
I am develoeping an app that shows a map with specified LatLng values. The map fragment is dynamic (Not R.id.map) When i'm trying to add a marker to the specified location (That i'm getting from Google Places API JSON request) i'm getting a null pointer exepction. this is the code:...

Google In-App Product Currency Change

in-app-purchase,google-play,google-play-services,in-app-billing,in-app
Guys I have a US Google developer account. Now I want to add in-app products in that account. While setting the price of the product is it possible to set the currency other than US dollars ?like in INR (Indian rupees). I can see its showing the current conversion rate...

android google map API key error

java,android,google-maps,google-play-services,google-maps-api-2
I just started the android google map . I download this example and change the API key and run it but it's give error . here is log cat output : thank you for help . 02-23 18:02:29.404: E/AndroidRuntime(1696): FATAL EXCEPTION: main 02-23 18:02:29.404: E/AndroidRuntime(1696): Process: info.androidhive.googlemapsv2, PID: 1696 02-23...

Instance ID in iOS?

ios,swift,google-play-services
Which library should be integrated in my project in order to use the Instance ID API in my iOS/Swift app? This page about Instance ID API shows how to implement such API, but gives no indication of the library to import.......

Android studio can not resolve com.google.android.gms.location.places.AutocompleteFilter

android,android-studio,google-play-services,google-places-api
I am trying to implement a autocomplete places search following this article. http://www.truiton.com/2015/04/android-places-api-autocomplete-getplacebyid/ I have followed all steps, and also added proper dependencies in my build.gradle file. dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.google.android.gms:play-services:6.5.87' } Also here are the meta data section in my manifest. <meta-data...

How does Google Play Service install applications on the background without user interaction

android,google-play,google-play-services
When we use the Google Play Store to install applications, the application will be installed automatically without any Package Installer notification. It does not even require any user interaction when updating applications. It won't do so when we use the F-Droid or others. We developers can bypass the Package Installer...

How to install Google Play Service 7.3.0 or above in Android Emulator?

android,android-studio,google-play-services
I am integrating Google Plus Sign In for my app. The only thing is I have everything updated in Android SDK but still when I run my app in Android Emulator, I get a error in Android Studio saying "Google Play services out of date. Requires 7327000 but found 6774480"....

Bypassing install permission programmatically for enterprise apps from third-party sources

android,google-play,apk,google-play-services,android-install-apk
Several years ago, Android allowed you to set a permission that lets you install apps from a third party location other than Google's own app store Google Play. Eventually they deprecated that permission and only allowed hardware manufacturers to set that permission. I haven't checked since then whether that is...

Set the current place on google place api

java,android,google-maps,google-play-services,google-places-api
I'm trying to search places (like restaurants or hotels) around a Latlng using google place api's. Is there any possibility to change the result of Places.PlaceDetectionApi getCurrentPlace(mGoogleApiClient, pf); and set other coordinate. My code is: mGoogleApiClient = new GoogleApiClient .Builder(this) .addApi(Places.GEO_DATA_API) .addApi(Places.PLACE_DETECTION_API) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build(); ArrayList<String> restrictToRestaurants = new ArrayList<>();...

Issue with Google Fit API on Android Wear

android,google-play-services,android-wear
I'm trying to implement the Google Fit API into my android wearable application. I have followed the GoogleFitAPI online steps with registering for an OAuth ID. When trying to connect, I get an invalid account error. Do I need to enable the free trial within the developer api console, or...

Why are permissions being automatically added to my AndroidManifest when including Google Play Services library

android,admob,android-manifest,google-play-services,android-permissions
I noticed that the following permissions were automatically added when i use the following in my build.gradle file compile 'com.google.android.gms:play-services:7.5.0' This did not occur with the earlier versions of the play-services. does anyone have a solution to remove these unwanted permissions? I am only using the ads function (INTERNET and...

Adding Google Play Services library to Qt project

java,android,qt,google-play-services
I'm creating Android application in Qt and I have to use Qt Android Extras to communicate with java code. In my java file, I'm using Google Play Services lib. I've already done everything that is described here. Build passes, but when i try to use something from this library, wild...

Application Upgrade to newer version and remove old version support

android,google-play-services
I have an android application which runs android version 2.3 or above . Now I am planing to upgrade to newer version and use material design. Also update minimum support version to 4.0.3 My question is that if i update the minimum support version to 4.0.3 then what happens to...

Extending broadcastReceiver to track INSTALL_REFERRER with multiple services

android,google-analytics,google-play-services,install-referrer
After update google play services to 7.0.3 my custom INSTALL_REFERRER braodcast receiver got broken. I used CampaignTrackingService (which got the update also) to forward the intent to google analytics. in AndroidManifest.xml <receiver android:name="myapp.analytics.installReferrer.InstallReferrerBroadcastReceiver" android:exported="true"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver> And my Custom BroadCastReceiver (and here is the problem): public...

Get location (coordinates) periodically without dramatically increase battery consumption

android,google-play-services,locationmanager,android-location,battery-saver
I'm developing an Android application; this App needs to send periodically (every 10 minutes) the current position (coordenates) to a web service. But ... I'm a little confused about the more correct way (and friendlier to the device battery) to do that. I read this answer and her method _getLocation()...

Team member deleted from the google developer account

android,google-play,google-play-services,google-account
I am license owner in google developer account.I have invited some team members to join this developer program. One of the team member has admin role permission and he published an android app on play store on behalf of our group. What would happen if i delete that user from...

(Android) How to retrieve current location using Google Play Services

java,android,location,google-play-services
I'm fairly new to Android app development and I'm currently looking into retrieving the user's current location (coordinates & city) using Google Play Services. As of now, I fail to find any clear step-by-step tutorial on doing so. Any advise or guidance would be greatly appreciated!