From 7cf78ee3fb94ad7619074a63d853c386b55d3c7e Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Fri, 22 Dec 2023 13:58:19 +0900 Subject: [PATCH] [tizen_app_control]: Update example app type cpp to c# Now C# Multi type application is supported, so updated it. --- .../tizen_app_control/example/lib/main.dart | 4 +-- .../example/tizen/service/.exportMap | 5 ---- .../example/tizen/service/.gitignore | 13 ++++----- .../example/tizen/service/App.cs | 21 +++++++++++++++ .../tizen/service/RunnerService.csproj | 12 +++++++++ .../example/tizen/service/inc/runner.h | 6 ----- .../example/tizen/service/project_def.prop | 25 ------------------ .../tizen/service/shared/res/ic_launcher.png | Bin 1443 -> 0 bytes .../example/tizen/service/src/runner.cc | 19 ------------- .../example/tizen/service/tizen-manifest.xml | 7 ++--- .../example/tizen/ui/.exportMap | 5 ---- .../example/tizen/ui/.gitignore | 12 +++------ .../tizen_app_control/example/tizen/ui/App.cs | 20 ++++++++++++++ .../example/tizen/ui/Runner.csproj | 19 +++++++++++++ .../example/tizen/ui/inc/runner.h | 6 ----- .../example/tizen/ui/project_def.prop | 25 ------------------ .../example/tizen/ui/src/runner.cc | 18 ------------- .../example/tizen/ui/tizen-manifest.xml | 7 +++-- 18 files changed, 92 insertions(+), 132 deletions(-) delete mode 100644 packages/tizen_app_control/example/tizen/service/.exportMap create mode 100644 packages/tizen_app_control/example/tizen/service/App.cs create mode 100644 packages/tizen_app_control/example/tizen/service/RunnerService.csproj delete mode 100644 packages/tizen_app_control/example/tizen/service/inc/runner.h delete mode 100644 packages/tizen_app_control/example/tizen/service/project_def.prop delete mode 100644 packages/tizen_app_control/example/tizen/service/shared/res/ic_launcher.png delete mode 100644 packages/tizen_app_control/example/tizen/service/src/runner.cc delete mode 100644 packages/tizen_app_control/example/tizen/ui/.exportMap create mode 100644 packages/tizen_app_control/example/tizen/ui/App.cs create mode 100644 packages/tizen_app_control/example/tizen/ui/Runner.csproj delete mode 100644 packages/tizen_app_control/example/tizen/ui/inc/runner.h delete mode 100644 packages/tizen_app_control/example/tizen/ui/project_def.prop delete mode 100644 packages/tizen_app_control/example/tizen/ui/src/runner.cc diff --git a/packages/tizen_app_control/example/lib/main.dart b/packages/tizen_app_control/example/lib/main.dart index ee06f16cd..8278f0cce 100644 --- a/packages/tizen_app_control/example/lib/main.dart +++ b/packages/tizen_app_control/example/lib/main.dart @@ -185,12 +185,12 @@ class _MyAppState extends State { children: [ ElevatedButton( onPressed: _sendSms, - child: const Text('Send SMS'), + child: const Text('Send SMS(No TV)'), ), const SizedBox(height: 10), ElevatedButton( onPressed: _pickImage, - child: const Text('Pick image'), + child: const Text('Pick image(No TV)'), ), const SizedBox(height: 10), if (_isServiceStarted) diff --git a/packages/tizen_app_control/example/tizen/service/.exportMap b/packages/tizen_app_control/example/tizen/service/.exportMap deleted file mode 100644 index 3b97a4f3b..000000000 --- a/packages/tizen_app_control/example/tizen/service/.exportMap +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: main; - _IO_*; - local: *; -}; diff --git a/packages/tizen_app_control/example/tizen/service/.gitignore b/packages/tizen_app_control/example/tizen/service/.gitignore index 660cb0f67..750f3af1b 100644 --- a/packages/tizen_app_control/example/tizen/service/.gitignore +++ b/packages/tizen_app_control/example/tizen/service/.gitignore @@ -1,8 +1,5 @@ -lib/*.so -res/flutter_assets/ -res/icudtl.dat -.cproject -.sign -crash-info/ -Debug/ -Release/ +flutter/ +.vs/ +*.user +bin/ +obj/ diff --git a/packages/tizen_app_control/example/tizen/service/App.cs b/packages/tizen_app_control/example/tizen/service/App.cs new file mode 100644 index 000000000..98aa9f128 --- /dev/null +++ b/packages/tizen_app_control/example/tizen/service/App.cs @@ -0,0 +1,21 @@ +using Tizen.Flutter.Embedding; + +namespace Runner +{ + public class App : FlutterServiceApplication + { + protected override void OnCreate() + { + base.OnCreate(); + + GeneratedPluginRegistrant.RegisterPlugins(this); + } + + static void Main(string[] args) + { + var app = new App(); + app.DartEntrypoint = "serviceMain"; + app.Run(args); + } + } +} diff --git a/packages/tizen_app_control/example/tizen/service/RunnerService.csproj b/packages/tizen_app_control/example/tizen/service/RunnerService.csproj new file mode 100644 index 000000000..365cec128 --- /dev/null +++ b/packages/tizen_app_control/example/tizen/service/RunnerService.csproj @@ -0,0 +1,12 @@ + + + + Exe + tizen40 + + + + + + + diff --git a/packages/tizen_app_control/example/tizen/service/inc/runner.h b/packages/tizen_app_control/example/tizen/service/inc/runner.h deleted file mode 100644 index a2d45b6ee..000000000 --- a/packages/tizen_app_control/example/tizen/service/inc/runner.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __RUNNER_H__ -#define __RUNNER_H__ - -#include - -#endif /* __RUNNER_H__ */ diff --git a/packages/tizen_app_control/example/tizen/service/project_def.prop b/packages/tizen_app_control/example/tizen/service/project_def.prop deleted file mode 100644 index 6b1fd7545..000000000 --- a/packages/tizen_app_control/example/tizen/service/project_def.prop +++ /dev/null @@ -1,25 +0,0 @@ -# See https://docs.tizen.org/application/tizen-studio/native-tools/project-conversion -# for details. - -APPNAME = runner_service -type = app -profile = common-5.5 - -# Source files -USER_SRCS += src/runner.cc - -# User defines -USER_DEFS = -USER_UNDEFS = -USER_CPP_DEFS = TIZEN_DEPRECATION DEPRECATION_WARNING -USER_CPP_UNDEFS = - -# User includes -USER_INC_DIRS = inc ../ui/flutter src -USER_INC_FILES = -USER_CPP_INC_FILES = - -# Linker options -USER_LIB_DIRS = lib -USER_LIBS = -USER_LFLAGS = -Wl,-E diff --git a/packages/tizen_app_control/example/tizen/service/shared/res/ic_launcher.png b/packages/tizen_app_control/example/tizen/service/shared/res/ic_launcher.png deleted file mode 100644 index 4d6372eebdb28e45604e46eeda8dd24651419bc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;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!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` diff --git a/packages/tizen_app_control/example/tizen/service/src/runner.cc b/packages/tizen_app_control/example/tizen/service/src/runner.cc deleted file mode 100644 index b344cf215..000000000 --- a/packages/tizen_app_control/example/tizen/service/src/runner.cc +++ /dev/null @@ -1,19 +0,0 @@ -#include "runner.h" - -#include "generated_plugin_registrant.h" - -class App : public FlutterServiceApp { - public: - bool OnCreate() { - if (FlutterServiceApp::OnCreate()) { - RegisterPlugins(this); - } - return IsRunning(); - } -}; - -int main(int argc, char *argv[]) { - App app; - app.SetDartEntrypoint("serviceMain"); - return app.Run(argc, argv); -} diff --git a/packages/tizen_app_control/example/tizen/service/tizen-manifest.xml b/packages/tizen_app_control/example/tizen/service/tizen-manifest.xml index 1f09d03ac..36936e80f 100644 --- a/packages/tizen_app_control/example/tizen/service/tizen-manifest.xml +++ b/packages/tizen_app_control/example/tizen/service/tizen-manifest.xml @@ -1,10 +1,11 @@ - - - + + + ic_launcher.png + diff --git a/packages/tizen_app_control/example/tizen/ui/.exportMap b/packages/tizen_app_control/example/tizen/ui/.exportMap deleted file mode 100644 index 3b97a4f3b..000000000 --- a/packages/tizen_app_control/example/tizen/ui/.exportMap +++ /dev/null @@ -1,5 +0,0 @@ -{ - global: main; - _IO_*; - local: *; -}; diff --git a/packages/tizen_app_control/example/tizen/ui/.gitignore b/packages/tizen_app_control/example/tizen/ui/.gitignore index 2ce470fa9..750f3af1b 100644 --- a/packages/tizen_app_control/example/tizen/ui/.gitignore +++ b/packages/tizen_app_control/example/tizen/ui/.gitignore @@ -1,9 +1,5 @@ flutter/ -lib/*.so -res/flutter_assets/ -res/icudtl.dat -.cproject -.sign -crash-info/ -Debug/ -Release/ +.vs/ +*.user +bin/ +obj/ diff --git a/packages/tizen_app_control/example/tizen/ui/App.cs b/packages/tizen_app_control/example/tizen/ui/App.cs new file mode 100644 index 000000000..6dd4a6356 --- /dev/null +++ b/packages/tizen_app_control/example/tizen/ui/App.cs @@ -0,0 +1,20 @@ +using Tizen.Flutter.Embedding; + +namespace Runner +{ + public class App : FlutterApplication + { + protected override void OnCreate() + { + base.OnCreate(); + + GeneratedPluginRegistrant.RegisterPlugins(this); + } + + static void Main(string[] args) + { + var app = new App(); + app.Run(args); + } + } +} diff --git a/packages/tizen_app_control/example/tizen/ui/Runner.csproj b/packages/tizen_app_control/example/tizen/ui/Runner.csproj new file mode 100644 index 000000000..f4e369d0c --- /dev/null +++ b/packages/tizen_app_control/example/tizen/ui/Runner.csproj @@ -0,0 +1,19 @@ + + + + Exe + tizen40 + + + + + + + + + + %(RecursiveDir) + + + + diff --git a/packages/tizen_app_control/example/tizen/ui/inc/runner.h b/packages/tizen_app_control/example/tizen/ui/inc/runner.h deleted file mode 100644 index a2d45b6ee..000000000 --- a/packages/tizen_app_control/example/tizen/ui/inc/runner.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __RUNNER_H__ -#define __RUNNER_H__ - -#include - -#endif /* __RUNNER_H__ */ diff --git a/packages/tizen_app_control/example/tizen/ui/project_def.prop b/packages/tizen_app_control/example/tizen/ui/project_def.prop deleted file mode 100644 index 51eed84e2..000000000 --- a/packages/tizen_app_control/example/tizen/ui/project_def.prop +++ /dev/null @@ -1,25 +0,0 @@ -# See https://docs.tizen.org/application/tizen-studio/native-tools/project-conversion -# for details. - -APPNAME = runner -type = app -profile = common-5.5 - -# Source files -USER_SRCS += src/runner.cc - -# User defines -USER_DEFS = -USER_UNDEFS = -USER_CPP_DEFS = TIZEN_DEPRECATION DEPRECATION_WARNING -USER_CPP_UNDEFS = - -# User includes -USER_INC_DIRS = inc flutter src -USER_INC_FILES = -USER_CPP_INC_FILES = - -# Linker options -USER_LIB_DIRS = lib -USER_LIBS = -USER_LFLAGS = -Wl,-E diff --git a/packages/tizen_app_control/example/tizen/ui/src/runner.cc b/packages/tizen_app_control/example/tizen/ui/src/runner.cc deleted file mode 100644 index 74d25472a..000000000 --- a/packages/tizen_app_control/example/tizen/ui/src/runner.cc +++ /dev/null @@ -1,18 +0,0 @@ -#include "runner.h" - -#include "generated_plugin_registrant.h" - -class App : public FlutterApp { - public: - bool OnCreate() { - if (FlutterApp::OnCreate()) { - RegisterPlugins(this); - } - return IsRunning(); - } -}; - -int main(int argc, char *argv[]) { - App app; - return app.Run(argc, argv); -} diff --git a/packages/tizen_app_control/example/tizen/ui/tizen-manifest.xml b/packages/tizen_app_control/example/tizen/ui/tizen-manifest.xml index 9dd571b41..0ae7af283 100644 --- a/packages/tizen_app_control/example/tizen/ui/tizen-manifest.xml +++ b/packages/tizen_app_control/example/tizen/ui/tizen-manifest.xml @@ -1,13 +1,16 @@ - - + + ic_launcher.png + http://tizen.org/privilege/appmanager.launch http://tizen.org/privilege/appmanager.kill.bgapp + http://tizen.org/privilege/call + http://tizen.org/privilege/download