Intent, hooks, API, integration, dozen of cryptic javascripts, xml schemas, URL interpreters, helpers, frameworks...
It's 3 days that i'm reading blogs, SDK, tutorials to achive a very simple goal: open Instagram by clicking an URL in the Android browser. I find it a bit incredible that i needed 5 minutes to make it on iOS. I don't even know what code i should share since i don't even succeded in having an error... at least it would be something!
To make it short i have an Android phone. I open the browser to visit my website. Now i want to add a link to open Instagram camera. On iOS i simply reference to:
Open Instagram
Take a picture
Is it really that hard to code the same thing on Android? I'm not looking to make it inside another App. It's just a normal website.
After a lot of researches and tests - yeah, even more :S - i can finally state that it's not possible unless you want to force your visitors to manually download additional contents. I don't like it. It isn't an elegant and easy solution.
Please notice that i'm only talking for websites. You you are developing an App you can achive this quite easily with intents.
Related
I would like to know if there is any solution to lock the screen print, and if possible the screen recording (although I find it difficult), from a progressive web app.
Some mobile applications have this functionality, however I would like to know the possibility of this in progressive web apps, without installation.
Grateful!
This is not possible in a web app at the moment. You have maybe found out already, but already a lot of people asked this and it is simply not possible. In a native Android/iOS app you can catch this behaviour but the browser can't.
Here are some resources that talk about this, some have glitchy tricks to do this but it's never screenshot proof :
What are the ways to prevent users to take screenshot of a webpage?
How do i prevent from printscreen of my webpage?
How can I disable print-screen functionality for a webpage in all browsers?
One tip that maybe sounds obvious, just don't put things on the internet you don't want to be saved, or whatever you are trying to protect your content from.
If you want to prevent copy-paste that's possible, but not what the question is about.
I've seen the "How to link to chrome extension like Chrome Web Store?" question from Oct. 2011, and I tried to implement it.
However, I realized after some testing that the approach described in answer to that question regarding Inline Installation only works in situations where the original developer of the extension links to his own creation in the Chrome Web Store.
I have a daily podcast that I post to my website, and I want to provide a one-click link for Chrome users to click in order to install The RSS Aggregator extension (which I did NOT develop) directly, so that desktop visitors using Chrome can view my podcast feed in a formatted page rather than just seeing XML code.
Since I'm not the original creator of The RSS Aggregator extension, I don't see a way for me to accomplish this.
For the moment, I'm sending visitors to the Chrome Web Store to install it there, but I've been getting feedback from tech-averse visitors that they can't figure out how to install it without step-by-step installation instructions. Sadly, there are still a lot of people out there who have trouble handling something as simple as adding an extension to their Chrome browsers.
Hence my desire to provide a one-click solution on my site.
Is there a way I can implement a solution on my site?
Never used it before, but maybe this helps you:
https://developer.chrome.com/webstore/inline_installation#cws-link
Can you help me give a library that have notification feature like on Web Slack and Web Skype that can notify user even if he/she is not on your site page.
Thanks, sorry for the title I dont know what type of notification this is.
This is either a chrome extension or a native app, a browser window can't normally access other windows
Their documentation sucks, I would recommend just searching around stack overflow
https://developer.chrome.com/extensions/api_index
https://developer.chrome.com/extensions/tabs
If, by the chance this is actually a new thing, it would be called a web-worker, which is a long running process behind the scenes. Likely, it's a background script which uses some chrome API
I know this question was asked ages ago, but this turned up when I googled a similar question. So thought I would share the correct links...
The official documentation for this is:
Chrome
https://developers.google.com/web/fundamentals/push-notifications/
Safari
https://developer.apple.com/notifications/safari-push-notifications/
Firefox
https://developer.mozilla.org/en-US/docs/Web/API/Push_API
I have a simple script from AccuWeather to display a weather button on my website:
I love the simple way this button displays. It's perfect for what I want.
However, the button generated is in Adobe Flash format (swf) and doesn't display on most mobile devices since iOS and Windows Phone have no support and Flash Player for Android is no longer available for download from the Google Play app store.
I thought I found a solution in an Open Source project called Smokescreen that has its development area at Github.
I don't need this to reproduce flash movies. All I need is a simple javascript-based conversion of the flash button to a flat image that can be displayed in any browser that can execute javascript, which includes mobile devices.
But the documentation and description of how to use Smokescreen at their GitHub site is minimal at best, and I'm not a javascript expert and cannot get it working.
The call I am making that obtains the Flash image from AccuWeather is:
<script src='http://netweather.accuweather.com/adcbin/netweather_v2/netweatherV2ex.asp
?partner=netweather&tStyle=whteYell&logo=0&zipcode=NAM|CA|MB|WINNIPEG|
&lang=eng&size=7&theme=blue&metric=1&target=_self'>
</script>
Can anyone tell me what the javascript would be to use Smokescreen to display the flash image produced by the above code as an image.
If Smokescreen can't do it, is there any other method that can do this live on a webpage?
Just tested smokescreen with the SWF of the page you posted, and it doesn't work, you will need to parse the SWF at server side if you still want to use that site.
I opened the dev console and tracked down the SWF from the iframe
copied the file into my computer, then
cloned the github repo and
edited the player.html (from the github repo), line 13 to point to the file I downloaded.
This is the SWF I downloaded: http://netwx.accuweather.com/netWx-V212.swf?zipcode=46958
Edit: this is the error message I got from the dev console:
TypeError: this.defineEditText is not a function [loader.js:136](https://github.com/cesmoak/smokescreen/blob/master/src/player/loader.js#L136)
My system asks for permission to allow the SWF to connect to netwx.accuweather.com.
A quick search on github reveals some nice pure javascript alternatives.
https://github.com/search?l=JavaScript&q=weather&ref=searchresults&type=Repositories
I think this one looks the most promising: http://simpleweatherjs.com/
This simpleweatherjs demo shows a nice icon as well: http://codepen.io/fleeting/pen/wHism
unfortunately there is no way your javascript can handle swf, espacially on mobile devices like whith ios or windows phone since the javascript is running on your device itself.
all you could try is to use swfobject which is described as a workaround for javascript
here is the documentation of swfobject
Have you considered using a headless browser like phantomjs? You could use something like Selenium instead for out-of-the-box plugin support, but there are headless options for Flash.
The beauty of such software is that it can automate any user task (that's why it's used for testing). Like logging onto a site and performing a search that would normally not be available externally because of antiforgery tokens. Or checking if a product's price has changed by seeing if its DOM element value's has changed. Or accessing your online banking to see if your balance is a prime number and rendering your credit card bill in fractal form.
I mean, if you want to go this far for a weather widget, you probably have power user needs :)
...also Accuweather seems to do a fairly similar mobile-friendly version. And if it's not 100% the same, you could always ask.
Edit: check their T&C, the mobile-friendly snippet might actually be the only option for legal reasons.
I'm currently developing an online learning tool in which users can post links to websites and other users can come along and like or dislike them (adding 1 or deducting 1 to its rating)
At present I'm currently using javascript to create a bookmarklet that once clicked pops up a bar in which users can like or dislike the URL. As expected there are many problems with using this technique; most notable the hassle of having to add the specific javascript into a bookmark.
What I need is a better solution to displaying the like/dislike bar. I was thinking browser extension but that would involve having to code multiple extensions for each different browser. I also considered loading the link within an iframe embedded in the page but iframes are depreciated so I didn't really want to use them.
Wnat I'm wondering is if anyone has any better ideas as to how to display the like bar on the given URLs without users having to go through complicated or annoying installation processes.
Any suggestions will be greatly appreciated!
Thanks
As you pointed out, there are three possible solutions:
1. Websites embed your code voluntarily
This happens with very populare social bookmarking tools only.
Your small service (no pun intented) won't get the market share that people will run after you, so you can forget it.
2. A browser extension
The major players do that: Alexa, Google, Yahoo all provide their own browser extension.
The big advantage is that it gives the best user experience.
It has several downsides:
You need to provide one extension for each browser on each operating system
The user needs to install it, sometimes requiring admin rights. Not all users have that
You probably don't have the man power to develop them
3. A bookmarklet
Works cross browsers
Written in a language you already know (Javascript)
Easy to "install"
There just are no other options for you than to use the bookmarklet.
You should use a script that takes your javascript and packs it into a bookmark. Doing that by hand every time you change something is too chumbersome and you lose joy.