Google Maps API key for a WebView

paolo agretti 20 Reputation points
2024-02-14T10:10:28.6166667+00:00

Hello, We have written an android app (with Xamarin Forms) with some Html and Javascript code (which is inside the app, not on an external url) that is displayed by a WebView I have a map: in order to create the Google Maps API Key do we need to create the key supplying both package name and Sha1? I don't know if doing so maps will work correctly or not since my Maps Api key is not handled directly by the C# code but by mi Javascript.

Developer technologies .NET Xamarin
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2024-02-15T01:47:02.8766667+00:00

    Hello,

    No need to create the key supplying both package name and Sha1.

    See the Google's document about Maps JavaScript API

    If you use Xamarin.Forms Map Control - Xamarin | Microsoft Learn and you want to restricting API keys, when you create key, you need to supply package names and SHA1.

    Best Regards, Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.