Google Drive Android API से माइग्रेट करना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Drive Android API, 6 दिसंबर, 2018 से काम नहीं कर रहा है. यह 1 फ़रवरी, 2023 से पूरी तरह बंद हो जाएगा.
टाइमलाइन
तारीख |
Drive Android API की स्थिति |
6 दिसंबर, 2018 |
सार्वजनिक तौर पर बताया गया हो कि सुविधा बंद की जा रही है. मौजूदा क्लाइंट, एपीआई को सामान्य तरीके से ऐक्सेस कर पाएंगे. हालांकि, उन्हें तुरंत माइग्रेशन शुरू कर देना चाहिए. नए क्लाइंट को एपीआई का इस्तेमाल नहीं करना चाहिए.
|
21 अक्टूबर, 2019 |
Drive Android API को Google Play services SDK के डिस्ट्रिब्यूशन से हटा दिया गया है. Drive Android API की डिपेंडेंसी हटाने तक, ऐप्लिकेशन नहीं बनाए जा सकेंगे. हालांकि, मौजूदा बिल्ड पर इसका कोई असर नहीं पड़ेगा. Drive Android API का सार्वजनिक दस्तावेज़ अब उपलब्ध नहीं होगा.
|
3 मार्च, 2022 |
Drive Android API अब काम नहीं करता. साथ ही, सभी एपीआई कॉल काम नहीं करते. क्लाइंट को इस तारीख तक माइग्रेट करना होगा.
|
1 फ़रवरी, 2023 |
Drive Android API पूरी तरह से बंद हो जाएगा. साथ ही, कनेक्ट करने की सभी कोशिशें नाकाम हो जाएंगी.
|
Drive REST API का इस्तेमाल करना
Drive REST API में वे सभी सुविधाएं हैं जो Drive Android API में हैं. इनमें ये सुविधाएं शामिल हैं:
- Drive की तरह ही, शेयर करने और साथ मिलकर काम करने की सुविधा. आपके पास, उपयोगकर्ताओं को उनकी ज़रूरत के हिसाब से अनुमतियां मैनेज करने या शेयर करने का डायलॉग दिखाने का विकल्प होता है. REST API की मदद से, फ़ाइलों पर टिप्पणी भी की जा सकती है. इससे आपका ऐप्लिकेशन, किसी फ़ाइल के बारे में हो रही बातचीत में हिस्सा ले सकता है.
files.list
का इस्तेमाल करके फ़ाइलें खोजें. इसके लिए, पारंपरिक इंडेक्सिंग या अपने हिसाब से बनाए गए, इंडेक्स किए जा सकने वाले टेक्स्ट का इस्तेमाल करें.
- बदलावों के कलेक्शन की मदद से, फ़ाइलों में हुए बदलावों का पता लगाएं. साथ ही, शेयर की गई ड्राइव की मदद से, उपयोगकर्ता के साथ शेयर की गई किसी भी फ़ाइल में हुए बदलावों का पता लगाएं.
- Google दस्तावेज़ को एक्सपोर्ट और बदलें, ताकि आपका ऐप्लिकेशन आसानी से किसी उपयोगकर्ता का दस्तावेज़ खोल सके.
क्लाइंट को माइग्रेट करने की प्रोसेस को आसान बनाने के लिए, एक सैंपल ऐप्लिकेशन उपलब्ध कराया गया है. इसमें ऊपर बताए गए हर सुझाव को दिखाया गया है. इसमें यह भी बताया गया है कि REST API का इस्तेमाल करके, किसी उपयोगकर्ता की Drive फ़ाइलें कैसे बनाई जाती हैं, उनमें बदलाव कैसे किया जाता है, और उनके लिए क्वेरी कैसे की जाती है. अगर आपको कोई समस्या आती है, तो StackOverflow पर google-drive-api टैग देखें.
माइग्रेशन
Drive Android API अब काम नहीं करता है. साथ ही, सभी एपीआई कॉल भी काम नहीं करते हैं. इसलिए, पक्का करें कि आपका ऐप्लिकेशन अब एपीआई को कॉल न कर रहा हो. इसके लिए, एपीआई को शुरू करने वाला कोड हटाएं: addApi(Drive.API)
.
अगर आपने Drive Android API से माइग्रेट नहीं किया है और आपका ऐप्लिकेशन एपीआई को कॉल करने की कोशिश करता है, तो गड़बड़ी का यह मैसेज दिखेगा:
com.google.android.gms.common.api.ApiException: 17: API: Drive.API is not
available on this device. Connection failed with:
ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-04 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-04 (UTC) को अपडेट किया गया."],[],[],null,["# Migrate from the Google Drive Android API\n\n**The Drive Android API is deprecated as of December 6, 2018 and will be fully\nturned down on February 1, 2023**.\n\nTimeline\n--------\n\n| Date | Drive Android API status |\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| December 6, 2018 | Deprecation is [publicly announced](https://cloud.google.com/blog/products/application-development/sync-google-drive-files-to-apps-using-the-drive-rest-api-bidding-farewell-to-the-drive-android-api). Existing clients will be able to access the API normally, but should immediately commence with migration efforts. New clients must not use the API. |\n| October 21, 2019 | The Drive Android API is removed from the Google Play Services SDK distribution. Apps will be unable to build until removing the Drive Android API dependency, but existing builds will be unaffected. The Drive Android API public documentation will no longer be available. |\n| March 3, 2022 | The Drive Android API is deprecated and all API calls are non-operational. Clients must migrate by this date. |\n| February 1, 2023 | The Drive Android API will be fully turned down and all connection attempts will be unsuccessful. |\n\nUse the Drive REST API\n----------------------\n\nThe Drive REST API offers the same functionality as the Drive Android API,\nincluding ways to:\n\n- Share and collaborate as you expect from Drive. You can [manage permissions or prompt the Share dialog](/workspace/drive/api/guides/manage-sharing) to users as needed. The REST API also allows for commenting on files, allowing your app to interact with the conversation around a file.\n- Search for files using [`files.list`](/workspace/drive/api/v3/reference/files/list), based on traditional indexing or [your own customized, indexable text](/workspace/drive/api/guides/file).\n- Detect changes to files through the [Changes collection](/workspace/drive/api/v3/reference/changes) and to any shared with the user through [shared drives](/workspace/drive/api/guides/enable-shareddrives).\n- Export and convert Google Docs so that your app can easily [open a user's document](/workspace/drive/api/guides/integrate-open#specific).\n\nTo ease client migration efforts, a\n[sample app](https://github.com/googleworkspace/android-samples/tree/master/drive/deprecation) is provided which\ndemonstrates each of the proposed replacements above. It also shows how to\ncreate, modify, and query for a user's Drive files using the REST API. If you\nhave any issues, check out the\n[google-drive-api](https://stackoverflow.com/questions/tagged/google-drive-api?tab=Newest)\ntag on StackOverflow.\n\nMigration\n---------\n\nSince the Drive Android API is deprecated, and all API calls are\nnon-operational, make sure your app is no longer calling the API. To do this,\nremove the code that initializes the API: `addApi(Drive.API)`.\n\nIf you don't migrate from the Drive Android API, and your app attempts to call\nthe API, the following error message is returned:\n\n`com.google.android.gms.common.api.ApiException: 17: API: Drive.API is not\navailable on this device. Connection failed with:\nConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}`"]]