ড্রাইভার SDK শুরু করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
ড্রাইভার SDK ব্যবহার করার আগে, আপনাকে প্রথমে এই ধাপগুলি অনুসরণ করে নেভিগেশন SDK এবং ড্রাইভার SDK শুরু করতে হবে:
NavigationApi
থেকে একটি Navigator
অবজেক্ট পান।
জাভা
NavigationApi.getNavigator(
this, // Activity
new NavigationApi.NavigatorListener() {
@Override
public void onNavigatorReady(Navigator navigator) {
// Keep a reference to the Navigator (used to configure and start nav)
this.navigator = navigator;
}
}
);
কোটলিন
NavigationApi.getNavigator(
this, // Activity
object : NavigatorListener() {
override fun onNavigatorReady(navigator: Navigator) {
// Keep a reference to the Navigator (used to configure and start nav)
this@myActivity.navigator = navigator
}
},
)
একটি DriverContext
অবজেক্ট তৈরি করুন, প্রয়োজনীয় ক্ষেত্রগুলি পূরণ করুন। DriverContext
অবজেক্ট আরম্ভ করার জন্য, আপনাকে অবশ্যই আপনার Google ক্লাউড প্রকল্পের প্রোজেক্ট আইডি providerId
হিসেবে প্রবেশ করতে হবে। Google ক্লাউড প্রজেক্ট সেট আপ করার বিষয়ে তথ্যের জন্য, আপনার ফ্লিট ইঞ্জিন প্রকল্প তৈরি করুন দেখুন।
জাভা
DriverContext driverContext = DriverContext.builder(application)
.setProviderId(providerId)
.setVehicleId(vehicleId)
.setAuthTokenFactory(authTokenFactory)
.setNavigator(navigator)
.setRoadSnappedLocationProvider(
NavigationApi.getRoadSnappedLocationProvider(application))
.build();
কোটলিন
val driverContext =
DriverContext.builder(application)
.setProviderId(providerId)
.setVehicleId(vehicleId)
.setAuthTokenFactory(authTokenFactory)
.setNavigator(navigator)
.setRoadSnappedLocationProvider(NavigationApi.getRoadSnappedLocationProvider(application))
.build()
*DriverApi
শুরু করতে DriverContext
অবজেক্ট ব্যবহার করুন।
DeliveryDriverApi driverApi = DeliveryDriverApi.createInstance(driverContext);
API অবজেক্ট থেকে DeliveryVehicleReporter
পান। ( DeliveryVehicleReporter
NavigationVehicleReporter
প্রসারিত করেছে।)
DeliveryVehicleReporter vehicleReporter = driverApi.getDeliveryVehicleReporter();
SSL/TLS-এ নোট
অভ্যন্তরীণভাবে, ফ্লিট ইঞ্জিন পরিষেবার সাথে নিরাপদে যোগাযোগ করতে ড্রাইভার SDK বাস্তবায়ন SSL/TLS ব্যবহার করে। অ্যান্ড্রয়েড এপিআই সংস্করণ 23 বা তার আগের সার্ভারের সাথে যোগাযোগ করার জন্য SecurityProvider
প্যাচের প্রয়োজন হতে পারে। Android এ SSL এর সাথে কাজ করার বিষয়ে আরও তথ্যের জন্য, নিরাপত্তা GMS প্রদানকারী দেখুন। নিবন্ধটিতে নিরাপত্তা প্রদানকারীকে প্যাচ করার জন্য কোড নমুনাও রয়েছে।
এরপর কি
যানবাহন প্রস্তুত করুন
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-09-03 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-09-03 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eBefore using the Driver SDK, you must initialize both the Navigation SDK and the Driver SDK.\u003c/p\u003e\n"],["\u003cp\u003eTo begin, obtain a \u003ccode\u003eNavigator\u003c/code\u003e object from the \u003ccode\u003eNavigationApi\u003c/code\u003e and create a \u003ccode\u003eDriverContext\u003c/code\u003e object, ensuring your Google Cloud Project ID is included.\u003c/p\u003e\n"],["\u003cp\u003eInitialize the \u003ccode\u003e*DriverApi\u003c/code\u003e using the \u003ccode\u003eDriverContext\u003c/code\u003e, and obtain the \u003ccode\u003eDeliveryVehicleReporter\u003c/code\u003e from it.\u003c/p\u003e\n"],["\u003cp\u003eNote that the Driver SDK uses SSL/TLS for secure communication, and you might require a \u003ccode\u003eSecurityProvider\u003c/code\u003e patch for older Android versions.\u003c/p\u003e\n"]]],[],null,["# Initialize the Driver SDK\n\nBefore using the Driver SDK, you must first initialize\nthe Navigation SDK and Driver SDK following these steps:\n\n1. Obtain a `Navigator` object from the `NavigationApi`.\n\n ### Java\n\n NavigationApi.getNavigator(\n this, // Activity\n new NavigationApi.NavigatorListener() {\n @Override\n public void onNavigatorReady(Navigator navigator) {\n // Keep a reference to the Navigator (used to configure and start nav)\n this.navigator = navigator;\n }\n }\n );\n\n ### Kotlin\n\n NavigationApi.getNavigator(\n this, // Activity\n object : NavigatorListener() {\n override fun onNavigatorReady(navigator: Navigator) {\n // Keep a reference to the Navigator (used to configure and start nav)\n this@myActivity.navigator = navigator\n }\n },\n )\n\n2. Create a `DriverContext` object, populating the required fields. To\n initialize the `DriverContext` object, you must enter the **Project ID**\n of your Google Cloud Project as the `providerId`. For information\n on setting up the Google Cloud Project, see\n [Create your Fleet Engine project](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/create-project).\n\n ### Java\n\n DriverContext driverContext = DriverContext.builder(application)\n .setProviderId(providerId)\n .setVehicleId(vehicleId)\n .setAuthTokenFactory(authTokenFactory)\n .setNavigator(navigator)\n .setRoadSnappedLocationProvider(\n NavigationApi.getRoadSnappedLocationProvider(application))\n .build();\n\n ### Kotlin\n\n val driverContext =\n DriverContext.builder(application)\n .setProviderId(providerId)\n .setVehicleId(vehicleId)\n .setAuthTokenFactory(authTokenFactory)\n .setNavigator(navigator)\n .setRoadSnappedLocationProvider(NavigationApi.getRoadSnappedLocationProvider(application))\n .build()\n\n3. Use the `DriverContext` object to initialize the `*DriverApi`.\n\n DeliveryDriverApi driverApi = DeliveryDriverApi.createInstance(driverContext);\n\n4. Obtain the `DeliveryVehicleReporter` from the API object.\n (`DeliveryVehicleReporter` extends `NavigationVehicleReporter`.)\n\n DeliveryVehicleReporter vehicleReporter = driverApi.getDeliveryVehicleReporter();\n\nNotes on SSL/TLS\n----------------\n\nInternally, the Driver SDK implementation uses\nSSL/TLS to communicate securely with the Fleet Engine service. Android API\nversions 23 or\nearlier may require a `SecurityProvider` patch to communicate with the\nserver. For more information about working with SSL in Android, see\n[Security GMS Provider](https://developer.android.com/training/articles/security-gms-provider).\nThe article also contains code samples for patching the security provider.\n\nWhat's next\n-----------\n\n[Get the vehicle ready](/maps/documentation/mobility/driver-sdk/scheduled/android/vehicle-ready)"]]