Android App Action does not pass sender and description from single voice command - app-actions

Hello and thank you for your time,
I am currently in a project using the Android App Actions to trigger in-app functionalities.
The stakeholder wants to have a rather complex command structure and I am on my way to evaluating how complex the voice commands can be.
Following through the Android App Actions guides and implementing a widget for the Google Assistant (GA) to be presented to the user, I got a working example of the entire stack.
Now I've implemented rather complex capabilities the user can send to the application and set the parameter in the shortcuts capabilities respectively:
<capability android:name="actions.intent.GET_MESSAGE">
<app-widget
android:identifier="APP_WIDGET_GET_MESSAGE_WITH_SENDER_AND_DESCRIPTION"
android:targetClass="com.example.app.WidgetProvider"
android:targetPackage="com.example.app">
<parameter
android:required="true"
android:name="message.description"
android:key="description"/>
<parameter
android:required="true"
android:name="message.sender.name"
android:key="senderName"/>
<extra
android:name="hasTts"
android:value="true" />
</app-widget>
<app-widget
android:identifier="APP_WIDGET_GET_MESSAGE_WITH_SENDER"
android:targetClass="com.example.app.WidgetProvider"
android:targetPackage="com.example.app">
<parameter
android:required="true"
android:name="message.sender.name"
android:key="senderName"/>
<extra
android:name="hasTts"
android:value="true" />
</app-widget>
<app-widget
android:identifier="APP_WIDGET_GET_MESSAGE_WITH_DESCRIPTION"
android:targetClass="com.example.app.WidgetProvider"
android:targetPackage="com.example.app">
<parameter
android:required="true"
android:name="message.description"
android:key="description"/>
<extra
android:name="hasTts"
android:value="true" />
</app-widget>
<app-widget
android:identifier="APP_WIDGET_GET_MESSAGE"
android:targetClass="com.example.app.WidgetProvider"
android:targetPackage="com.example.app">
<extra
android:name="hasTts"
android:value="true" />
</app-widget>
</capability>
Spinning up the App Action Test tool and triggering some commands, I am now able to get messages by a sender via "show me messages from john doe on action app" or with a description via "show me the first message on action app".
But, when I try to ask for the sender and description via "show me the first message from john doe on action app", the information isn't passed to the application and the GA seems to fail silently. I've tried to get some clues in the Logcat output without any result.
My question is, does there some constraints exist which restrict the usage of certain parameters altogether or is the phrase passed to GA not in the right form to be processed properly by GA?
Again, thank you for your time.

Related

Change windows installer error message if service installation fails

I'm currently struggling with WIX (disclaimer: I'm a very beginner in terms of WIX).
I need to install a service. The specific part of the .wxs file looks like this:
<ServiceInstall
Id="ServiceInstaller"
Vital="yes"
Type="ownProcess"
Name="ABC_MyService"
DisplayName="TestService"
Description="Monitoring and management Jobs"
Start="auto"
Arguments="--service"
Account="LocalSystem"
ErrorControl="normal"
Interactive="no"
/>
<ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="ABC_MyService" Wait="yes" />
Unfortunately the start of the service can fail in some cases (a port is already in use etc.). In that case you will get the super generic and confusing WIX error msg:
Service xy failed to start. Verify that you have sufficient privileges
to start system services.
Is there any way to propagate error messages / exceptions which can occur when starting the service and override the generic error msg?

Send ETW events to Application Insights?

I have some legacy code hosted in an Azure WebJob (.exe) that is generating a lot of ETW events for logging to a custom Event Provider.
How can I get those ETW events to Application Insights in an easy way? I would like them to show up in the same AI instance as my Website that is hosting the WebJob.
Here's a simple example of Event source tracking module.
https://github.com/AlexBulankou/ai-samples/blob/master/ETWTrackingModule.cs
The module wraps ETW listener that subscribes for configured event sources. You can specify what event sources you would like to subscribe to and whether you would like your ETW events to be tracked events and/or as traces. In your ApplicationInsights.config, register this module as follows:
<Add Type="Microsoft.ApplicationInsights.Samples.ETWTrackingModule, YourAssemblyName">
<TrackEvent>True</TrackEvent>
<TrackTrace>True</TrackTrace>
<EventSources>
<Add Name="System.Collections.Concurrent.ConcurrentCollectionsEventSource" EventLevel="LogAlways"/>
<Add Name="System.Diagnostics.Eventing.FrameworkEventSource" EventLevel="LogAlways"/>
</EventSources>
</Add>

In play framework 2.5 is there a way to turn on logging for all actors?

I'm learning Play Framework async programming using Akka actors.
It all seems really cool and stuff. But in the docs, it seems to suggest if I want logging for an actor I need to add a line in the logback.XML file for each actor..
private final LoggingAdapter log = Logging.getLogger(context().system(), this);
https://www.playframework.com/documentation/2.5.x/SettingsLogger
<!-- Set logging for all Akka library classes to INFO -->
<logger name="akka" level="INFO" />
<!-- Set a specific actor to DEBUG -->
<logger name="actors.MyActor" level="DEBUG" />
seriously? A line for every actor? There must be a way to globally set logging for all actors. Does anyone know a simple way to achieve this?

