在Tizen Native Wearable App(三星G3)的模板中,我可以开始将代码放入哪一行

问题描述 投票:-1回答:1

我刚开始尝试使用Tizen Studio制作三星G3应用程序。我很擅长用C编码。在Tizen Studio给出的模板中,我不确定我应该在哪里开始编写/编写自己的代码。例如,如果我想从创建此传感器开始:

sensor_type_e type = SENSOR_HRM;
sensor_h sensor;

bool supported;
int error = sensor_is_supported(type, &supported);
if (error != SENSOR_ERROR_NONE) {
   dlog_print(DLOG_ERROR, LOG_TAG, "sensor_is_supported error: %d", error);
   return;
}

if(supported){
   dlog_print(DLOG_DEBUG, LOG_TAG, "HRM is%s supported", supported ? "" : " 
   not");
   sprintf(out,"HRM is%s supported", supported ? "" : " not");
   elm_object_text_set(event_label, out);
}

我会把这个放在提供给我的这个简短模板中:

#ifndef __basicui_H__
#define __basicui_H__

#include <app.h>
#include <Elementary.h>
#include <system_settings.h>
#include <efl_extension.h>
#include <dlog.h>
#include <sensor.h>

#ifdef  LOG_TAG
#undef  LOG_TAG
#endif
#define LOG_TAG "basicui"

#if !defined(PACKAGE)
#define PACKAGE "org.example.basicui"
#endif

#endif /* __basicui_H__ */
c tizen tizen-wearable-sdk tizen-native-app
1个回答
0
投票

This is the guide在Native平台上创建您的第一个Tizen可穿戴应用程序。在本指南中,所有内容都是逐步描述的。我想通过遵循本指南,您将能够学习Tizen Native应用程序的基础知识。

熟悉Tizen后,请检查心率样本应用程序。 Here是一个简单的心率教程,包含源代码。

这个应用程序的屏幕截图是在enter image description here下面

您也可以在YouTube上查看关于Tizen Native App Fundamentals的video tutorial

© www.soinside.com 2019 - 2024. All rights reserved.