mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-05-13 21:16:38 +02:00
Initial version.
This commit is contained in:
parent
e4fb48f6ab
commit
10dbeb5a90
737 changed files with 61885 additions and 0 deletions
45
TINK/TINK.Android/Model/Device/AppInfo.cs
Normal file
45
TINK/TINK.Android/Model/Device/AppInfo.cs
Normal file
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using TINK.Droid.Model.Device;
|
||||
using TINK.Model.Device;
|
||||
using Xamarin.Forms;
|
||||
|
||||
[assembly: Dependency(typeof(AppInfo))]
|
||||
namespace TINK.Droid.Model.Device
|
||||
{
|
||||
/// <summary> Holds information about the TINK- app. </summary>
|
||||
public class AppInfo : IAppInfo
|
||||
{
|
||||
/// <summary> Holds the the version of the app.</summary>
|
||||
private static Version m_oVersion = null;
|
||||
|
||||
/// <summary> Constructs a app info object. </summary>
|
||||
public AppInfo()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary> Constructs a app info object for initialization. </summary>
|
||||
/// <param name="p_strVersionText"> Version to initializ object with.</param>
|
||||
internal AppInfo(string p_strVersionText)
|
||||
{
|
||||
if (m_oVersion != null)
|
||||
{
|
||||
// Set version only once.
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Version.TryParse(p_strVersionText, out Version l_oVersion))
|
||||
{
|
||||
m_oVersion = new Version(0, 8);
|
||||
}
|
||||
|
||||
m_oVersion = l_oVersion;
|
||||
}
|
||||
|
||||
/// <summary> Get the version of the app. </summary>
|
||||
public Version Version => m_oVersion ?? new Version(0, 9);
|
||||
|
||||
/// <summary> Gets the URL to the app store. </summary>
|
||||
/// <value>The store URL.</value>
|
||||
public string StoreUrl => $"https://play.google.com/store/apps/details?id={Android.App.Application.Context.PackageName}";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue