Problem implementing app action on Android TV - app-actions

I'm trying to implement google app actions in Android TV.
I'm using this example from android -> https://github.com/android/app-actions-samples/tree/main/common-biis
It is a sample for Android (Smartphone), so a converted to Android TV.
Adding this to the Android Manifest
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<!-- REMOVED <category android:name="android.intent.category.LAUNCHER" />-->
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
I have also added the dependency in build.gradle
implementation 'androidx.leanback:leanback:1.0.0'
I have then uploaded the application to the Google Play Console for internal Testing.
Is app-actions for Android TV possible? I have used the Netflix app in Android TV, add the voice commands works.
What is the issue?

Related

how to change .vs\config\applicationhost.config once and for all?

I have an ASP.Net MVC web application. When i initially created the project i specified it as a windows authentication. After some experimentation and development, the requirements shifted away from windows authentication, so i reconfigured the solution/web config etc. to allow anonymous authentication, and to disable windows authentication. However, i seem to have missed something somewhere along the way.
My web application now works great when i publish it, but i am constantly needing to edit the .vs\config\applicationhost.config file.
The config file defaults to the following state whenever i open the solution in visual studio:
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="false" />
<windowsAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
These edits are required to get my ctrl+F5 functionality to work, each time i open the project in visual studio 2017.
At this stage i am not exactly sure, whether i should be looking at some setting in visual studio or perhaps IIS Express, so any help would be greatly appreciated!
I received the following communication from Bill H. at Microsoft which resolved the issue, sharing here in case anyone else encounters this problem:
"The value is stored in the project file so that it can be applied when you first download/clone a project. You can change the value in the property grid - select the project and press F4 to see the property grid"

Why can't I publish my web site in VS2017?

When I try to publish my ASP.Net MVC web site, I get the following page:
The lonely looking Publish button does nothing.
Any ideas how I fix this?
I had similar problem and it solved by changing csproj file:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v14.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
changed to
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" Condition="true" />
This only works of course if you're trying to update an older project to the newer VS2017 environment.

Bug: VS 2017 ASP.NET Core app published to IIS [same machine]

First creating a new project in VS 2017 with template of ASP.NET Core (and individual authentication) does not have a web.config; yet is added upon publishing the app to C:\inetpub\wwwroot (on new install of Window server 2016, and VS on same machine).
When published, it fails to open a web page giving a "500 - Internal server error" page display. Going into IIS Manager after clicking on mySite in left panel, trying to click on anything in the middle panel for the hosted web site fails to open with this error:
As you can also see it gives no information into the actual error.
So not sure why it's looking to \\?\C: for the web.config file? I believe if I can get help resolving this the web page should load; as it does load in development. As stated this issue is occurring on just deployment of a basic ASP.NET Core template; but it also is doing the same thing with my previous web site created with VS 2015 Community ported over to VS 2017 (with required update to it by VS)
The web.config file, which is only in the published app folder and not the development project folders, is:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\Laier-IT.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
This type of issue is typical of an IIS configuration that is not configured for .Net Core.
In order to host .Net Core applications in IIS it is necessary to install the .NET Core Windows Server Hosting bundle.
For detailed instructions on installing the .Net Core Windows Server Hosting bundle checkout the Microsoft documentation on installing .Net Core Windows Server Hosting.
This document also provides extensive information on deploying .Net Core to IIS and various other HTTP Servers.
Additionally you need to set the .Net CLR to no managed code in the application pool settings:

SlowCheetah Transformations are not being performed on Unit Test project during Continuous Integration Build on TFS 2013

I've been searching Google, reading various questions (and answers) here on Stack Overflow, and scanning the SlowCheetah NuGet page, the GitHub issues list, and the utility author's blog, and I still can't find an answer to figure out exactly what's causing my problems.
I have a solution hosted in a TFS 2013 Git repository. When a particular branch is pushed to the TFS server, it kicks off an automated build and deployment to a build site. All of that is working great. It also kicks off all of the unit tests and everything runs without issue.
That is, until I get to the SpecFlow WatiN tests...
The tests get kicked off without an issue, and I have the server set up to run the WatiN tests interactively within the browser. That all works. The problem is that the site the WatiN tests hit are on the Build server, which is a different URL than what I use locally on my development box (and also from the testing server, which is a third URL). I have the site URL set up in the App.Config of the unit test project (which is an MSTest-based project). I also have XDT transformation files set up for each of our target environments, including the Build environment in question.
When I do a push to TFS, or manually start a build, everything runs fine until it gets to the SpecFlow tests. These particular tests start, and if I'm actually logged into the VM-hosted server that acts as the build server when the build and tests are running AS THE Build/Test user, I can actually see the browser start up. I can also see, briefly, the "This page can’t be displayed" message in Internet Explorer, which is not the expected behavior (I should see the app's login page) and the test fails.
Looking at it a bit further, I started with the obvious - is it hitting the right site? Well, digging into the build folder on the server, I was able to verify that the transformation is NOT working - the app.config file has the site URL for the development machine and not the one for the Build environment!
The transformations for the web project ARE working - the changes for the Build environment are being populated for the front-end web application and the back-end service tier application and they work - I can bring up the site on the build server in a browser. But these projects are not using SlowCheetah, but rather the build-in web.config transformations. The unit test project DOES have the SlowCheetah NuGet package installed; it just doesn't seem to be working for whatever reason.
Here's the app.config file for the unit test project in question:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
</configSections>
<appSettings>
<add key="SiteUrl" value="http://dev.server.url/" />
</appSettings>
<!-- Spec-Flow Configuration -->
<specFlow>
<unitTestProvider name="MsTest" />
</specFlow>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="DocumentFormat.OpenXml" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.5022.0" newVersion="2.0.5022.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
The configuration transformation file app.Build.config is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<appSettings>
<add key="SiteUrl" xdt:Locator="Match(key)" xdt:Transform="SetAttributes" value="http://build.server.url/" />
</appSettings>
</configuration>
These configuration files look OK to me, so I don't think there's an issue with the format of the files. I can also verify that the SpecFlow tests run and pass when I run them manually on my local development box. My guess is that either the transformation simply isn't being kicked off, or maybe there's something in the timeline of when the transformations are run and when the unit tests are run.
What am I doing wrong here? Any assistance is greatly appreciated!
In your Build Definition you probably defined the Configurations to use. Part of that also defines a Platform like Any CPU or x86. As it turns out in the solution the Platform Any CPU has a space where in the project files the Platform AnyCPU does not have a space.
I found the best way to get around this was to leave the Platform blank and only put in the configuration name. VS will pop up a warning letting you know that there is data missing, you can just hit Yes to save it anyways. Alternatively you can just type in your configurations like the following |Release,|Debug.
The pattern is [PlatformName]|[ConfigurationName],[PlatformName]|[ConfigurationName],...

Google Cloud Messaging on Google Glass

Has anyone attempted Google Cloud Messaging from Google Glass?? I am guessing there may be an issue with Google Play services, but I have not looked deep into it yet and wanted to see if anyone had tried.
As people report, there are no Play Services on Glass: issue on google-glass-api tracker.
This means you can't use neither GCM, nor Maps API etc.
What is strange though, if you decompile GlassHome.apk, you can see in AndroidManifest.xml:
<permission android:name="com.google.glass.home.permission.C2D_MESSAGE" android:protectionLevel="signature" />
...
<receiver android:name="com.google.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.google.glass.home" />
</intent-filter>
</receiver>
So, it seems like they've got one.
I digged deeper and found, that inside GlassHome.apk they do have com.google.android.gcm package. So, it seems like, they integrated valuable Play Services parts into GlassHome.apk, but they didn't put that API part into the system.
Glass is in the testing stage, so this situation can change in the near future...
You can get GCM working (just tested) using the old deprecated way with gcm.jar from the android sdk. See http://androidmyway.wordpress.com/2012/07/09/gcm-demo/