summaryrefslogtreecommitdiff
path: root/src/service_app_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/service_app_main.c')
-rw-r--r--src/service_app_main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/service_app_main.c b/src/service_app_main.c
index baaa1a9..1c3f471 100644
--- a/src/service_app_main.c
+++ b/src/service_app_main.c
@@ -232,6 +232,18 @@ static int __service_app_control(bundle *b, void *data)
return 0;
}
+static int __service_app_receive(aul_type type, bundle *b, void *data)
+{
+ appcore_base_on_receive(type, b);
+
+ if (type == AUL_TERMINATE_BGAPP) {
+ appcore_base_exit();
+ return 0;
+ }
+
+ return 0;
+}
+
static void __loop_init(int argc, char **argv, void *data)
{
ecore_init();
@@ -306,6 +318,7 @@ EXPORT_API int service_app_main_ext(int argc, char **argv, service_app_lifecycle
ops.create = __service_app_create;
ops.terminate = __service_app_terminate;
ops.control = __service_app_control;
+ ops.receive = __service_app_receive;
ops.run = method->run;
ops.exit = method->exit;
ops.init = method->init;