WatchKit Custom Interface for Recording Audio - watchkit

Is it possible to use our own Interface UI for WatchOS's recording instead of:
presentAudioRecorderControllerWithOutputURL
https://developer.apple.com/documentation/watchkit/wkinterfacecontroller/1628147-presentaudiorecordercontrollerwi

Related

Where to store `UI`-object scoped state in a Vaadin 14 app?

Context (web app)
To store state available to our entire Vaadin app, we can get and set "Attribute" on the VaadinContext object that represents our entire Vaadin-based web app at runtime. These attributes act as a key-value collection, where the key is of type String and the value is of type Object.
We access the context by calling UI.getCurrent().getSession().getService().getContext().
Session (per user)
To store state available to any one user’s session, we can similarly get and set "attributes" on the VaadinSession object.
We access the session by calling UI.getCurrent().getSession().
UI (web browser window/tab)
These two levels of scope, context & session, are wrappers around their equivalents defined in the Java Servlet specification. But Vaadin effectively has a third, finer level of scope. Vaadin supports multi-window apps, where each web browser window (or tab) has its own content handled by a UI object. If a user has three windows open within our Vaadin app, that user has three UI object instances on the server housed within a single VaadinSession object.
So it seems like a common need would be storing state per UI (web browser window/tab). So I would expect to see the same kind of getAttribute & setAttribute methods on UI as seen on VaadinSession & VaadinContext. But, no, I do not see such methods on UI.
➥ Is there an appropriate place to store state per UI object?
In the olden days, in previous generations of Vaadin, we always wrote our own subclass of UI. So we could always store state by defining member variables on our own UI-subclass. Now, in the days of Vaadin Flow (v10+, currently 14), we are discouraged (forbidden?) from writing a subclass of UI.
Before filing a feature-request for such attributes, I want to ask if I missed out on a usual place where folks store their per-UI state in current Vaadin-based apps.
In Vaadin Flow there is ComponentUtil helper class which has methods to store data with components and UI.
See the pair of ComponentUtil.setData methods, one taking a Class as key, the other taking a String as key, just like the getAttribute/setAttribute methods found on VaadinContext & VaadinSession.

Update InterfaceController with different data

Hi I am new to WatchKit development. I want to know that can I update a single interface controller with multiple data for button clicks
You could have many different objects in your InterfaceController, such as labels, image views, etc.
Updating WKInterfaceLabels
You should call the setText() method on the corresponding label.
For example, you have a button and a label, and you want to print "Hello" on the label when the button is clicked. In this case, you should connect an action to the button in your interface (by control-dragging button to the code), and then add the following code in the method created:
Swift
label1.setText("Hello")
Objective-C
[label1 setText:#"Hello"];
Updating WKInterfaceImages
You should call setImage() or setImageNamed() methods on the corresponding image view.
First, the image should be located in the Asset Catalog of your WatchKit App Target, must be bundled or available as an UIImage. Then you could use these codes:
Case #1: Available as file in bundle or Asset Catalog
Swift
image1.setImageNamed("imageName")
Objective-C
[image1 setImageNamed:#"imageName"];
Case #2: Available as an UIImage
Swift
image1.setImage(image)
Objective-C
[image1 setImage:image];
If you want to have animated photos, try this link.
Conclusion
To update WKInterfaceLabels, you should call the setText() method on the corresponding label.
To update WKInterfaceImages, you should call setImage() or setImageNamed() methods on the corresponding image view.
Resources
WKInterfaceImage Class Reference
WKInterfaceLabel Class Reference

How do I add an optional selection criteria to a SAP HRFORMS print program?

I'm trying to add a checkbox to the standard payadvice driver program to enable the user to e-mail the form instead of printing it.
Because the print program is automagically generated from the print form (transaction HRFORMS), I can't just go and change the program.
Within transaction HRFORMS I have some control over the selection screen via Optional Selection fields below: Is it somehow possible to add a custom selection criteria to this via config?
I could wrap the generated program in a custom program of my own, but then I would lose a lot of the existing configurability.
I have been unable to find a configurable solution.
However, SAP already provides a standard wrapper program for HRFORMS:
H99_HRFORMS_CALL
I enhanced the selection screen in this program using implicit enhancement points, and passed the necessary parameters to the print form using Parameter ID's.

Access workflow ExectionProperties from Activity

When I derive an activity from NativeActivity, I can access Workflow executionproperties using the NativeActivityContext like this:
context.Properties.Find("propertyname");
Some of my activities derive from Activity, because I they define a coded workflow using the Implementation property. An Activity has an ActivityContext, which does not provide access to the workflow execution properties, it does not have a Properties property.
Is there another way to get access to the workflow execution properties from within an Activity
It would seem not. Using Reflector you can see that the ExecutionProperties class is only exposed in two places. One is the NativeExecutionContext.Properties and the other is related to the WCF/WF4 interop bits in the IReceiveMessageCallback.OnReceiveMessage().

How to write "Intercepting Filter Pattern" like Java's servlet filter in Flex?

I want to know how to write "Intercepting Filter Pattern" like Java's servlet filter in Flex.
And I want to insert it into the classes which have a role of server communicating.
Please show me any sample codes if any...
Create a class which will play a role of connector between your program and server. Put there event listener for server events. Create a constant types for different types of events that server could send to your program. Put a switch into event listener that receive these events, and re dispatch them to the specific places, depending on which type of the event it was.

Resources