mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-03-31 03:16:26 +02:00
Merge pull request 6 from US-134/deeplinking into devloft
This commit is contained in:
commit
983d31d95f
18 changed files with 12615 additions and 9699 deletions
|
@ -191,6 +191,9 @@
|
|||
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="117.6.0.2" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="117.0.1.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="117.2.1.1" />
|
||||
<PackageReference Include="Xamarin.Forms.AppLinks">
|
||||
<Version>5.0.0.2244</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android" />
|
||||
|
@ -646,6 +649,9 @@
|
|||
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
|
||||
</AndroidResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<GoogleServicesJson Include="google-services.json" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\TINK\LastenradBayern.projitems" Label="Shared" Condition="Exists('..\TINK\LastenradBayern.projitems')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
<ProjectExtensions>
|
||||
|
|
|
@ -4,11 +4,28 @@ using Android.Content.PM;
|
|||
using Android.OS;
|
||||
using Android.Content;
|
||||
using Java.Interop;
|
||||
using Xamarin.Forms.Platform.Android.AppLinks;
|
||||
using Firebase;
|
||||
|
||||
namespace TINK.Droid
|
||||
{
|
||||
[Activity (Label = "LastenradBayern", Icon = "@drawable/sharee", Theme="@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
|
||||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
||||
|
||||
[IntentFilter(new[] { Intent.ActionView },
|
||||
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
|
||||
DataScheme = "https",
|
||||
DataHost = "sharee.bike",
|
||||
DataPathPrefix = "/lastenrad",
|
||||
AutoVerify = true)]
|
||||
|
||||
[IntentFilter(new[] { Intent.ActionView },
|
||||
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
|
||||
DataScheme = "http",
|
||||
DataHost = "sharee.bike",
|
||||
DataPathPrefix = "/lastenrad",
|
||||
AutoVerify = true)]
|
||||
|
||||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
||||
{
|
||||
protected override void OnCreate (Bundle bundle)
|
||||
{
|
||||
|
@ -19,6 +36,9 @@ namespace TINK.Droid
|
|||
|
||||
global::Xamarin.Forms.Forms.Init (this, bundle);
|
||||
|
||||
FirebaseApp.InitializeApp(this);
|
||||
AndroidAppLinks.Init(this);
|
||||
|
||||
// Initialize xamarin.essentials, see https://docs.microsoft.com/en-us/xamarin/essentials/get-started?tabs=macos%2Candroid.
|
||||
Xamarin.Essentials.Platform.Init(this, bundle);
|
||||
|
||||
|
|
7261
LastenradBayern/TINK.Android/Resources/Resource.Designer.cs
generated
7261
LastenradBayern/TINK.Android/Resources/Resource.Designer.cs
generated
File diff suppressed because it is too large
Load diff
121
LastenradBayern/TINK.Android/google-services.json
Normal file
121
LastenradBayern/TINK.Android/google-services.json
Normal file
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
"project_info": {
|
||||
"project_number": "714659238786",
|
||||
"project_id": "shareebikedeeplinking",
|
||||
"storage_bucket": "shareebikedeeplinking.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:714659238786:android:d45a9f42bdf7c52cdab59b",
|
||||
"android_client_info": {
|
||||
"package_name": "com.TeilRad.LastenradBayern"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-212vd9c0958et32cvi0s0ug76r7bttro.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.TeilRad.LastenradBayern",
|
||||
"certificate_hash": "1b80c66db9ab80a7f87b6171065fdafce59ed1fe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:714659238786:android:c2d1832deac081f6dab59b",
|
||||
"android_client_info": {
|
||||
"package_name": "com.TeilRad.Meinkonrad"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-d5q3j4u1ohthdflriibd7kl1apb8nrka.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.TeilRad.Meinkonrad",
|
||||
"certificate_hash": "1b80c66db9ab80a7f87b6171065fdafce59ed1fe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:714659238786:android:503feb0fb8b9966ddab59b",
|
||||
"android_client_info": {
|
||||
"package_name": "com.hauffware.sharee"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-ui21aoaetn0hj3gcktsvpot21afg01gu.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.hauffware.sharee",
|
||||
"certificate_hash": "adc81d228a5d8dae7d588a6e698eed791c361343"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
|
@ -6,5 +6,9 @@
|
|||
<array>
|
||||
<string>$(AppIdentifierPrefix)com.TeilRad.sharee.bike</string>
|
||||
</array>
|
||||
<key>com.apple.developer.associated-domains</key>
|
||||
<array>
|
||||
<string>applinks:sharee.bike</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -254,6 +254,30 @@ 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);
|
||||
if (uri.Host.ToLower() == "sharee.bike")
|
||||
{
|
||||
// Input e.g. sharee.bike/sharee?lat=49.921&long=32.51
|
||||
Array segments = Array.ConvertAll(uri.Segments, segment => segment.Replace("/", "")).Skip(1).ToArray();
|
||||
if (uri.Query.Length > 0)
|
||||
{
|
||||
Dictionary<string, string> queryDict = uri.Query
|
||||
.Substring(1)
|
||||
.Split("&")
|
||||
.Select(query => query.Split('='))
|
||||
.ToDictionary(query => query.FirstOrDefault(), query => query.Skip(1).FirstOrDefault());
|
||||
}
|
||||
// segments == ["sharee"]
|
||||
// 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()
|
||||
|
|
|
@ -4,11 +4,28 @@ using Android.Content.PM;
|
|||
using Android.OS;
|
||||
using Android.Content;
|
||||
using Java.Interop;
|
||||
using Xamarin.Forms.Platform.Android.AppLinks;
|
||||
using Firebase;
|
||||
|
||||
namespace TINK.Droid
|
||||
{
|
||||
[Activity (Label = "Mein konrad", Icon = "@drawable/sharee", Theme="@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
|
||||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
||||
|
||||
[IntentFilter(new[] { Intent.ActionView },
|
||||
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
|
||||
DataScheme = "https",
|
||||
DataHost = "sharee.bike",
|
||||
DataPathPrefix = "/meinkonrad",
|
||||
AutoVerify = true)]
|
||||
|
||||
[IntentFilter(new[] { Intent.ActionView },
|
||||
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
|
||||
DataScheme = "http",
|
||||
DataHost = "sharee.bike",
|
||||
DataPathPrefix = "/meinkonrad",
|
||||
AutoVerify = true)]
|
||||
|
||||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
||||
{
|
||||
protected override void OnCreate (Bundle bundle)
|
||||
{
|
||||
|
@ -19,6 +36,9 @@ namespace TINK.Droid
|
|||
|
||||
global::Xamarin.Forms.Forms.Init (this, bundle);
|
||||
|
||||
FirebaseApp.InitializeApp(this);
|
||||
AndroidAppLinks.Init(this);
|
||||
|
||||
// Initialize xamarin.essentials, see https://docs.microsoft.com/en-us/xamarin/essentials/get-started?tabs=macos%2Candroid.
|
||||
Xamarin.Essentials.Platform.Init(this, bundle);
|
||||
|
||||
|
|
|
@ -190,6 +190,9 @@
|
|||
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="117.6.0.2" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="117.0.1.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="117.2.1.1" />
|
||||
<PackageReference Include="Xamarin.Forms.AppLinks">
|
||||
<Version>5.0.0.2244</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android" />
|
||||
|
@ -645,6 +648,9 @@
|
|||
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
|
||||
</AndroidResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<GoogleServicesJson Include="google-services.json" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\TINK\Meinkonrad.projitems" Label="Shared" Condition="Exists('..\TINK\Meinkonrad.projitems')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
<ProjectExtensions>
|
||||
|
|
7261
Meinkonrad/TINK.Android/Resources/Resource.Designer.cs
generated
7261
Meinkonrad/TINK.Android/Resources/Resource.Designer.cs
generated
File diff suppressed because it is too large
Load diff
121
Meinkonrad/TINK.Android/google-services.json
Normal file
121
Meinkonrad/TINK.Android/google-services.json
Normal file
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
"project_info": {
|
||||
"project_number": "714659238786",
|
||||
"project_id": "shareebikedeeplinking",
|
||||
"storage_bucket": "shareebikedeeplinking.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:714659238786:android:d45a9f42bdf7c52cdab59b",
|
||||
"android_client_info": {
|
||||
"package_name": "com.TeilRad.LastenradBayern"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-212vd9c0958et32cvi0s0ug76r7bttro.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.TeilRad.LastenradBayern",
|
||||
"certificate_hash": "1b80c66db9ab80a7f87b6171065fdafce59ed1fe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:714659238786:android:c2d1832deac081f6dab59b",
|
||||
"android_client_info": {
|
||||
"package_name": "com.TeilRad.Meinkonrad"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-d5q3j4u1ohthdflriibd7kl1apb8nrka.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.TeilRad.Meinkonrad",
|
||||
"certificate_hash": "1b80c66db9ab80a7f87b6171065fdafce59ed1fe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:714659238786:android:503feb0fb8b9966ddab59b",
|
||||
"android_client_info": {
|
||||
"package_name": "com.hauffware.sharee"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-ui21aoaetn0hj3gcktsvpot21afg01gu.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.hauffware.sharee",
|
||||
"certificate_hash": "adc81d228a5d8dae7d588a6e698eed791c361343"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
|
@ -6,5 +6,9 @@
|
|||
<array>
|
||||
<string>$(AppIdentifierPrefix)com.TeilRad.sharee.bike</string>
|
||||
</array>
|
||||
<key>com.apple.developer.associated-domains</key>
|
||||
<array>
|
||||
<string>applinks:sharee.bike</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -254,6 +254,30 @@ 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);
|
||||
if (uri.Host.ToLower() == "sharee.bike")
|
||||
{
|
||||
// Input e.g. sharee.bike/sharee/?lat=49.921&long=32.51
|
||||
Array segments = Array.ConvertAll(uri.Segments, segment => segment.Replace("/", "")).Skip(1).ToArray();
|
||||
if (uri.Query.Length > 0)
|
||||
{
|
||||
Dictionary<string, string> queryDict = uri.Query
|
||||
.Substring(1)
|
||||
.Split("&")
|
||||
.Select(query => query.Split('='))
|
||||
.ToDictionary(query => query.FirstOrDefault(), query => query.Skip(1).FirstOrDefault());
|
||||
}
|
||||
// segments == ["sharee"]
|
||||
// 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()
|
||||
|
|
|
@ -4,11 +4,28 @@ using Android.Content.PM;
|
|||
using Android.OS;
|
||||
using Android.Content;
|
||||
using Java.Interop;
|
||||
using Xamarin.Forms.Platform.Android.AppLinks;
|
||||
using Firebase;
|
||||
|
||||
namespace TINK.Droid
|
||||
{
|
||||
[Activity (Label = "Sharee", Icon = "@drawable/sharee", Theme="@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
|
||||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
||||
|
||||
[IntentFilter(new[] { Intent.ActionView },
|
||||
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
|
||||
DataScheme = "https",
|
||||
DataHost = "sharee.bike",
|
||||
DataPathPrefix = "/sharee",
|
||||
AutoVerify = true)]
|
||||
|
||||
[IntentFilter(new[] { Intent.ActionView },
|
||||
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
|
||||
DataScheme = "http",
|
||||
DataHost = "sharee.bike",
|
||||
DataPathPrefix = "/sharee",
|
||||
AutoVerify = true)]
|
||||
|
||||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
||||
{
|
||||
protected override void OnCreate (Bundle bundle)
|
||||
{
|
||||
|
@ -19,6 +36,9 @@ namespace TINK.Droid
|
|||
|
||||
global::Xamarin.Forms.Forms.Init (this, bundle);
|
||||
|
||||
FirebaseApp.InitializeApp(this);
|
||||
AndroidAppLinks.Init(this);
|
||||
|
||||
// Initialize xamarin.essentials, see https://docs.microsoft.com/en-us/xamarin/essentials/get-started?tabs=macos%2Candroid.
|
||||
Xamarin.Essentials.Platform.Init(this, bundle);
|
||||
|
||||
|
|
7261
TINK/TINK.Android/Resources/Resource.Designer.cs
generated
7261
TINK/TINK.Android/Resources/Resource.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -190,6 +190,9 @@
|
|||
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="117.6.0.2" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="117.0.1.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="117.2.1.1" />
|
||||
<PackageReference Include="Xamarin.Forms.AppLinks">
|
||||
<Version>5.0.0.2244</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android" />
|
||||
|
@ -663,6 +666,9 @@
|
|||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable-xxxhdpi\sharee_no_background.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<GoogleServicesJson Include="google-services.json" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\TINK\TINK.projitems" Label="Shared" Condition="Exists('..\TINK\TINK.projitems')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
<ProjectExtensions>
|
||||
|
|
121
TINK/TINK.Android/google-services.json
Normal file
121
TINK/TINK.Android/google-services.json
Normal file
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
"project_info": {
|
||||
"project_number": "714659238786",
|
||||
"project_id": "shareebikedeeplinking",
|
||||
"storage_bucket": "shareebikedeeplinking.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:714659238786:android:d45a9f42bdf7c52cdab59b",
|
||||
"android_client_info": {
|
||||
"package_name": "com.TeilRad.LastenradBayern"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-212vd9c0958et32cvi0s0ug76r7bttro.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.TeilRad.LastenradBayern",
|
||||
"certificate_hash": "1b80c66db9ab80a7f87b6171065fdafce59ed1fe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:714659238786:android:c2d1832deac081f6dab59b",
|
||||
"android_client_info": {
|
||||
"package_name": "com.TeilRad.Meinkonrad"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-d5q3j4u1ohthdflriibd7kl1apb8nrka.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.TeilRad.Meinkonrad",
|
||||
"certificate_hash": "1b80c66db9ab80a7f87b6171065fdafce59ed1fe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:714659238786:android:503feb0fb8b9966ddab59b",
|
||||
"android_client_info": {
|
||||
"package_name": "com.hauffware.sharee"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-ui21aoaetn0hj3gcktsvpot21afg01gu.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.hauffware.sharee",
|
||||
"certificate_hash": "adc81d228a5d8dae7d588a6e698eed791c361343"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
|
@ -6,5 +6,9 @@
|
|||
<array>
|
||||
<string>$(AppIdentifierPrefix)com.TeilRad.sharee.bike</string>
|
||||
</array>
|
||||
<key>com.apple.developer.associated-domains</key>
|
||||
<array>
|
||||
<string>applinks:sharee.bike</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -254,6 +254,30 @@ 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);
|
||||
if (uri.Host.ToLower() == "sharee.bike")
|
||||
{
|
||||
// Input e.g. sharee.bike/sharee/?lat=49.921&long=32.51
|
||||
Array segments = Array.ConvertAll(uri.Segments, segment => segment.Replace("/", "")).Skip(1).ToArray();
|
||||
if (uri.Query.Length > 0)
|
||||
{
|
||||
Dictionary<string, string> queryDict = uri.Query
|
||||
.Substring(1)
|
||||
.Split("&")
|
||||
.Select(query => query.Split('='))
|
||||
.ToDictionary(query => query.FirstOrDefault(), query => query.Skip(1).FirstOrDefault());
|
||||
}
|
||||
// segments == ["sharee"]
|
||||
// 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
Reference in a new issue