Hello Guys,
I want to realize that the user gets a message on the display and he with 2 buttons in the message are decide what he wants to make, I just fail to do that when I touch the buttons that always the activity opens instead of the function
My Code:
If I click the button to get the message then the two functions are executed, but this is not what I want, but the should be executed only when I click Action 1 or Action 2
I have not found anything that explains in detail, I seem to be the only one who does not know how to do that.
I want to realize that the user gets a message on the display and he with 2 buttons in the message are decide what he wants to make, I just fail to do that when I touch the buttons that always the activity opens instead of the function
My Code:
B4X:
Sub Button1_Click
nb.Initialize
WearableExtender.Initialize
WearableExtender.Gravity = WearableExtender.TOP
nb.SmallIcon = "icon"
nb.Ticker = "New Demo"
nb.Tag = "someTag"
nb.setActivity(Me)
nb.DefaultLight = False
nb.DefaultVibrate = False
nb.DefaultSound = False
nb.ContentTitle = "Title"
nb.ContentInfo = "Info"
nb.ShowTime = False
'nb.Extend(WearableExtender)
nb.AddAction("actionicon1", "Aktion 1","Tag1",MyGreatFunction1)
nb.AddAction("actionicon2", "Aktion 2", "Tag2", MyGreatFunction2)
WearableExtender.AddAction("actionicon1", "Aktion 1","Tag1",MyGreatFunction1)
WearableExtender.AddAction("actionicon2", "Aktion 2", "Tag2", MyGreatFunction2)
nb.Notify(0)
End Sub
If I click the button to get the message then the two functions are executed, but this is not what I want, but the should be executed only when I click Action 1 or Action 2
I have not found anything that explains in detail, I seem to be the only one who does not know how to do that.