google-play-services

Android: Google play games services connection error ( java.lang.IllegalStateException: GoogleApiClient must be connected.)

蹲街弑〆低调 提交于 2019-12-17 16:56:19
问题 I've programmed a game for android, everything works fine, but now I want my app to have Google play Games services (leaderboards and achievements). I used the Google example code to log in to the Google services (no errors in the script), but every time I want to connect with my App in debug mode, I get this error: 6-29 11:48:29.391 23779-23779/com.JFKGames.theepicbutton E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.JFKGames.theepicbutton, PID: 23779 java.lang.RuntimeException:

Separating the Concerns of Activity and GoogleApiClient

送分小仙女□ 提交于 2019-12-17 16:22:47
问题 As usual there is a lot of code in my LoginActivity and I really would prefer to separate the Activity responsibilities from the Google Play sign in concerns. After rewriting this LoginActivity code several times, in many different apps, the easy (and not so elegant) solution was create the Google API client as a Application class object. But, since the connection state affect the UX flow, I never was happy about with this approach. Is there an elegant way of place the GoogleApiClient outside

Android app is crashing due to V/GoogleSignatureVerifier: Signature not valid

天涯浪子 提交于 2019-12-17 15:34:16
问题 I have an android app in which I am using Google Maps API for Android v2. It was working fine in my phone until I upgraded my phone to Marshmallow. After updating my phone once I uninstalled it and again installed it using Android Studio it started having random crash. And every time the error was V/GoogleSignatureVerifier: Signature not valid. Found: MIIDDTCCAfWgAwIBAgIEPmxzXDANBgkqhkiG9w0BAQsFADA3MQswCQYDVQQGEwJVUzEQMA4GA1UE

How to capture barcode values using the new Barcode API in Google Play Services?

南楼画角 提交于 2019-12-17 15:25:23
问题 I've been playing with the sample code from the new Google Barcode API. It overlays a box and the barcode value over the live camera feed of a barcode. (Also faces) I can't tell how to return a barcode value to my app. A) How to tell when a detection event has occurred and B) how to access the ravValue for use in other parts of my app. Can anyone help with this? https://developers.google.com/vision/multi-tracker-tutorial https://github.com/googlesamples/android-vision UPDATE: Building on

Google Vision API Samples: Get the CameraSource to Focus

被刻印的时光 ゝ 提交于 2019-12-17 12:48:32
问题 I have checkout out the latest Google Vision APIs from here: https://github.com/googlesamples/android-vision And I am running it on a LG G2 device with KitKat. The only change I have made is to the minSdkVerion in the Gradle file: ... defaultConfig { applicationId "com.google.android.gms.samples.vision.face.multitracker" minSdkVersion 19 ... However it does not focus. How do I make it focus? 回答1: I modified the CameraSourcePreview (....) constructor to be as follows: public

Google Vision API Samples: Get the CameraSource to Focus

若如初见. 提交于 2019-12-17 12:48:15
问题 I have checkout out the latest Google Vision APIs from here: https://github.com/googlesamples/android-vision And I am running it on a LG G2 device with KitKat. The only change I have made is to the minSdkVerion in the Gradle file: ... defaultConfig { applicationId "com.google.android.gms.samples.vision.face.multitracker" minSdkVersion 19 ... However it does not focus. How do I make it focus? 回答1: I modified the CameraSourcePreview (....) constructor to be as follows: public

Places class is removed from android play services 9.2.0

杀马特。学长 韩版系。学妹 提交于 2019-12-17 11:22:35
问题 Today, I updated to google play services to 9.2.0. I got an error com.google.android.gms.location.places.Places not found. that broke below two lines .addApi(Places.GEO_DATA_API) .addApi(Places.PLACE_DETECTION_API) any leads on where i can find GEO_DATA_API, PLACE_DETECTION_API Thanks in advance. 回答1: In 9.0.2, the 'places' library was inside 'location' library. In 9.2, you need to add 'places' library as dependency: implementation 'com.google.android.gms:play-services-places:9.2.0' 回答2: The

java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions

半世苍凉 提交于 2019-12-17 09:29:55
问题 I was getting this weird error on my google developer console. So i used google Cloud Test Lab to See whats really happening. turns out my app is failing on almost all devices FATAL EXCEPTION: main Process: com.blackcurrantapps.iamin, PID: 16706 java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions at com.google.firebase.FirebaseApp.zzbu(Unknown Source) at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source) at android.content.ContentProvider.attachInfo

Build fails with 'Program type already present: android.arch.core.util.Function'

别等时光非礼了梦想. 提交于 2019-12-17 09:21:15
问题 After updating my Firebase and Play Services dependencies as well as the Play Services Plugin my project fails to build. I've tried multiple Clean-Rebuilds and my app has MultiDex enabled. Reverting to my original dependency versions is also not an option as I added a dependency for cloud functions for which the latest version is incompatible with my other firebase dependencies. I can see the following under Android Issues Program type already present: android.arch.core.util.Function Message

Google Play Services update

大城市里の小女人 提交于 2019-12-17 05:58:13
问题 Yesterday API 19 came out so I upgraded SDK and other (including Google Play Services) now this method: private boolean isGooglePlayInstalled(){ int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); if(status == ConnectionResult.SUCCESS){ return true; }else{ ((Dialog)GooglePlayServicesUtil.getErrorDialog(status, this,10)).show(); } return false; } Throws at line int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); Caused by: java.lang