Kann jemand helfen? Ich möchte den kostenlosen Dienst von 51Degrees nicht die Lite-Version aber die Wolke API (https://51degrees.com/compare-data-options) verwenden.Global.asax Geräteerkennung mit 51 Grad Cloud API
Ich versuche, meine Global.asax zu setzen einen Anzeigemodus für "Tablette" haben und "mobile" so kann ich verwenden:
- index.cshtml
- index.tablet.cshtml
- index.mobile.cshtml
Folgendes funktioniert, wenn 51 Grad nicht verwendet werden. Hat jemand ein Beispiel, wie man die 51 Degrees Cloud API mit der global.asax für Tablets/Mobile filtert.
https://51degrees.com/Support/Documentation/APIs/Cloud-API/NET-Cloud
DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("Tablet")
{
ContextCondition = (ctx =>
ctx.Request.UserAgent.IndexOf("iPad", StringComparison.OrdinalIgnoreCase) >= 0 ||
ctx.Request.UserAgent.IndexOf("Android", StringComparison.OrdinalIgnoreCase) >= 0 &&
ctx.Request.UserAgent.IndexOf("Mobile", StringComparison.OrdinalIgnoreCase) <= 0
)
});
Dank Tommy