Skip to content

How to create alarm from wearable service application. #219

@andy-mishechkin

Description

@andy-mishechkin

Hello, All!
I need to send periodical vibration from wearable service application (like here: https://github.com/Samsung/Tizen-CSharp-Samples/blob/master/Wearable/ServiceApp/ServiceApp/ServiceApp_App.cs)
I try to use alarms for this: https://docs.tizen.org/application/dotnet/guides/alarm/alarms/#scenario_1
For example I've tried to set alarm to send notification:

protected override void OnCreate()
        {
            base.OnCreate();

            Notification notification = new Notification
            {
                IsVisible = true,
                Title = "TestNotification",
                Content = "This is a test notification",
                Count = 3
            };

            Notification.AccessorySet nAccessory = new Notification.AccessorySet
            {
                SoundOption = AccessoryOption.On,
                CanVibrate = true,
                LedOption = AccessoryOption.On
            };
            notification.Accessory = nAccessory;

            Alarm alarm = AlarmManager.CreateAlarm(1, 2, notification);
        }

But when I run this service application on Tizen Emulator I don't see any alarms. May you explain please how to create alarm from wearable service application, and, maybe there better solution for preiodical vibration realization then alarm ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions