0

I am developing a watch face and want to include some preferences (with UI components like checkboxes, etc.) that the user can open by tapping on the watch face. For this, what is the proper way to open a preferences list? Is it possible to include the code for the preferences (genlist, sliders, etc.) in the watch face project? Or do I need to create a dedicated UI project which is then bundled with the watch face via the Multi Package function of Tizen Studio and launched from the watch face through the app manager (app_control_h)?

go3d
  • 443
  • 3
  • 11
  • I just found the documentation on Tizen.org which specifies which combinations are possible for native multi-projects: https://docs.tizen.org/application/native/tutorials/process/app-dev-process/ According to this doc, a UI project cannot be packaged with a watch project. In fact, the only project type that can be combined with a watch is a service. So the question now is if a genlist with UI components can be opened from a watch face directly. – go3d Apr 19 '21 at 23:07
  • Hello, why do you need an additional view over your watchface? I think.. it is abnormal user experience. you can find good example: Project - new - tizen project - sample - wearable 5.5 - native application - watch type : Weather Watch => 3 options are toggled by touch action. – Lunch Basketball Apr 21 '21 at 03:42
  • @LunchBasketball Thanks for your comment! Yes, I get it. I have another watch face design where indeed I managed to implement all user settings via a graphic menu that appears when tapping the center of the watch ( it is called "Cronosurf Breeze&Air", you find it in the Galaxy store). But in this new project I need the ability for the user to enter text (via the soft keyboard). Is there a better way to do this without the genlist/naviframe method? – go3d Apr 22 '21 at 00:06

2 Answers2

0

@go3d, I think you can use the entry component for the user text input. here is the document for the entry usages on the wearable device. (https://docs.tizen.org/application/native/guides/ui/efl/wearable/component-entry/) I guess you can add some codes for the entry component to the WeatherWatch sample.

Example)

void maxlength_reached(void *data, Evas_Object *obj, void *event_info)
{
  //Implements the behavior when the entry maxlenth is reached.
}

static void _entry_enter_click(void *data, Evas_Object *obj, void *event_info)
{
  //Implements the behavior when the enter key is pressed.
}

// Create Entry Object.
Evas_Object* entry = elm_entry_add(layout);
elm_entry_single_line_set(entry, EINA_TRUE);
elm_entry_scrollable_set(entry, EINA_TRUE);
elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
evas_object_smart_callback_add(entry, "maxlength,reached", maxlength_reached, NULL);

limit_filter_data.max_char_count = 0;
limit_filter_data.max_byte_count = 100;
elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size, &limit_filter_data);
elm_object_part_text_set(entry, "elm.guide", "input your text");
elm_entry_cursor_end_set(entry);
evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_smart_callback_add(entry, "activated", _entry_enter_click, NULL);

elm_object_content_set(layout, entry);
taehyub
  • 1
  • 1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – nik7 Apr 22 '21 at 08:57
  • @taehyub Thanks for your answer! I tried this out and the keyboard is not showing. After lots of testing I managed to get the soft keyboard to show on a UI project, but not on my watch face project. Is it somehow possible to call the soft keyboard from within a watch face? – go3d Apr 26 '21 at 22:43
0

preferences(saving data). There are 2 ways:

  1. https://tizenschool.org/tutorial/118/contents/10

Using App Preference you may save information about the currently selected application, so when changing the app settings and return it back, the application will be loaded with the preferences, which was set during the last session.

  1. use xamarin.essentials NuGet package and Preferences.Get(..) or Preferences.Set(..) methods
Saeid Amini
  • 1,313
  • 5
  • 16
  • 26