google-play-services

How can I request “High Accuracy” Location with the new SettingsApi on GooglePlayServices?

浪子不回头ぞ 提交于 2019-12-13 07:04:57
问题 I'm trying to use the new SettingsApi (https://developer.android.com/reference/com/google/android/gms/location/SettingsApi.html) from GooglePlayServices to detect the need for changes on users settings without exiting the app. My problem is that the dialog appears, but it only says it will require the Wifi and internet to access location. I also want it to request the GPS (this, is the High Accuracy mode or the device only mode). My code for getting the LocationSettingsRequest: public static

Android app showing in Google Play for Phone but not for Google Play for Tablets

梦想的初衷 提交于 2019-12-13 06:52:43
问题 The app is showing for Phones but not for Google Play for Tablets. Here is the Manifest code. package="com.samplecode.app" android:versionCode="1" android:versionName="1.1" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="21" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> 回答1: Add 7" and 10" screenshots to your

Do I need support library v4 for google play services (ads)

≯℡__Kan透↙ 提交于 2019-12-13 06:50:54
问题 I want to use the ads system by google play services (Admob). I know I need to bundle the game services library. But do I need to bundle the support libraryV4 if I am targeting Appi 8 and above? Thank you 回答1: It used to be the case that the support library wasn't necessary, but according to this question the situation has changed with the release of Play Services 6.5. As of Google Play Services 6.5, the play-services-base library (a dependency for all Google Play Services) depends on the

Android Game Leader Board: Where to extends BaseGameActivity?

无人久伴 提交于 2019-12-13 05:57:46
问题 My activity_main_layout has 2 buttons: //Start game on click <Button android:id="@+id/btnStart"/> //If not sign in Google Game play Service //Sign in then show leader board on click <Button android:id="@+id/btnLeader board" /> Click on btnStart to begin playing game: btnStart.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // Perform action on click Intent intent = new Intent(MainActivity.this, game_play.class); startActivity(intent); finish(); } }); As you can

Android Wear: CapabilityApi times out, doesn't return capabilities

无人久伴 提交于 2019-12-13 05:55:59
问题 I'm trying to use a new CapabilityApi introduced in play services 7.3 to learn about the capabilities of my android wear device(Asus Zenwatch). I've checked out this question and can confirm that Wearable.NodeApi.getConnectedNodes(...) approach does work to get a list of connected nodes and I do see the watch in the list. This is the code I'm running in an app on my phone to query capabilities of connected wear devices: GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(context)

How to implement google maps with best possible backward compatibility in an android?

前提是你 提交于 2019-12-13 05:51:16
问题 I'm building a simple android app that uses Google maps api to display map and navigation. As you may know Google maps need Play services Library to run on client android phone. i want my app to run in much older android OS's(14,15,..) Problems: 1- Clients need to install or activate Play services app. 2- then Clients have to update play services app to the latest version to use my app with google maps. 3- how to make app to run in older androids? just by specifying min sdk ? so in order to

Android Studio USB Debugging Google Play Services Out Of Date

爷,独闯天下 提交于 2019-12-13 05:48:40
问题 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 Debugging I get this error "Google Play Services Out Of Date, Requires 713.... but found 65...." (dots represent some numbers). My device has the latest Google Play Version. In Android Studio under Project Structure, I've

The meta data tag in AndroidManifest.xml does not have the right value

时间秒杀一切 提交于 2019-12-13 04:55:52
问题 I get this error when trying to run the app: Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 7095000 but found 6587000. You must have the following declaration within the application element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> But that line of code is in my manifest sorry still noob at android <?xml version="1.0" encoding="utf-8

Android ActivityRecognitionApi requestActivityUpdates are too frequent. How can I throttle them?

好久不见. 提交于 2019-12-13 04:50:43
问题 I'm trying to change how often I request location updates from the FusedLocationProviderAPI based on the activity level of the user. Android provides an ActivityRecognitionApi which would be great, but unfortunately: "Activities may be received more frequently than the detectionIntervalMillis parameter if another application has also requested activity updates at a faster rate." (From: https://developer.android.com/reference/com/google/android/gms/location/ActivityRecognitionApi.html) I'd

Error: more than one library with package name 'com.google.android.gms' (v. 8.1.0)

末鹿安然 提交于 2019-12-13 04:46:45
问题 I just tried to update play-services-analytics from 7.5.0 to 8.1.0 and just changed the version number in gradle. And what I got: > Error: more than one library with package name 'com.google.android.gms' You can temporarily disable this error with android.enforceUniquePackageName=false However, this is temporary and will be enforced in 1.0 rebuild and clean don't help. I also tried to delete the folder with this library, no effect. If I change the number to 7.8.0 (or back to 7.5.0 ) it also