Choregraphe how to create application that offers to choose from multiple applications - nao-robot

I'm new to choregraphe and NAO. I'm working on different meditation exercises, that NAO guides the user through and I want to have one "Master application" that introduces the different exercises and let's the user choose, which one they want to do.
How do I implement an application switch in Choregraphe?

You can make an application that lists all the other applications, by calling ALPackageManager.packages2 and going through the results.
You have to spot packages that provide behaviors of nature "Interactive".
You can get their human-readable names to populate a graphical menu.
You can get their trigger sentences to populate a dialogue-based menu.
When an app is selected, use ALAutonomousLife.switchFocus to leave your launcher app and start the other app. Make sure the launch conditions of your launcher app leads to restarting it if a user is still around when the other app finishes.

Related

Developing application that represents same screen across multiple browser windows of same machine using AngularJS

I have to create one application that represents the same screen(sharing the state of the view/screen) across multiple browser windows of same machine using AngularJS.
During my analysis I found perhaps AngularJS is not the best technology to handle such scenarios, please find below my thoughts:
If I open the same application in second window of the browser after
opening it in the first one, I need to copy the full
state(rootScope/scope/services) to other window
If user performs some action in one window I need to update the other screen/window accordingly for which I need to use web sockets
Complexity of scope digest cycles execution
Please suggest.
I faced kinda the same scenario while working on chat sessions where the user can open multiple chat windows (as popup windows) while the parent site is open. I used local storage for handling some of its scenarios. I used angular-local-storage for this.
Note: Make sure you are handling (deleting/updating/adding) the data properly while storing it in local storage of browser. Graceful execution is the key or else you'll end up with many bugs.
Hope it helps !

Show windows form over locked screen

I'm developing an application to run in background. This application is used to capture user’s activity on their system. Application is working very fine.
Now, I need to display a windows form over locked screen. Just like this:
Can any one help me! How can I show any windows form over locked screen?
Not possible, for security reasons no application should be shown when the screen is locked.
The only thing remotely similiar might be a Kiosk App:
Is the Windows.ApplicationModel.LockScreen namespace available for non-kiosk use?
There are a few different things here that are probably confusing things. unfortunately they are not very common scenarios so documentation is lacking.
You can use the Windows.ApplicationModel.LockScreen namespace for customising the display of the lock screen. This can be used to change the wallpaper or notification counts. It is probably the most common form of lock screen customization as it can be done by any app.
You can also use the functionality in this namespace to create an alternative lock screen. This could have different behaviour to the process of swipe up and enter password/PIN or Microsoft Hello face detection.
Creating such an app and distributing through the store requires extra permissions than 3rd party developers typically have.
"Kiosk mode" apps are created as apps that run above the lock screen. Such apps have no real connection to lock screen replacements but are related in their use of similar underlying elements of the OS.
In terms of what you are trying to achieve, it sounds like you should be able to do this by declaring the windows.lockScreen extension and then using LockApplicationHost to do the actual unlocking. As mentioned above the lack of a way for 3rd parties to distribute such apps through the store means there is a lack of documentation in this area but it should be possible.
One thing to take note of in such an app is an under even greater memory/resource constraints than a typical app and so you should keep this in mind during your planning and development.
I know this is an old question but for anyone still looking:
It is a security risk don't do it.
If you still want to do it this could help: SampleHardwareEventCredentialprovider
You will have to play with WinAPI and CredentialProviders but it is working demo and will show simple windows dialog with a button at lockscreen

Programmatically get running application bundles in OS X

I'm trying to get a list of all running Application Bundles. GUI applications that the user has started, like the Dock is showing, or Activity Monitor (it shows an icon next to certain processes). I found that I could use sysctl() with KERN_PROC_ALL to get a list of all running processes, but that won't tell me which application bundle they are from. Applications like Minecraft just show up as java and that's not very useful.
I did find that the process group name in activity monitor shows roughly what I want to know:
(source: gdries.nl)
The implementation language is not important. Currently working in C and go, but if some other environment turns out to be required that's not a problem. All I want to do is detect which applications the user has running so I can log the time that each has been used. (Parental Controls does something similar but logs it in plist files that I can't parse)
I found a way to do it using Swift and Cocoa APIs. Presumably, this should also be possible using plain C, but this is good enough for my application.
import Foundation
import AppKit
// Get all running applications
let workspace = NSWorkspace.shared
let applications = workspace.runningApplications
for app in applications {
print(app)
}
app is an NSApplication object, and that has a bundle identifier, which is what I wanted to know.

Silverlight 4, Out of browser, Printing, Automatic updates

I have a very critial business application presently running using Winforms.
The application is a very core UI shell. It accepts input data, calls a webservice on my server to do the computation, displays the results on the winforms app and finally send a print stream to the printer.
Presently the application is deployed using Click-once.
Moving forward, I am trying to contemplate wheather I should move the application into a Silverlight application. Couple of reasons I am thinking silverlight.
Gives clients the feel that it is a cloud based solution.
Can be accessed from any PC. While the clickonce app is able to do this as well, they have to install an app, and when updates are available they have to click "Yes" to update.
The application presently has a drop down list of customers, this list has expanded to over 3000 records. Scrolling through the list is very painful. With Silverlight I am thinking of the auto complete ability.
Out of the browser - this will be handy for those users who use the app daily.
I haven't used Silverlight previous hence looking for some expert advice on a few things:
Printing - does silverlight allow sending raw print data to the printer. The application prints to a Zebra Thermal label printer. I have to send raw bytes to the printer with the commands. Can this be done with SL, or will it always prompt the "Print" dialog?
Out of browser - when SL apps are installed as out of browser, how to updates come through, does the app update automatically or is the user prompted to opt for update?
Printing -- using the PrintDocument API your user will be prompted for a print dialog. Currently using that API there is no way to suppress this. It isn't ideal for high-volume thermal situations (like pharmacies, shipping warehouses, etc.). You could use the trusted application mode and peek out into COM and do whatever you want with the printer.
The update happens when the application asks for it. There is an API to use and, once called, if an update exists it is downloaded -- no prompt to the user as an option. If an update is found you can alert the user to restart or that on the next restart they will have the updated application.
Autocomplete is not something that can only be done in Silverlight. Your ClickOnce app is already out-of-browser. And printing via raw bytes to a thermal printer is something that would not be easily engineered in Silverlight.
Not trying to sound negative, but in sum it sounds like you're better off simply working on enhancing the app that you already have.

How to switch users in a smooth way in a Point-Of-Sale system?

I am designing a Point-Of-Sale system for a small shop. The shop just have one Point-Of-Sale but often they are one to three users (sellers) in the shop. Each user have their own user account in the system so they login and logout very often. How should I design the login/logout system in a good way?
For the moment the users don't use passwords, because it takes so long time to type the password each time they login.
The Platform is Windows Vista but I would like to support Windows 7 too. We use Active Directory on the Network. The system is developed in Java/Swing for the moment, but I'm thinking about to change to C#.NET/WPF.
I am thinking about an SmartCard solution, but I don't know if that fits my situation. It would be more secure (which I like) but I don't know if it will be easy to implement and smooth to use, i.e. can I have the POS-system running in the background or started very quickly when the users switch? Are SmartCard solutions very expensive? (My customers are small shops) Is it preferred to use .NET or Java in a SmartCard solution?
What other solutions do I have other than passwords/no passwords/smartcards?
How should I design the login/logout system in a good way?
Is there any good solution using SmartCards for this purpose?
I would like suggested solutions both for C#.NET/WPF and Java/Swing platforms.
I would like suggested solutions both for Active Directory solutions and solutions that only use one user profile in Windows.
How is this problem solved in similar products? I have only seen password-solutions, but they are clumsy.
An interesting solution is to use "Fast User Switching", i.e. the capability to have multiple user sessions open on the same PC. The POS software could be launched through the Startup folder of each seller account and would stay active in each seller session.
I thought that being in a domain (i.e. using Active Directory) disables Fast User Switching, but according to The old new thing, this was true on XP only. I just checked with my Win7 machine at work: it is in a domain but still has the "switch user" menu item.
The main advantage is that if your software is already multi-user aware, you don't need to change it.
I should have made the Fast User Switching check before writing what is below, because this seems to be the simplest solution. Here are other ideas, anyway.
Another solution is what you mention of having a single Windows user but several "virtual users" that your application manages. A smart card is a good way to implement a pseudo-login. In C++, the API allows detecting the removal or insertion of a card, so the application could detect this and read the card after insertion to know who's currently in front of the computer. .NET can easily call this API through P/Invoke; I don't know much of Java, except that JNI could be a solution to call the native API if there is no managed library that publishes this capability.
What should be done is researching the different types of card and how to talk to them, as your app should use a card that does not require a PIN to be accessed (or you are back to the slow login system, except if tying a 4-digit number is not considered too slow).
I've seen restaurants where waiters insert a key into the cash register in order to be identified. I googled "cash registers" but could only find a complete solution package, rather than the components like a key reader.
An almost idiotic question is: how much security do you need ? Does it make sense to have big buttons on the first screen of the app, where people click in order to tell the system who they are ? When they are done, they click on a "Finish" button and the app goes back to the "identify" screen. I've put this at the end because it is so simplistic that it has a low probability of being useful.
I'm not familiar with a broad range of smart card provider solutions, but I know Gemalto has a .Net friendly setup. Most others are geared to Java, but support is widening.
With regards to switching user sessions and your application, it depends on how "heavy" your application is. If your app requires quite a bit of start-up time / resources then you might consider creating the basic application as a service on the machine which can run in the background continuously and then you can load a light-weight UI to interact with the service with each user session (maybe launch via Startup menu).
There is a C# project on CodeProject which provides a framework for interacting with smart card services in windows - might be interesting reading.
I had a chance to work with the Open Source Computer Vision library (OpenCV)
in one of my past projects and its "Face-Recognition" is what you're after. It is written using native code, but can be easily used with Java, .NET, Android, iOS. All you need is a webcam and a button "Switch User" with the onClickListener that will take a picture and compare it with the images of your employees. Advantage? Once the picture's taken, it gets processed in less than 10ms. And as Timores mentioned earlier, once the face is recognised, you simply switch the session. Simple yet effective solution. Good luck!
maybe you want to think about using barcode scanner... probably you already have this device on POS ... my software for bars and restaurants use barcode scanner to recognize users. You have 2 options for using: first, user must log in with own barcode card, then he can use the application ... the second is better, everyone can use application, but to print the receipt user must use barcode card. After then he is responsible for that amount on this receipt.

Resources