-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from AchoWang/location
[Mobile] Implement Location.
- Loading branch information
Showing
9 changed files
with
717 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
Location/Location/Location.Tizen.Mobile/Location.Tizen.Mobile.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
Location/Location/Location.Tizen.Mobile/Location.Tizen.Mobile.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Binary file added
BIN
+9.86 KB
Location/Location/Location.Tizen.Mobile/shared/res/Location.Tizen.Mobile.png
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
13
Location/Location/Location.Tizen.Mobile/tizen-manifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.