I have an electron app built, it is basically a form.
When a user clicks finish on the form, their details get registered remotely but it is also essential that an A4 printout of the electron app screen gets sent to the default computer.
Is this at all possible with electron, I imagined it would work the same way as simply clicking ctrl+p on chrome but it doesnt work
Yes, It's possible, Check the following:
https://github.com/tojocky/node-printer
Related
In an Intraweb (VCL for the web) mobile web application I need to redirect the user to a java webapp. I specify that is a java webapp to stress the fact that it is a completely different thing compared to the intraweb webapp.
I would like to achieve the following behaviour:
the user clicks on a button
the java app opens in the browser and uses it, in particular he uses the mobile keboard to type data
the user taps the phone back button
the intraweb application opens in the browser
In Intraweb as far as I know there are two ways to redirect the user:
Method 1) with WebApplication.GoToUrl(javaAppUrl)
in this way the history is lost so when the user taps on back he is not able to go back to the intraweb application
Method 2) with WebApplication.NewWindow(javaAppUrl)
in this way all seems to work in particular the back button works, but when I try to use the mobile keyboard to type something in the java app the keyboard appears for a moment and then it immediately disappears, I guess this is because somehow NewWindow "Creates a new popup window when executed in the browser context".
NewWindow has also some override methods with different parameters list but no one allows to remove the "popup behavior".
Could you please suggest a way to achieve opening a new webapp in a mobile browser:
keeping the browser history
being able to use the mobile keyboard in the just opened app
?
I use Delphi 10 Seattle, Intraweb 14.2.7 and cgdevtools for the mobile part (cgdevtools anyway plays no role in this issue).
Thank you.
I implemented a workaround by passing in the URL the webapp URL so that in the java URL I display a button that closes the session and redirects the user to the intrawebapp
javaAppUrl:= javaAppUrl + '&BACK_URL=' + WebApplication.FullApplicationURL(WebApplication.Request);
WebApplication.GoToUrl(javaAppUrl);
in this way I have the benefit of GoToUrl (so mobile keyboard works) and I manage to have a back feature with a custom button.
By the way this is still a workaround, I need this since I must release the application, but it is not the perfect solution yet.
I am working with a 3rd party web service to process credit card payments.
When I swipe a credit card via google chrome the payment is detected and processed.
However when I attempt to swipe a credit card via the built in Delphi web browser TChromium, nothing happens.
Can't figure out why its not working are their any settings I need to set on the TChromium browser?
Update
I have verified that that the card reader reads and posts the data to whatever field/component is selected.
One difference I have found with Chrome and the TChromium web browser is that when I process a card in the TChromium web browser it automatically tabs to the next html component after processing the card.. Where this does not happen in Chrome it just stays with the current field/component selected.
The Question title is misleading but only because I did not understand what was happening after some investigation I was able to solve the problem. I hope this answer might come in Handy for someone someday though its a pretty isolated problem.
So I found that the MagTek reader reads the credit card data to the field and then Sends a "Enter" button afterwards.
And the Program I am currently working with has an option where when a Enter Key is pushed it will instead send a Tab so that a user can get to the next fields by the enter key.
So the program was intercepting the MagTek reader initiated enter key and replacing it with a tab which interfered with the payment process.
I have an application built using XPages' mobile controls. On an ipHone the application behaves as I would like in the standard Safari browser. When I take the url and add it to the Home Page as an icon and use the application from there every time an action I take invokes a native application (Maps, Contacts, Phone, attachment viewers etc.) when I switch back to my application I am immediately asked for my userid and password again. Is there a way to control the behavior to not lose the login credentials the same way that the standard Safari application seems to.
This is a limitation in iOS. If you save it to the home page like that it works, but it will NOT multi-task. That's the problem. So it doesn't remember where you were or anything like that.
As David mentions it starts all over again when you switch back.... The problem is not only the credentials - it is also all the information you may have entered or where you have navigated to in the "app".
This is why I am changing to another approach. I am starting to write apps as web-apps that run locally (i.e. cache the ressources and run on the cached versions of the JS-files, CSS and images). Then I implement a localstorage where you can track where in the app you are - and return to that place again. This way you do not need the authentication for running the app - only for synchronizing the information with the server. My approach is to save data locally and sync them to the server (as a sort of replication). This obviously gives more work - but it also gives a better user experience since you can run the "app" without being connected.
I have tried to control the caching locally using a cache.manifest file. This can be done, however, it is a pain. Therefore, I am now using Sencha Touch which really does this nicely.
/John
PS. I think you may be able to handle the login issue by using the XPage Dojo login custom control (http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=Xpages%20Dojo%20Login%20Custom%20Control) - however, it does not solve the issue with reloading the page...
It seems the secret to success here is NOT to tell Safari the XPage is capable of acting as a mobile web app. Add the following code inside for the XPage to ensure this is the case.
<xp:metaData
name="apple-mobile-web-app-capable"
content="no">
</xp:metaData>
Note: You can still provide an icon for the home screen, its just that icon will now act more like a bookmark with the Safari controls and (more importantly) you can switch between applications and when you return to Safari it will display your Xpages app just as you left it.
I am testing on the Android Emulator for now. I had a pre-existing mobile webapp that I put into the src/ directory of a fresh Forge workspace. Everything is working pretty well, but...
When the app goes into the background (in this case on account of me pressing the home button, but could also happen as a result of an incoming phone call) and then I return to it, it's back at index.html, regardless of which page I was on before I went into the background.
Is there a way to have it preserve its state like a real app would?
I have not seen this issue because I use a single .html page app with backbone.js. However, you can possibly try to mitigate this issue by using the event module.
You could "save" the current page in this event:
forge.event.appPaused
Then you could "resume" your page using this event:
forge.event.appResumed
I have this app that has a login screen with fields for username and password. Below the fields there is this 'Forgot password link'. I am testing this app using UIAutomation class. How can I test if, when clicked on that link, the linked page is opened in the browser? I just want to check that when the link is clicked, the browser is opened.
Thanks for any help.
if you make sure that before the UIAutomation clicks the link that the associated default browser is not open then you could just simply see if the process for the given browser is running after the click (perhaps after a wait of a second or so)
I don't think there is a way to do that. Instruments will only allow one target at a time so the script stops when the target is navigated away from.