mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 13:57:28 +02:00
Implemented deeplinking in android
This commit is contained in:
parent
950c50f218
commit
d734d4e5e5
13 changed files with 12150 additions and 9637 deletions
|
@ -254,6 +254,28 @@ namespace TINK
|
|||
.CreateLogger();
|
||||
}
|
||||
|
||||
/// <param name="uri">The URI for the request.</param>
|
||||
/// <summary>Overriden to respond when the user initiates an app link request.</summary>
|
||||
protected override void OnAppLinkRequestReceived(Uri uri)
|
||||
{
|
||||
base.OnAppLinkRequestReceived(uri);
|
||||
// TODO: Adjust to correct host
|
||||
if (uri.Host.ToLower() == "sharee.bike")
|
||||
{
|
||||
// Input e.g. sharee.bike/sharee/lastenrad/?lat=49.921&long=32.51
|
||||
Array segments = Array.ConvertAll(uri.Segments, segment => segment.Replace("/", "")).Skip(1).ToArray();
|
||||
Dictionary<string, string> queryDict = uri.Query
|
||||
.Substring(1)
|
||||
.Split("&")
|
||||
.Select(query => query.Split('='))
|
||||
.ToDictionary(query => query.FirstOrDefault(), query => query.Skip(1).FirstOrDefault());
|
||||
// segments == ["sharee", "lastenrad"]
|
||||
// queryDict == [{["lat", "49.921"]}], {["long", "32.51"]}]
|
||||
// => Navigate and pass params depending on linkinput
|
||||
// If no custom navigation is configured, the app just opens as if the user opened it
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets the current logging level.</summary>
|
||||
/// <returns></returns>
|
||||
private static LogEventLevel GetCurrentLogEventLevel()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue