fork download
  1. public class GoogleApiClientManager {
  2. private static GoogleApiClient mGoogleApiClient;
  3.  
  4. public static GoogleApiClient getInstance(Context context) {
  5. if (mGoogleApiClient == null) {
  6. GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
  7. .requestEmail()
  8. .build();
  9.  
  10. mGoogleApiClient = new GoogleApiClient.Builder(context)
  11. .enableAutoManage(context /* FragmentActivity */,
  12. context /* OnConnectionFailedListener */)
  13. .addConnectionCallbacks(context)
  14. .addApi(LocationServices.API)
  15. .addApi(Places.GEO_DATA_API)
  16. .addApi(Places.PLACE_DETECTION_API)
  17. .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
  18. .build();
  19. mGoogleApiClient.connect();
  20. }
  21. return mGoogleApiClient;
  22. }
  23. }
  24.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class GoogleApiClientManager is public, should be declared in a file named GoogleApiClientManager.java
public class GoogleApiClientManager {
       ^
Main.java:2: error: cannot find symbol
    private static GoogleApiClient mGoogleApiClient;
                   ^
  symbol:   class GoogleApiClient
  location: class GoogleApiClientManager
Main.java:4: error: cannot find symbol
    public static GoogleApiClient getInstance(Context context) {
                                              ^
  symbol:   class Context
  location: class GoogleApiClientManager
Main.java:4: error: cannot find symbol
    public static GoogleApiClient getInstance(Context context) {
                  ^
  symbol:   class GoogleApiClient
  location: class GoogleApiClientManager
Main.java:6: error: cannot find symbol
            GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
            ^
  symbol:   class GoogleSignInOptions
  location: class GoogleApiClientManager
Main.java:6: error: package GoogleSignInOptions does not exist
            GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                                                             ^
Main.java:6: error: cannot find symbol
            GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                                                                      ^
  symbol:   variable GoogleSignInOptions
  location: class GoogleApiClientManager
Main.java:17: error: cannot find symbol
                    .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
                            ^
  symbol:   variable Auth
  location: class GoogleApiClientManager
Main.java:16: error: cannot find symbol
                    .addApi(Places.PLACE_DETECTION_API)
                            ^
  symbol:   variable Places
  location: class GoogleApiClientManager
Main.java:15: error: cannot find symbol
                    .addApi(Places.GEO_DATA_API)
                            ^
  symbol:   variable Places
  location: class GoogleApiClientManager
Main.java:14: error: cannot find symbol
                    .addApi(LocationServices.API)
                            ^
  symbol:   variable LocationServices
  location: class GoogleApiClientManager
Main.java:10: error: package GoogleApiClient does not exist
            mGoogleApiClient = new GoogleApiClient.Builder(context)
                                                  ^
12 errors
stdout
Standard output is empty