android-googleapiclient

Google Drive Android API and Cross Client Authorization

ぃ、小莉子 提交于 2019-12-11 13:27:40
问题 I use Google Drive Android API for letting users upload files from Google Drive on their Android device to my servers. I would now like to change this setup to allow my servers to have direct access to the users Google Drive, using Cross Client Authorization, which means that I have to generate an ID Token using GoogleAuthUtil.getToken . And this is were everything go off the rails. In order to generate this token I need an Account object. Currently, I'm setting up the GoogleApiClient like

Android: Error calling GoogleApiClient.connect()

和自甴很熟 提交于 2019-12-11 10:25:07
问题 When i call method mGoogleApiClient.connect() the app crashes. the following code is copied from www.developers.google.com i want to implement Google Sign In functionality, but unable to do so. i also have edited the build.gradle file. in my Last app i could not add Leaderboards just because of this issue, and now again my next app needs Leaderboards, but this time i can't leave it. import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.GoogleApiClient

How to check if a user has logged in with Google Account

断了今生、忘了曾经 提交于 2019-12-11 06:41:20
问题 I am integrating Facebook and Google authentication in my android application. While launching the application, I want to check if a user is logged on to the app with Facebook or Google authentication. I got success with Facebook using the below code: if (Profile.getCurrentProfile() != null && AccessToken.getCurrentAccessToken() != null){ Intent i = new Intent(Splash.this, SecondActivity.class); startActivity(i); finish(); } But having no success with Google. Also, I searched for many answers

Google API client bug, sending locations

穿精又带淫゛_ 提交于 2019-12-11 03:29:38
问题 I want to create that I send every few seconds a message to GCM. But after some time I want to remove the locationupdates again. For sending the data to the intentservice of gcm I use a pendingintent. Now every time and it happens a lot I get this error : Caused by: java.lang.IllegalStateException: GoogleApiClient is not connected yet. at com.google.android.gms.common.internal.n.a(Unknown Source) at com.google.android.gms.common.api.b.b(Unknown Source) at com.google.android.gms.internal.lt

Google Places AutoComplete + Android Fragment

微笑、不失礼 提交于 2019-12-06 12:49:37
问题 I am a beginner on Android development and I came into a problem which I hope you can help me to solve. I'll keep it simple...i am trying to use Google Places autocompletion in a fragment...the app stops right from the beginning. My guess is the problem is when I use the method rebuildGoogleApiClient() and when I set up the PlaceAutocompleteAdapter after that. Here is my code: ( ActivityMap.java - sets up the GoogleMap and creates the fragment) public class ActivityMap extends

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

♀尐吖头ヾ 提交于 2019-12-05 05:36:33
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' in the settings (shared preferences) of the app but is where any way to detect using google api? Here

How do you provide a GoogleApiClient dependency with Dagger2?

ⅰ亾dé卋堺 提交于 2019-12-05 05:02:59
I've started using Dagger2 to manage dependencies and I'm trying to understand how I can use DI to provide a singleton GoogleApiClient. The motivations for this are: reduce boilerplate code : multiple Activities & Fragments require a GoogleApiClient improve testability : currently these Activities and Fragments are not well tested I want to provide a Singleton GoogleApiClient at the Application scope. How do you handle callbacks? Whether you choose an auto-managed or manually-managed connection , there are some callbacks that must be handled: GoogleApiClient.ConnectionCallbacks (manual only)

Google Places AutoComplete + Android Fragment

无人久伴 提交于 2019-12-04 20:32:43
I am a beginner on Android development and I came into a problem which I hope you can help me to solve. I'll keep it simple...i am trying to use Google Places autocompletion in a fragment...the app stops right from the beginning. My guess is the problem is when I use the method rebuildGoogleApiClient() and when I set up the PlaceAutocompleteAdapter after that. Here is my code: ( ActivityMap.java - sets up the GoogleMap and creates the fragment) public class ActivityMap extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

Android real-time multiplayer: onRoomCreated gets erratic STATUS_NETWORK_ERROR_NO_DATA

[亡魂溺海] 提交于 2019-12-04 06:23:43
问题 Problem: onRoomCreated returns STATUS_NETWORK_ERROR_NO_DATA 5% of the times, for no reason that we can figure out. The game worked well for about 16 months of development (no problem of missing "permissions" in the manifest or the Google Play Console) but starting with Google Play Service 29 (that's "allegedly"... it could be unrelated), this unpredictable behaviour started, and it is blocking any further attempt to create a room (same wrong statusCode over again, even after restarting the

google maps are returning null pointer exception

痞子三分冷 提交于 2019-12-04 06:06:19
问题 when I am trying to show the maps on my fragment it is returning null pointer exception. I have added everything to the manifest each and every permission. I am attaching the fragment file its XML file and the log cat Chatffragment.java public class ChatFragment extends Fragment{ // Google Map private GoogleMap googleMap; public ChatFragment() { // Required empty public constructor } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override