Access is denied while register provider (wevtutil)

I´m trying to register a manifest based provider using wevtutil and get the following error:
**** Warning: Publisher ExampleProvider resources are not accessible.
So I run wevtutil gp ExampleProvider and get the following message:
Failed to open metadata for publisher ExampleProvider. Access is denied
The user account I´m working with have Administrator privilage and is part of the groups Event Log Readers, Performance Log Users, and Performance Monitor Users.
The manifest file is the same as in this example.
Does anyone know whats wrong?
A side note is that my project folder has read-only flag under properties and when I try to change it does not complain. However, when I open up the properties again it remains read-only.. Can anyone explain that behaviour?
EDIT
I have located the problem area and it is the channel.
In the example manifest created in the tutorial they create a channel like:
<channels>
<channel name="MyChannel" chid="MyChannel" symbol="MyChannel" type="Debug" enabled="true" message="$(string.ExampleProvider.channel.MyChannel.message)">
</channel>
<importChannel name="Application" chid="appchnl">
</importChannel>
</channels>
And when I remove this channel and use default in the event I get no warnings, do I not have access to write events to that channel or something (Application)?

Sitecore Schedule task not running

I set my schedule item schedule as:
20090326T112200|20990426T112200|127|00:20:00
It should be run every 20 minutes. But it seems this schedule has never run after I deploy them.
The scheduling in web.config looks like this:
<scheduling>
<!-- Time between checking for scheduled tasks waiting to execute -->
<frequency>00:05:00</frequency>
<!-- Agent to process schedules embedded as items in a database -->
<agent type="Sitecore.Tasks.DatabaseAgent" method="Run" interval="00:10:00">
<param desc="database">core</param>
<param desc="schedule root">/sitecore/system/tasks/schedules</param>
<LogActivity>true</LogActivity>
</agent>
<!-- Agent to process schedules embedded as items in a database -->
<agent type="Sitecore.Tasks.DatabaseAgent" method="Run" interval="00:10:00">
<param desc="database">master</param>
<param desc="schedule root">/sitecore/system/tasks/schedules</param>
<LogActivity>true</LogActivity>
</agent>
Any help? Thanks.
I come across this post when trying to figure out why scheduled tasks weren't firing and thought i'd post a solution to a specific scenario i had.
The problem i found was that I installed the Sitecore SIM InitializeSpeedBooster.cofig which removes the following which stops scheduled tasks from running.
<processor type="Sitecore.Pipelines.Loader.InitializeScheduler, Sitecore.Kernel">
<patch:delete />
</processor>
Remove that patch:delete from the config and you'll still have a quicker initialisation of Sitecore, but with Scheduled tasks running.
A more detailed explanation can be found on my blog post for Sitecore scheduled tasks not working.
Sitecore will only run scheduled tasks if the application pool has not cycled down. In other words, if your application does not receive enough traffic IIS may cycle down the application pool to conserve resources. To prevent this from happening you could setup a keep-alive service that makes a request to your application on a set interval insuring that the application pool never cycles down.
Scheduling is a consistent problem in ASP.NET applications due to its architecture. Sitecore has attempted to fix this issue, but does a middling job of it, in my opinion. Barbosa describes one definite problem, but Sitecore has a built-in keepalive system you can use. In my web.config (version 6.3), that is configured directly after the DB scheduling agent you posted.
We don't have all the information we need to assess the problem. However, from your comment, it seems that your Last Run field is empty? This is a problem. It must have a value for scheduling to work. Scheduled items only kick off if the time interval between 'Now' and the Last Run value is greater than the time value in the Schedule field.
Here is an example from my Sitecore site that is working correctly (RAW values):
Schedule: 20000101|21000101|127|23:59:00
Last run: 20121126T074001
So... next question is this: Do you see the output from the scheduling agent in your log? First make sure you are logging INFO level. You should see something like this:
1924 10:40:22 INFO Scheduler - Adding agent: Sitecore.Tasks.DatabaseAgent (interval: 00:10:00)
If you DON'T see that, then Sitecore is not kicking off the Scheduler and you should open a Sitecore support request. If you DO see this, then the problem is most likely your Sitecore Schedule or Command items. You should see output from the schedule agent that it is starting/stopping your particular command. This is where error output will occur if your scheduled item is failing. Which brings us to the next step...
Your Schedule item has a Command field, which must link to a valid item under System/Tasks/Commands. That item's Type and Method field actually specific which method is being executed. If those are set correctly, the next step I would take is to create a one-off ASPX page with a single button... which executes this method. If that doesn't work... well, then you know where the problem lies.
Hope this helps.