0

Here is my code that creates a GoogleApiClient instance that connects with the Google Drive service:

mGoogleApiClient = new GoogleApiClient.Builder(this)
            .enableAutoManage(this /* FragmentActivity */, this /* 
                OnConnectionFailedListener */)

            .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
            .addApi(Drive.API)
            .addScope(Drive.SCOPE_FILE)

            .build();

with

implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.google.android.gms:play-services-drive:15.0.0'

I got the warning

'API' is deprecated

How can I prevent this warning ?

C.B.
  • 378
  • 6
  • 19
  • To ignore warnings use this, https://stackoverflow.com/questions/37770754/android-studio-ignore-deprecated – Arshad Apr 27 '18 at 10:33
  • You can use this to fix the warning https://stackoverflow.com/questions/47835372/drive-driveapi-getappfoldermgoogleapiclient-deprecated since its deprecated you need to use these driver functions – Arshad Apr 27 '18 at 10:35
  • Thanks a lot @Arshad, the whole set of API is deprecated, let's do it again the new way – C.B. Apr 30 '18 at 12:24

1 Answers1

0

Global answer of Google Drive API deprecated was given there https://stackoverflow.com/a/47843323/9581467 with appropriate links for documentation

Thanks @Arshad and @noogui

C.B.
  • 378
  • 6
  • 19