Copy to Clipboard on hybrid apps and browsers - clipboard

I'm coding with ionic framework and ngCordova and targeting to both mobile devices and browsers.
When the user presses a button I want to copy text to the clipboard.
I'm aware that ngCordova is mainly for mobile devices, but is there a way to run the same code for the purpose above on both platforms without also using zeroClipboard and ngClip?
Cheers

No. Because browsers has limits on clipboard use from JavaScript as a fundamental security measure. There is no way around this except utilities such as zeroClipboard.

Related

Joomla mobile template testing

Joomla automagically recognises the mobile template and displays it on the mobile devices. but sometimes it does not display(very rarely) and also sometimes the behaviour is different(like logo disappearing).
Question:
1) Is there a way we can test the mobile template on the desktop computers (like m.mobilesite.com) so that we can debug the issue?
Yes You can,
The http://www.browserstack.com sites Provide a real machine for testing the device and browser compactability.(It a remote machine so the result is 100%).This required signup.
Also you can check iphone and ipad compactabilty with safari Developer option.
From Settings->Preference ->Advanced ->check the Show Develop menu option.
Now you will get a new menu in the browser Developer there you can choose the user agent.
You can also find several sites that provide mobile testing but those are not 100% sure
like iphone4simulator.com, iphonetester.com
Hope this may help you..
I also found that - If you decrease your browser width and height - it will display mobile format. I am not sure if this is a feature of later versions of joomla. Also on Chrome - developer tools, there is an option to choose the mobile device to test the webpage.

Remote Screen Sharing in realtime like SharedView, TeamViewer

What technologies would I need to know to write an app like the now defunct Microsoft SharedView or something like TeamViewer? Any way to do it with a browser and not need a client app?
I'm a .NET developer, but figure I'd need to know C++ or driver stuff?
How would you stream the users desktop to another user? How do you even capture it in realtime?
I can imagine how you could take screenshots of the desktop and transfer them, but how do you capture live video of the screen of application and stream it to another user.
There are many apps that do this: Skype, GotoMeeting, TeamViewer, SharedView, Citrix, logmein, etc. but I'd like to write my own.
How would I get this to work on Windows, tablets, droids, etc...?
The browser seems to be a good platform for this, but there are some limitations
1 - flash doesn't work at all on IOS, and is not widely available on android.
2- Webrtc works with chrome, firefox and opera on mac/pc/linux, and with firefox/chrome on android. There's librairies to use webrtc from an IOS native app(in objective C). Screen Sharing on the other hand only works with chrome (pc/mac/linux). There's a work in progress in firefox.
3- Installation of browser plugins will be hard if not impossible on various platforms, but it can open some possibility : on chrome and firefox you can make them with javascript. For example a javascript extention can share a tab in chrome.
Using javascript you can stream from a desktop to any other desktop / android.

USB Key for Mac & Windows to Autoload Content?

I'm looking to find out a clean method of deploying a USB key to a customer, that once inserted into the computer (both Mac and Windows), will auto load a respective "thing".
The "thing" could be either an application, a PDF, a splash page (html) in a web browser (system default browser), or potentially an AIR application. The problem with AIR is that I'd need the user to install AIR potentially. Since AIR is platform independent, that could work out pretty well I'd think.
I have established what will be my windows autorun.inf, to load up either AIR, or a portable browser with the splash page. And on the Mac, the user will get a folder (with a graphic background) and a link to launch the page (in a browser, or the portable browser all together). I'm looking for best practices for something like this ultimately.
Autorun isn't generally possible anymore because of the negative security implications.
You're better off making sure that your disk image is set to open a finder window on load, and that the background encourages people to (manually) run your content.
A similar option to an AIR app, but with even less overhead, are Flash projectors. They have fewer features, but are portable and lightweight.

Will asp.net mvc web site created using HTML5 work "out of the box" on mobile devices

i am building a new web site using asp.net mvc3 web application ,, and i found some free HTML5 templates in the web which i can add to my _layout view in my mvc3 web application. i read that HTML5 is able to automatically adapt to the screen size of any devices .
So does this mean that incase i use HTML5 inside my layout view , then my web site can be accessed using different mobile devices and the layout of my web site will automatically adapt to the screen size of the mobile devices?
BR
Not so simple. You need to contend with
Big variety of mobile devices. Some support HTML5, some partially support it and some don't support it at all.
Even if a mobile device does support HTML5, a mobile screen is a lot smaller than a desktop so it may not be able to rearrange the view properly.
How a user interacts with a mobile web app is quite different to a desktop web app, so even if it did rearrange the view properly the user experience could be crap.
A mobile user may be connecting over a low bandwidth connection. What size are your web pages, and are they suitable for distribution over 2g, 2.5g or 3g ?
Well, no, not always. HTML 5 is a very broad term and there are many devices. There is no real guarantee that something you write in any version of HTML 5 will show up as you want it in every browser except via testing it and experience from testing.
That said, I think you are referring to CSS media queries, which are not really related to ASP.NET MVC 3 or HTML 5. From the caniuse site here, you can get an idea of which browsers support media queries.
If you use CSS 3 media queries properly, and the browsers which you are targeting support the feature, then the answer to your question will be yes.
Nothing works automatically but I'd give it a guarded "maybe". The MVC3 sites I've developed work well on iPhone, iPad, Android and Windows Phone. For example link
Still needs to be valid HTML5, so I'd suggest using a validator though.
Screen size adaptation isn't a particular feature of HTML5 per se, it's a feature of a competent fluid design with HTML and CSS.
They should work out of the box on mobile devices (in the original iPhone demo, Steve Jobs showed how the iPhone did a good job of rendering existing websites), but there won’t be any automatic adaptation to screen size beyond what HTML already provides.
As far as HTML goes, <meta name="viewport"> can go a long way towards helping your site’s layout on Mobile WebKit-based devices (which is all iPhones, and I believe all Android devices). See e.g.
https://developer.mozilla.org/en/Mobile/Viewport_meta_tag
http://developer.apple.com/library/IOs/#documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html.

Do XUL applications work only on Firefox

I've seen an XUL-based application recently that supposedly works on the desktop. Isn't XUL the Firefox language? I thought it wouldn't work on anything other that Firefox and certainly wouldn't work as a desktop application.
Can someone who knows more about XUL confirm its compatibility with other browsers (IE, Chrome, etc.) and if it runs as a desktop application, its compatibility with operating systems (Windows, Mac, Linux)
check out http://en.wikipedia.org/wiki/XULRunner. it was created to run xul applications like firefox. songbird is also based in XUL. for more detail see this SO question.
to actually answer the real question, yes, desktop apps can be built in xul, as firefox is. the wiki page i linked to even points to a video game being built using it. at its core its just another application framework.
XUL is a descriptive language for UI used in Firefox but also used in other mozilla apps, like Thunderbird for example
There is a projet named Xul Runner which allow using XUL for desktop apps (see Pencil for example).
AFAIK, all Mozilla apps are compatible with Windows, Mac, Linux and other system for some.
XUL is a user interface language. It was created originally for mozilla/firefox, but is also used by thunderbird.
The Gecko layout engine is what renders XUL and any application that uses this engine can be built with it. See XUL Runner.
The layout engine has been written with cross platform concerns, so it runs on Windows, Linux and Macs.
XUL only works on xulrunner, and Firefox is built on top of xulrunner. Other applications are built on xulrunner (e.g. Thunderbird). You can also build applications on top of xulrunner.

Resources