Skip to content

Commit

Permalink
Merge pull request #3 from AchoWang/location
Browse files Browse the repository at this point in the history
[Mobile] Implement Location.
  • Loading branch information
dongsug-song authored Jan 18, 2023
2 parents f4aa1e2 + d0f7b86 commit 8bae5f5
Show file tree
Hide file tree
Showing 9 changed files with 717 additions and 0 deletions.
45 changes: 45 additions & 0 deletions Location/Location/Location.Tizen.Mobile/Location.Tizen.Mobile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using Tizen.NUI;
using static Location.LocationServices;

namespace Location.Tizen.Mobile
{
class Program : NUIApplication
{
/// <summary>
/// This method called when the application created.
/// </summary>
protected override void OnCreate()
{
base.OnCreate();

Window window = Window.Instance;
window.BackgroundColor = Color.Cyan;
window.KeyEvent += OnKeyEvent;

InitializePage page = new InitializePage();
page.PositionUsesPivotPoint = true;
page.ParentOrigin = ParentOrigin.Center;
page.PivotPoint = PivotPoint.Center;
page.Size = new Size(window.WindowSize);
window.Add(page);
}

public void OnKeyEvent(object sender, Window.KeyEventArgs e)
{
if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
{
Exit();
}
}

/// <summary>
/// The main entrance of the application.
/// </summary>
/// <param name="args">The <see cref="string"/> arguments.</param>
static void Main(string[] args)
{
var app = new Program();
app.Run(args);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project Sdk="Tizen.NET.Sdk/1.1.7">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>None</DebugType>
</PropertyGroup>

<ItemGroup>
<Folder Include="lib\" />
<Folder Include="res\" />
</ItemGroup>


<ItemGroup>
<ProjectReference Include="..\Location\Location.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Tizen.NET" Version="11.0.0.17614">
<ExcludeAssets>Runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>


</Project>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions Location/Location/Location.Tizen.Mobile/tizen-manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="org.tizen.example.Location.Tizen.Mobile" version="1.0.0" api-version="4" xmlns="http://tizen.org/ns/packages">
<profile name="mobile" />
<ui-application appid="org.tizen.example.Location.Tizen.Mobile" exec="Location.Tizen.Mobile.dll" multiple="false" nodisplay="false" taskmanage="true" splash-screen-display="true" type="dotnet" launch_mode="single">
<label>Location.Tizen.Mobile</label>
<icon>Location.Tizen.Mobile.png</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
</ui-application>
<shortcut-list />
<privileges>
<privilege>http://tizen.org/privilege/location</privilege>
</privileges>
</manifest>
12 changes: 12 additions & 0 deletions Location/Location/Location/Location.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<!-- Include Nuget Package for Xamarin building -->
<ItemGroup>
<PackageReference Include="Tizen.NET" Version="11.0.0.17614" />
</ItemGroup>

</Project>
Loading

0 comments on commit 8bae5f5

Please sign in to comment.