Google Actions - can I trigger an action on one device by chaning another device status? - actions-on-google

Im new to Google actions and really appreciate any help.
Here is a scenario just to make my question clear:
I have 3 smart light switches in 1 room. I would like to turn one of the switches on (physically) and have google home to turn on the remaining 2 switches for me.
So i understand that i can write a command to turn the 2 light switches on, i dont see any problems here. The tricky part is - how do i create a trigger from physically changing the status of the first switch. Is that even possible?
If yes where should i start? im not sure from which end to approach it. Im new to this and would really appreciate some help.

The platform does not provide a way to trigger any actions on a device state change, so your use case would not be possible using the Google Assistant.

Related

How to migrate/update a Ionic1 to Ionic4 app

noob here.
I did an app on ionic, is pretty basic just images, buttons and text; the buttons are linked to another page and stuf like that, i mean there is no logic still like a loop or something.
What i was asked is to update the project of the app that is on ionic1 to ionic4 because someone that is willing to help me works with ionic4 and not ionic1.
Is there a guide for noobs to do this? i have been looking on google but nothing pop up
i read this but to a noob makes no sense https://ionicframework.com/blog/a-guide-for-migrating-to-ionic-4-0/
But the solution is kind of like this:
"Then, create a new Ionic 4 application and begin porting features over. Once the team is comfortable that the new app is stable, you can shut down the Ionic 1 app"
Thanks in advance!
The reason why there isn't a straightforward guide is because an absolutely huge amount of changes were made.
Take a look at the breaking.md document on the repo, its over 1000 lines long:
https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md
There is a linting tool that could help you identify the main areas that you need to migrate, and if it's just a simple app like you say then it could do a lot of the work for you:
https://github.com/ionic-team/v4-migration-tslint
Beyond that the only real way is to look at every tag and then search it and see if its listed in the breaking change. If it is then update it.
The reason why the official advice is to make a new app and port features over is that otherwise you will have a non-working app basically forever up to the last moment where it starts working. Not the best way to learn so they say start with a new working app and build bits in it that are already Ionic 4.

Shall I mention the deep links in the sample invocation in the directory page?

I am making an action for google assistant.I have created some deep links so should I mention them in the sample invocations in the directory information? I also want the users to see the first welcome screen that is the default welcome intent and not directly jump to the other intents for the first time.I cannot decide what to do.Can someone please help me with this?
Showing them in your examples lets people know that the feature is possible.
If you really don't want to allow it when they first start - you can intercept the "deep link" at invocation time and send back a reply welcoming them first and explaining things, then either letting them do it or letting them do it in the future.

FLP: Setting Custom Initial Focus on App Launch Fails

I am trying to set initial focus to the first input field in each page of my app.
I have implemented the code in the following post and it is working great:
How to Set Initial Focus in a View?
But I found that it is not working for first view/page in app when it opens from Fiori Launchpad. I found the following code which is getting executed after my onAfterShow:
From sap/ushell/renderers/fiori2/Shell-dbg.controller.js
Could you please help to solve this?
I am using SAP UI5 version 1.56.7.
Author of that answer here. After browsing through the source code and documentation quite a while, I have to admit I couldn't find any acceptable solutions to this question either. My impression is that FLP developers want to make sure that the app doesn't interfere with setting the initial focus.
The lack of APIs and documentation thereof strongly suggests that there are compelling reasons behind this prevention (probably a11y related).
My advice is not to rely on timeouts but maintaining consistent UX by keeping the focus on the app title on its launch - as designed by SAP.
Solved the issue by passing around 200ms into setTimeout function for first page and it is working fine

Live reload/refresh for HTML/CSS & Javascript across 2 monitors?

Any help/advice on this would be greatly appreciated.
I'm looking for what I would consider a standard setup for modern day web design/development. Basically I have a dual monitor setup and I would like to code on one screen and have the changes displayed in real-time on the other screen.
Up until yesterday I was using jsbin in this way and it was working great. I had one browser setup with the coding stuff (HTML/CSS/jQuery) and I then had another separate browser open on the second monitor which updated instantly as I typed. So if I changed a CSS rule for example it was shown in real-time on the second monitor without me having to do ANYTHING. No saving, no refreshing, no switching tabs - NOTHING.
However, for whatever reason jsbin now refuses to update in real-time and it will only show the code changes if I manually refresh the browser. I've emailed jsbin about this but they can't diagnose the issue.
So what I'm looking for is either an online alternative, or a local alternative. However, everything (and I mean EVERYTHING) that I've tried so far can't do what jsbin did.
dabblet.com, jsFiddle.net, liveweave.com, codepen.io, cssdeck.com etc
But all of the above don't offer a second tab/browser that I can move to the second monitor to show the code updates in real-time which is the most important thing.
Surely there must be an easy solution to this? Is it not common to code in this way on 2 monitors whilst developing a website? I'd really appreciate any help on this.
Many thanks
Ben
For local option, Brackets has Live Preview mode.
After you open your project or file for editing, select File -> Live Preview
It launches a browser window, then your changes are reflected as you type, no save or browser refresh needed.
I use Liveweave with my dual monitor setup. I keep the HTML/CSS in my left window/monitor and the JS/Preview in my right monitor. Works great!

iPhone SDK: Ideas on how to implement a help facility for application

We we wondering what are some ways developers have added a help function to their apps. What are some techniques people have used?
One way we were thinking of is to us UIWebView to display a HTML file with help instructions.
Thoughts appreciated.
I'm using UIWebView right now which pretty much contains all the help in a single page, along with some JQuery things to display popups, etc. But I like the way iCab Mobile (et al.) are doing things which is a sectioned UITableView with each row a separate topic or section within their overall help information (complete with icons...) then in their bundle they have each section in its own html file, organized by localization.
Another thing in my queue for the next release is to provide a dynamic "News" view. The rough idea is as follows... I have on my server a file or CGI where I can place small bits of news I'd like to push out to users. On startup, my app checks for network availability and if present, start a thread to see if anything has changed on the server since last updating the News data. If changes present, post an alert letting user know, and asking if they'd like to read it now. At that point, the latest news is already downloaded and cached, so they can simply read it later if they want, and I won't post anymore alerts until the server file changes again. (And one could add a preference/setting to disable these alerts.)
I'm thinking this would be a good way to let people know that some nasty bug is known and fixed and an update is sitting in the queue, solicit beta testers, promote upcoming features or other apps, etc. I can see where constant alerts everytime I've got something new to promote would get annoying, so having a setting to disable them means the user never has to read them unless they want to. Although some kind of override to warn of recently discovered/fixed bugs seems sensible.
FWIW, the author of Mover+/Mover has just started doing a similar thing, though I think Emanuele is perhaps only showing one Notelet at a time, whereas I envision a bit more of a history (shown in UIWebView) until I decide to age stuff off the bottom of the stack.
I'm using a scroll/page view to show several images containing small notes. Each image then tells the user about the more advanced functions on a specific part of the app.
In my opinion the help should only contain information that isn't a 100% relevant for the use of the application. It should be things the advanced user should use to make more use of the app. It should contain gold for the power users. The "basics" should be so obvious that no help would ever be needed. If that's not the case, I think, you've failed as a developer on the iPhone platform.
(Here's a screen shot from my demo app)
I'm currently creating a fairly complicated app. I'm thinking of doing help as a semi-transparent overlay - help in text form is hard to swallow for users; it's much more helpful to just point at stuff and say "this does that".