android-googleapiclient

Android - GoogleApiClient ActivityRecognitionIntentService is never called

佐手、 提交于 2019-12-24 22:13:07
问题 I need to detect user dynamics in my application. I started by using GooglePlayServicesClient which till three months ago worked perfectly, Then it stopped working on my HTC one device (although it was still working on three different devices I've checked). I know it is now replaced by GoogleApiClient, so I thought this was my problem, but it keeps not working even after changing to the new API. The problem is that the intent given to ActivityRecognition.ActivityRecognitionApi

SupportMapFragment.getMap() on a null object reference

▼魔方 西西 提交于 2019-12-23 08:56:31
问题 After trying just about everything, I cannot seem to getmap without pulling a null object reference. I am trying to inflate a google mapfragment into a fragment, however each time I do so I always keep a getmap null object . Here is my code I'm desperate for any help at this point, I've tried just about everything. Error java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.maps.GoogleMap com.google.android.gms.maps.SupportMapFragment.getMap()' on a null

GoogleApiClient onConnected not being called, using in a Service

大城市里の小女人 提交于 2019-12-23 08:01:12
问题 Was working when I was using GoogleApiClient in an Activity but moved it to a Service and the onConnected is not being called. public class StepsMonitoringService extends Service implements GoogleApiClient.ConnectionCallbacks { private GoogleApiClient mClient; @Override public IBinder onBind(Intent arg0) { return null; } @Override public void onCreate() { super.onCreate(); mClient = new GoogleApiClient.Builder(this).addApi(Fitness.HISTORY_API) .addScope(new Scope(Scopes.FITNESS_ACTIVITY_READ)

Check whether the user is already logged in using Auth.GoogleSignInApi?

时间秒杀一切 提交于 2019-12-22 05:13:59
问题 I fount that in order to sign in the user I have to use this code: Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient); startActivityForResult(signInIntent, RC_SIGN_IN); to signout new ResultCallback<Status>() { @Override public void onResult(Status status) { disconnect(); } }); But when the user relaunch the app and he is already logged in (and no sign out before) is it possible to detect this 'currently logged in' state? Obviously, it is possible to save 'logged in'

GoogleApiClient onConnectionFailed with statusCode=SIGN_IN_REQUIRED

扶醉桌前 提交于 2019-12-21 02:34:46
问题 I'm trying to connect my app to Google play service to access Google Drive but It showing me connection failed with statusCode SIGN_IN_REQUIRED. But it seems to behave like that just 3 days ago. I am also checked developer console of google. They may have changed something in the API which i am unable to figure out. Your help will be welcome. My Code: /** * Create a new file and save it to Drive. */ private void saveFileToDrive(final byte[] data) { // Start by creating a new contents, and

Android : Google Sign In GoogleApiClient.connect()

南笙酒味 提交于 2019-12-20 07:26:41
问题 the following code is copied from www.developers.google.com i want to implement Google Sign In functionality, but unable to do so. when i click on SignIn Button it asks for permission and does some searching then Nothing happens, if i call GoogleApiClient.isConnected() it returns false. i have imported BaseGameUtils and also added line: compile project(':BaseGameUtils') app_id is generated using sha1 through: keytool -exportcert -alias androiddebugkey -keystore C:\Users\usman\.android\debug

Why My android app crashes as soon as I open it in device 4.4.3 but not in device 5.0 or above

不想你离开。 提交于 2019-12-13 08:59:42
问题 I have used facebook sdk for log in with facebook and also google map for user current position. It run well in android 5.o or above but crashes in android 4.4.3. I have used following configuration. android { compileSdkVersion 24 buildToolsVersion "24.0.0" defaultConfig { applicationId "com.example.nuevo.getsocial" minSdkVersion 15 targetSdkVersion 24 versionCode 1 versionName "1.0" multiDexEnabled true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile(

Android google Sign In always shows handleSignInResult:false

馋奶兔 提交于 2019-12-12 19:58:13
问题 I was creating a sample google sign in app and i tried the code from google samples. Im stuck at , when i press sign in, it prompts to select accounts, but after selecting my account,nothing happens.. Log shows handleSignInResult:false Note:- Sometimes logcat shows the below error E/SignInActivity: handleSignInResult:false E/SignInActivity: handleSignInResult:false V/Activity: calling onResume for activity: W/art: Suspending all threads took: 40.222ms E/WindowManager: android.view

How to receive location updates every 5 minutes using the FusedLocation API

限于喜欢 提交于 2019-12-12 07:38:54
问题 I am currently working on an app that has to check the user's location every five minutes and send the coordinates to a server. I decided to go with the FusedLocation API in Google Play Services instead of the plain old LocationManager API, mainly because I noticed the LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY priority level, which claims to offer a 100-meter accuracy level with reasonable battery usage, which is EXACTLY what I need. In my case, I have an Activity whose inheritance

Google map hang in slow speed internet connection, Android

自古美人都是妖i 提交于 2019-12-11 13:58:47
问题 In one of my activity I am showing google map in fragment. It's working fine with 3g or high speed internet connection. But in 2g or very slow internet connection it's hang my mobile, And after some time I get 'not responding' message. Is there any way by which i can handle this situation? Here is my working code:- public class MapLoader extends FragmentActivity implements View.OnClickListener { // GUI Widget TextView lblNumber; Button btnCall; String number; GoogleMap googleMap; Bitmap