본문 바로가기

카테고리 없음

Google Maps Android Api V2 Key Generator



Apr 10, 2020 On the Credentials page, click Create credentials API key. The API key created dialog displays your newly created API key. The new API key is listed on the Credentials page under API keys. (Remember to restrict the API key before using it in production.) Add the API key to your request. You must include an API key with every Maps. To learn more, see Get Started with Google Maps Platform. To use the Places SDK for Android, you must have an API key. The API key is a unique identifier that is used.

-->

Android'deki Google Haritalar işlevini kullanmak için Google'a bir Haritalar API anahtarı için kaydolmanız gerekir.To use the Google Maps functionality in Android, you need to register for a Maps API key with Google.Bunu yaptığınızda, uygulamalarınızda harita yerine boş bir ızgara görürsünüz.Until you do this, you will just see a blank grid instead of a map in your applications.Bir Google Maps Android API v2 tuşu edinmeniz gerekir - eski Google Maps Android API anahtarı v1 tuşları çalışmaz.You must obtain a Google Maps Android API v2 key - keys from the older Google Maps Android API key v1 will not work.

Haritalar API v2 anahtarı elde etmek aşağıdaki adımları içerir:Obtaining a Maps API v2 key involves the following steps:

  1. Uygulamayı imzalamak için kullanılan keystore'un SHA-1 parmak izini alın.Retrieve the SHA-1 fingerprint of the keystore that is used to sign the application.
  2. Google API konsolunda bir proje oluşturun.Create a project in the Google APIs console.
  3. API anahtarını edinme.Obtaining the API key.

İmza Anahtarı Parmak İzinizi EdinmeObtaining your Signing Key Fingerprint

Google'dan Maps API anahtarı istemek için, uygulamayı imzalamak için kullanılan anahtar mağazasının SHA-1 parmak izini bilmeniz gerekir.To request a Maps API key from Google, you need to know the SHA-1 fingerprint of the keystore that is used to sign the application.Genellikle, bu hata ayıklama keystore için SHA-1 parmak izi belirlemek zorunda olacağı anlamına gelir, ve daha sonra serbest bırakmak için uygulamanızı imzalamak için kullanılan keystore için SHA-1 parmak izi.Typically, this means you will have to determine the SHA-1 fingerprint for the debug keystore, and then the SHA-1 fingerprint for the keystore that is used to sign your application for release.

Varsayılan olarak, Xamarin.Android uygulamasının hata ayıklama sürümlerini imzalamak için kullanılan keystore aşağıdaki konumda bulunabilir:By default the keystore that is used to sign debug versions of a Xamarin.Android application can be found at the following location:

C:Kullanıcılar [USERNAME]AppData YerelXamarin Mono Androiddebug.keystore içinC:Users[USERNAME]AppDataLocalXamarinMono for Androiddebug.keystore

Bir keystore hakkında bilgi JDK komutu keytool çalıştırarak elde edilir.Information about a keystore is obtained by running the keytool command from the JDK.Bu araç genellikle Java bin dizininde bulunur:This tool is typically found in the Java bin directory:

C:ProgramDosyalarıAndroid jdkmicrosoft_dist_openjdk_[VERSION] bin keytool.exeC:Program FilesAndroidjdkmicrosoft_dist_openjdk_[VERSION]binkeytool.exe

Varsayılan olarak, Xamarin.Android uygulamasının hata ayıklama sürümlerini imzalamak için kullanılan keystore aşağıdaki konumda bulunabilir:By default the keystore that is used to sign debug versions of a Xamarin.Android application can be found at the following location:

/Kullanıcılar/[KULLANICI ADI]/.yerel/share/Xamarin/Mono for Android/debug.keystore/Users/[USERNAME]/.local/share/Xamarin/Mono for Android/debug.keystore

Bir keystore hakkında bilgi JDK komutu keytool çalıştırarak elde edilir.Information about a keystore is obtained by running the keytool command from the JDK.Bu araç genellikle Java bin dizininde bulunur:This tool is typically found in the Java bin directory:

/Sistem/Kütüphane/Java/JavaVirtualMachines/[VERSION].jdk/Contents/Home/bin/keytool/System/Library/Java/JavaVirtualMachines/[VERSION].jdk/Contents/Home/bin/keytool

Aşağıdaki komutu kullanarak tuş aracını çalıştırın (yukarıda gösterilen dosya yollarını kullanarak):Run keytool using the following command (using the file paths shown above):

Google Maps Android Api V2 Key Generator

Debug.keystore ÖrneğiDebug.keystore Example

Android Api List

Varsayılan hata ayıklama anahtarı (hata ayıklama için sizin için otomatik olarak oluşturulan) için şu komutu kullanın:For the default debug key (which is automatically created for you for debugging), use this command:

Üretim AnahtarlarıProduction Keys

