将用户代理设置为使用 osmdroid API
Setting the User-Agent to use osmdroid API
根据 osmdroid API 文档是定义用户代理所必需的。参见:https://github.com/osmdroid/osmdroid/wiki/Important-notes-on-using-osmdroid-in-your-app
Set the HTTP User-Agent variable
This setting identifies your app uniquely to tile servers. It's not the end user's identity, but the name of your app. If your users abuse the tile server or your app does in some way, this will prevent everyone that uses osmdroid from getting banned rather than just the users of your app. org.osmdroid.tileprovider.constants.OpenStreetMapTileProviderConstants#setUserAgentValue>
但我不确定是否有基于模式设置用户代理的约定。我应该只设置我的应用程序的名称吗?应用程序包名称?或者是什么?有人有什么想法吗?
是的,通常您应该设置(最好)应用程序的唯一名称。与其名称相反,HTTP 用户代理代表 软件 而不是实际用户。
根据 osmdroid API 文档是定义用户代理所必需的。参见:https://github.com/osmdroid/osmdroid/wiki/Important-notes-on-using-osmdroid-in-your-app
Set the HTTP User-Agent variable
This setting identifies your app uniquely to tile servers. It's not the end user's identity, but the name of your app. If your users abuse the tile server or your app does in some way, this will prevent everyone that uses osmdroid from getting banned rather than just the users of your app. org.osmdroid.tileprovider.constants.OpenStreetMapTileProviderConstants#setUserAgentValue>
但我不确定是否有基于模式设置用户代理的约定。我应该只设置我的应用程序的名称吗?应用程序包名称?或者是什么?有人有什么想法吗?
是的,通常您应该设置(最好)应用程序的唯一名称。与其名称相反,HTTP 用户代理代表 软件 而不是实际用户。