我刚刚开始尝试使用 Tizen Studio 制作 Samsung 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__ */
最佳答案
This is the guide在 native 平台中创建您的第一个 Tizen 可穿戴应用程序。在本指南中,一切都按步骤进行了描述。我认为通过遵循本指南,您将能够学习 Tizen Native 应用程序的基础知识。
熟悉 Tizen 后,请检查心率示例应用程序。 Here是一个带有源代码的简单心率教程。
您也可以查看这个video tutorial在 YouTube 上了解 Tizen native 应用程序基础知识。
关于c - 我可以在 Tizen native 可穿戴应用程序(三星 G3)的模板中开始将代码放入哪一行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55584503/