Google maps api free

Bir uygulamayı Google Play'e dağıtırken, özel bir anahtarla imzalanmasıgerekir.When deploying an app to Google Play, it must be signed with a private key.Özel keytool anahtar ayrıntıları ve ortaya çıkan SHA-1 parmak izi bir üretim Google Maps API anahtarı oluşturmak için kullanılan çalıştırmak gerekir.The keytool will need to be run with the private key details, and the resulting SHA-1 fingerprint used to create a production Google Maps API key.Dağıtımdan önce AndroidManifest.xml dosyasını doğru Google Haritalar API anahtarıyla güncellemeyi unutmayın.Remember to update the AndroidManifest.xml file with the correct Google Maps API key before deployment.

Keytool ÇıktıKeytool Output

Konsol pencerenizde aşağıdaki çıktıgibi bir şey görmeniz gerekir:You should see something like the following output in your console window:

Sha-1 parmak izini (SHA1'densonra listelenen) daha sonra bu kılavuzda kullanacaksınız.You will use the SHA-1 fingerprint (listed after SHA1) later in this guide.

API projesi oluşturmaCreating an API project

Google Maps Android Api V2 Key Generator Reviews

İmza anahtarı mağazasının SHA-1 parmak izini aldıktan sonra, Google API konsolunda yeni bir proje oluşturmanız (veya Google Haritalar Android API v2 hizmetini mevcut bir projeye eklemeniz gerekir).After you have retrieved the SHA-1 fingerprint of the signing keystore, it is necessary to create a new project in the Google APIs console (or add the Google Maps Android API v2 service to an existing project).

  1. Bir tarayıcıda, Google Developers Console API & Hizmetler Panosu'na gidin ve proje seç'itıklatın.In a browser, navigate to the Google Developers Console API & Services Dashboard and click Select a project.Yenİ PROJE'yetıklayarak proje adını tıklatın veya yeni bir proje oluşturun :Click on a project name or create a new one by clicking NEW PROJECT:

  2. Yeni bir proje oluşturduysanız, görüntülenen Yeni Proje iletişim kutusuna proje adını girin.If you created a new project, enter the project name in the New Project dialog that is displayed.Bu iletişim kutusu, proje adınızı temel alan benzersiz bir proje kimliği üretir.This dialog will manufacture a unique project ID that is based on your project name.Ardından, bu örnekte gösterildiği gibi Oluştur düğmesini tıklatın:Next, click the Create button as shown in this example:

  3. Bir dakika kadar sonra, proje oluşturulur ve projenin Pano sayfasına alınır.After a minute or so, the project is created and you are taken to the Dashboard page of the project.Buradan, APIS VE HİzMETLerİ ETKINLEŞTIR'itıklatın:From there, click ENABLE APIS AND SERVICES:

  4. API Kitaplığı sayfasından Android için Haritalar SDK'sınıtıklatın.From the API Library page, click Maps SDK for Android.Bir sonraki sayfada, bu projenin hizmetini açmak için ETKINLEŞTIR'i tıklatın:On the next page, click ENABLE to turn on the service for this project:

Bu noktada API projesi oluşturuldu ve Google Maps Android API v2 eklendi.At this point the API project has been created and Google Maps Android API v2 has been added to it.Ancak, projenizde bu API'yi, bunun için kimlik bilgileri oluşturmadan kullanamazsınız.However, you cannot use this API in your project until you create credentials for it.Sonraki bölümde, bu anahtarı kullanma yetkisine sahip olması için bir API anahtarı nın nasıl oluşturulup bir Xamarin.Android uygulamasının beyaz listeye nasıl verilebildiğini açıklanmaktadır.The next section explains how to create an API key and white-list a Xamarin.Android application so that it is authorized to use this key.

Android Api Pdf

API Anahtarının AlınmasıObtaining the API Key

Google Geliştirici Konsolu API projesi oluşturulduktan sonra bir Android API anahtarı oluşturmak gerekir.After the Google Developer Console API project has been created, it is necessary to create an Android API key.Xamarin.Android uygulamaları, Android Map API v2'ye erişim izni verilmeden önce bir API anahtarına sahip olmalıdır.Xamarin.Android applications must have an API key before they are granted access to Android Map API v2.

  1. Görüntülenen Android için Haritalar SDK sayfasında (önceki adımda ENABLE'ı tıklattıktan sonra), Kimlik Bilgileri sekmesine gidin ve kimlik bilgilerini oluştur düğmesini tıklatın:In the Maps SDK for Android page that is displayed (after clicking ENABLE in the previous step), go to the Credentials tab and click the Create credentials button:

  2. API tuşunatıklayın:Click API key:

  3. Bu düğme tıklandıktan sonra API tuşu oluşturulur.After this button is clicked, the API key is generated.Daha sonra bu anahtarı kısıtlamanız gerekir, böylece bu anahtarla yalnızca uygulamanız API'leri arayabilir.Next it is necessary to restrict this key so that only your app can call APIs with this key.ANAHTARI TIKLAYIN:Click RESTRICT KEY:

  4. AD alanını API Key 1'den, anahtarın ne için kullanıldığını hatırlamanıza yardımcı olacak bir adla değiştirin (XamarinMapsDemoKey bu örnekte kullanılır).Change the Name field from API Key 1 to a name that will help you remember what the key is used for (XamarinMapsDemoKey is used in this example).Ardından, Android uygulamaları radyo düğmesini tıklatın:Next, click the Android apps radio button:

  5. SHA-1 parmak izini eklemek için + Paket adı ve parmak izi ekle' yitıklatın:To add the SHA-1 fingerprint, click + Add package name and fingerprint:

  6. Uygulamanızın paket adını girin ve SHA-1 sertifika parmak keytool izini girin (bu kılavuzda daha önce açıklandığı gibi).Enter your app's package name and enter the SHA-1 certificate fingerprint (obtained via keytool as explained earlier in this guide).Aşağıdaki örnekte, paket XamarinMapsDemo adı girilir ve ardından debug.keystore'danalınan SHA-1 sertifika parmak izi gelir:In the following example, the package name for XamarinMapsDemo is entered, followed by the SHA-1 certificate fingerprint obtained from debug.keystore:

  7. APK'nizin Google Haritalar'a erişebilmesi için, APK'nızı imzalamak için kullandığınız her anahtar mağazası (hata ayıklama ve sürüm) için SHA-1 parmak izleri ve paket adları eklemeniz gerektiğini unutmayın.Note that, in order for your APK to access Google Maps, you must include SHA-1 fingerprints and package names for every keystore (debug and release) that you use to sign your APK.Örneğin, hata ayıklama için bir bilgisayar ve sürüm APK oluşturmak için başka bir bilgisayar kullanıyorsanız, ilk bilgisayarın hata ayıklama keydeposundan SHA-1 sertifika parmak izini ve ikinci bilgisayarın sürüm keydeposundan SHA-1 sertifika parmak izini eklemeniz gerekir.For example, if you use one computer for debug and another computer for generating the release APK, you should include the SHA-1 certificate fingerprint from the debug keystore of the first computer and the SHA-1 certificate fingerprint from the release keystore of the second computer.Bu örnekte gösterildiği gibi başka bir parmak izi ve paket adı eklemek için + Paket adı ve parmak izi ekle'yi tıklatın:Click + Add package name and fingerprint to add another fingerprint and package name as shown in this example:

  8. Yaptığınız değişiklikleri kaydetmek için Kaydet düğmesine tıklayın.Click the Save button to save your changes.Ardından, API anahtarlarınızın listesine döndürülür.Next, you are returned to the list of your API keys.Daha önce oluşturduğunuz diğer API anahtarları varsa, bunlar da burada listelenir.If you have other API keys that you have created earlier, they will also be listed here.Bu örnekte, yalnızca bir API anahtarı (önceki adımlarda oluşturulmuş) listelenir:In this example, only one API key (created in the previous steps) is listed:

Projeyi faturalandırılabilir bir hesaba bağlamaConnect the project to a billable account

11 Haziran 2018'den itibaren, proje faturalandırılabilir bir hesaba bağlı değilse (hizmet mobil uygulamalar için hala ücretsiz olsa bile) API anahtarı çalışmayacaktır.Beginning June,11 2018, the API key will not work if the project is not connected to a billable account (even if the service is still free for mobile apps).

  1. Hamburger menüsü düğmesini tıklatın ve Faturalandırma sayfasını seçin:Click the hamburger menu button and select the Billing page:

  2. Görüntülenen açılır pencerede fatura hesabı oluştur'un ardından bir fatura hesabı linkini tıklayarak projeyi bir fatura hesabına bağla (hesabınız yoksa, yeni bir hesap oluşturmak için yönlendirilirsiniz):Link the project to a billing account by clicking Link a billing account followed by CREATE BILLING ACCOUNT on the displayed popup (if you don't have an account, you will be guided to create a new one):

Google Maps Api Free

Projenizin Anahtarını EklemeAdding the Key to Your Project

My Google Api Key

Son olarak, Xamarin.Android uygulamanızın AndroidManifest.XML dosyasına bu API anahtarını ekleyin.Finally, add this API key to the AndroidManifest.XML file of your Xamarin.Android app.Aşağıdaki örnekte, YOUR_API_KEY önceki adımlarda oluşturulan API anahtarı ile değiştirilmelidir:In the following example, YOUR_API_KEY is to be replaced with the API key generated in the previous steps:

Android Maps Api Key

İlgili BağlantılarRelated Links