intergartions XLabs.* WIP MVVM
parent
145fcb923b
commit
1ee8e83013
@ -0,0 +1,63 @@
|
||||
using System;
|
||||
|
||||
using Android.App;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Plugin.CurrentActivity;
|
||||
|
||||
namespace BookAStar.Droid
|
||||
{
|
||||
//You can specify additional application information in this attribute
|
||||
[Application]
|
||||
public class MainApplication : Application, Application.IActivityLifecycleCallbacks
|
||||
{
|
||||
public MainApplication(IntPtr handle, JniHandleOwnership transer)
|
||||
:base(handle, transer)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCreate()
|
||||
{
|
||||
base.OnCreate();
|
||||
RegisterActivityLifecycleCallbacks(this);
|
||||
//A great place to initialize Xamarin.Insights and Dependency Services!
|
||||
}
|
||||
|
||||
public override void OnTerminate()
|
||||
{
|
||||
base.OnTerminate();
|
||||
UnregisterActivityLifecycleCallbacks(this);
|
||||
}
|
||||
|
||||
public void OnActivityCreated(Activity activity, Bundle savedInstanceState)
|
||||
{
|
||||
CrossCurrentActivity.Current.Activity = activity;
|
||||
}
|
||||
|
||||
public void OnActivityDestroyed(Activity activity)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnActivityPaused(Activity activity)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnActivityResumed(Activity activity)
|
||||
{
|
||||
CrossCurrentActivity.Current.Activity = activity;
|
||||
}
|
||||
|
||||
public void OnActivitySaveInstanceState(Activity activity, Bundle outState)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnActivityStarted(Activity activity)
|
||||
{
|
||||
CrossCurrentActivity.Current.Activity = activity;
|
||||
}
|
||||
|
||||
public void OnActivityStopped(Activity activity)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
Connectivity Readme
|
||||
Find the most up to date information at: https://github.com/jamesmontemagno/Xamarin.Plugins
|
||||
|
||||
**IMPORTANT**
|
||||
Android:
|
||||
You must request ACCESS_NETWORK_STATE permission to get the network state
|
||||
You must request ACCESS_WIFI_STATE to get speeds
|
||||
|
||||
iOS:
|
||||
Bandwidths is not supported and will always return an empty list.
|
||||
|
||||
Windows 8.1 & Windows Phone 8.1 RT:
|
||||
RT apps can not perform loopback, so you can not use IsReachable to query the states of a local IP.
|
||||
|
||||
Permissions to think about:
|
||||
The Private Networks (Client & Server) capability is represented by the Capability name = "privateNetworkClientServer" tag in the app manifest.
|
||||
The Internet (Client & Server) capability is represented by the Capability name = "internetClientServer" tag in the app manifest.
|
@ -1,24 +0,0 @@
|
||||
Connectivity Readme
|
||||
Find the most up to date information at: https://github.com/jamesmontemagno/Xamarin.Plugins
|
||||
|
||||
**IMPORTANT**
|
||||
Android:
|
||||
You must request ACCESS_COARSE_LOCATION & ACCESS_FINE_LOCATION permission
|
||||
|
||||
iOS:
|
||||
In iOS 8 you now have to call either RequestWhenInUseAuthorization or RequestAlwaysAuthorization on the location manager. Additionally you need to add either the concisely named NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription to your Info.plist.
|
||||
See: http://motzcod.es/post/97662738237/scanning-for-ibeacons-in-ios-8
|
||||
|
||||
Windows Phone:
|
||||
You must set the ID_CAP_LOCATION permission.
|
||||
|
||||
Getting Started:
|
||||
|
||||
var locator = CrossGeolocator.Current;
|
||||
locator.DesiredAccuracy = 50;
|
||||
|
||||
var position = await locator.GetPositionAsync (timeout: 10000);
|
||||
|
||||
Console.WriteLine ("Position Status: {0}", position.Timestamp);
|
||||
Console.WriteLine ("Position Latitude: {0}", position.Latitude);
|
||||
Console.WriteLine ("Position Longitude: {0}", position.Longitude);
|
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@ -0,0 +1,78 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "325408689282",
|
||||
"project_id": "yavsc-001"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"android_client_info": {
|
||||
"package_name": "fr.pschneider.android.wearable.speedtracker"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "325408689282-6bekh7p3guj4k0f3301a6frf025cnrk1.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyBCAE_pc6lrxLf8_Vyho0KSxLsqjxecPFk"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"analytics_service": {
|
||||
"status": 1
|
||||
},
|
||||
"appinvite_service": {
|
||||
"status": 1,
|
||||
"other_platform_oauth_client": []
|
||||
},
|
||||
"ads_service": {
|
||||
"status": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:325408689282:android:50a2328516f10af3",
|
||||
"android_client_info": {
|
||||
"package_name": "fr.pschneider.bas"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "325408689282-emdeucmt5pr9jg7170t0q9gnndacsqqf.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "fr.pschneider.bas",
|
||||
"certificate_hash": "E97A345457861B8E2E7BA79BB814BB1ACC0471A6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "325408689282-6bekh7p3guj4k0f3301a6frf025cnrk1.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyBCAE_pc6lrxLf8_Vyho0KSxLsqjxecPFk"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"analytics_service": {
|
||||
"status": 1
|
||||
},
|
||||
"appinvite_service": {
|
||||
"status": 1,
|
||||
"other_platform_oauth_client": []
|
||||
},
|
||||
"ads_service": {
|
||||
"status": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Xamarin.Forms" version="2.0.0.6482" targetFramework="xamarinios10" />
|
||||
<package id="Xamarin.Forms" version="2.3.2.127" targetFramework="xamarinios10" />
|
||||
</packages>
|
@ -0,0 +1,43 @@
|
||||
// Helpers/Settings.cs
|
||||
using Plugin.Settings;
|
||||
using Plugin.Settings.Abstractions;
|
||||
|
||||
namespace BookAStar.Helpers
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the Settings static class that can be used in your Core solution or in any
|
||||
/// of your client applications. All settings are laid out the same exact way with getters
|
||||
/// and setters.
|
||||
/// </summary>
|
||||
public static class Settings
|
||||
{
|
||||
private static ISettings AppSettings
|
||||
{
|
||||
get
|
||||
{
|
||||
return CrossSettings.Current;
|
||||
}
|
||||
}
|
||||
|
||||
#region Setting Constants
|
||||
|
||||
private const string SettingsKey = "settings_key";
|
||||
private static readonly string SettingsDefault = string.Empty;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
public static string GeneralSettings
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppSettings.GetValueOrDefault<string>(SettingsKey, SettingsDefault);
|
||||
}
|
||||
set
|
||||
{
|
||||
AppSettings.AddOrUpdateValue<string>(SettingsKey, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,66 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:local="clr-namespace:BookAStar;assembly=BookAStar"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="BookAStar.SettingsPage"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="BookAStar.SettingsPage"
|
||||
Title="Paramètres Booking star"
|
||||
BindingContext="." >
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
|
||||
<StackLayout>
|
||||
<Label Text="Compte utilisateur" StyleClass="Header"/>
|
||||
|
||||
<ListView x:Name="AccountListView"
|
||||
SeparatorVisibility="Default"
|
||||
VerticalOptions="FillAndExpand"
|
||||
Style="{StaticResource PageStyle}">
|
||||
|
||||
<StackLayout>
|
||||
<Label Text="Compte utilisateur" StyleClass="Header"/>
|
||||
|
||||
<ListView x:Name="AccountListView"
|
||||
SeparatorVisibility="Default"
|
||||
VerticalOptions="FillAndExpand"
|
||||
>
|
||||
<ListView.Header>
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Button x:Name="RemoveAccountBouton"
|
||||
Text="Supprimer cette identité" />
|
||||
<Button x:Name="AddAccountBtn" Text="s'inscrire ou se connecter avec un nouveau compte" />
|
||||
<ListView.Header>
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Button x:Name="RemoveAccountBouton"
|
||||
Text="Supprimer cette identité" />
|
||||
<Button x:Name="AddAccountBtn" Text="s'inscrire ou se connecter avec un nouveau compte" />
|
||||
|
||||
</StackLayout>
|
||||
</ListView.Header>
|
||||
|
||||
<ListView.ItemTemplate HeightRequest="60" VerticalOptions="StartAndExpand">
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<Grid Padding="5"
|
||||
ColumnSpacing="10"
|
||||
RowSpacing="2">
|
||||
<Image Source="{Binding Avatar}" HeightRequest="80" />
|
||||
<Label Grid.Column="0" Text="{Binding UserName}" />
|
||||
</Grid>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.Footer>
|
||||
<StackLayout></StackLayout>
|
||||
</ListView.Footer>
|
||||
|
||||
</ListView>
|
||||
|
||||
|
||||
|
||||
<StackLayout Orientation="Horizontal" VerticalOptions="Start">
|
||||
<Label Text="Recevoir les notifications push" />
|
||||
<Switch x:Name="pushstatus" />
|
||||
</StackLayout>
|
||||
</ListView.Header>
|
||||
|
||||
<ListView.ItemTemplate HeightRequest="60" VerticalOptions="StartAndExpand">
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<Grid Padding="5"
|
||||
ColumnSpacing="10"
|
||||
RowSpacing="2">
|
||||
<Image Source="{Binding Avatar}" HeightRequest="80" />
|
||||
<Label Grid.Column="0" Text="{Binding UserName}" />
|
||||
</Grid>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.Footer><StackLayout></StackLayout></ListView.Footer>
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Label Text="Utiliser ma position" />
|
||||
<Switch x:Name="use_my_pos" HorizontalOptions="End" />
|
||||
</StackLayout>
|
||||
|
||||
</ListView>
|
||||
|
||||
|
||||
|
||||
<StackLayout Orientation="Horizontal" VerticalOptions="Start">
|
||||
<Label Text="Recevoir les notifications push" />
|
||||
<Switch x:Name="pushstatus" />
|
||||
</StackLayout>
|
||||
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Label Text="Utiliser ma position" />
|
||||
<Switch x:Name="use_my_pos" HorizontalOptions="End" />
|
||||
</StackLayout>
|
||||
|
||||
|
||||
<StackLayout Orientation="Horizontal" VerticalOptions="Start">
|
||||
<Label Text="Recevoir les demandes de devis de la part de professionnels uniquement"
|
||||
StyleClass="Header"/>
|
||||
<Switch x:Name="restrictToPro" />
|
||||
</StackLayout>
|
||||
<StackLayout Orientation="Horizontal" VerticalOptions="Start">
|
||||
<Label Text="Recevoir les demandes de devis de la part de professionnels uniquement"
|
||||
StyleClass="Header"/>
|
||||
<Switch x:Name="restrictToPro" />
|
||||
</StackLayout>
|
||||
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
|
@ -1,9 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ExifLib.PCL" version="1.0.1" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="Json.NET.Web" version="1.0.49" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="MarkdownDeep.NET" version="1.5" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="Xam.Plugins.Settings" version="2.1.0" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="Xamarin.Forms" version="2.3.0.107" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="Xamarin.Forms.Maps" version="2.3.0.107" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="SQLite.Net.Core-PCL" version="3.1.1" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="SQLite.Net-PCL" version="3.1.1" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="Xam.Plugins.Settings" version="2.5.1.0" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="Xamarin.Forms" version="2.3.2.127" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="Xamarin.Forms.Maps" version="2.3.2.127" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="XLabs.Core" version="2.2.0-pre05" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="XLabs.Forms" version="2.2.0-pre05" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="XLabs.IoC" version="2.2.0-pre05" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="XLabs.Platform" version="2.2.0-pre05" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="XLabs.Serialization" version="2.2.0-pre05" targetFramework="portable45-net45+win8+wpa81" />
|
||||
</packages>
|
Loading…
Reference in New Issue