Saturday, 15 August 2015

Android mobile + Chromecast + LED TV

Chromecast is a flash drive sized device that has wifi capability to get data from your network and display it on TV.

It has a USB port for charging and an HDMI port to connect to the TV. It can be controlled by your device (mobile, desktop or laptop) with the help of a Chromecast app. Except in some cases, your device is just a controller and the data is directly pulled by Chromecast via wifi - so if the device is your mobile, its charge is not used up.

Photo courtesy: Google

Not all apps work with Chromecast. However, there are many apps that do - Chrome browser, Youtube and more.

To sum up, this is what you need:

  • Wi-fi network
  • Chromecast
  • LED TV

Scenarios in which Chromecast is helpful:

  • Big screen is required e.g. watching movies, reading a document
  • You have a mobile, have to type more and are not satisfied with the smaller screen.
  • You have a desktop/laptop but need a second, relaxed position to work

For a wireless setup, use a Bluetooth keyboard with touchpad, or see the FAQ on how to use a wired/wireless USB keyboard.

The Chromecast page has a few short videos on how to setup and use Chromecast.

FAQ


* Which versions of Android are supported?
Android 4.4.2 and later. (Android 4.4 is known as KitKat.)

* If I travel, or don't have a wifi modem, what are the options?
Chromecast can be used if there are two devices - both could be yours, or one could be your mobile and the other a hotel wifi router (configured for device to device communication). For example, see this page and this.

* Can I play files present in the device?
Yes. Drag and drop (or open) a file in a tab in the Chrome browser. Or, use an app like BubbleUPnP.

* Can a USB keyboard be used?
Chromecast does not have a provision to connect a keyboard or a mouse. So connect an OTG microUSB-to-USB cable between your mobile and the keyboard (explained in detail here). If you would like to use a wireless keyboard and mouse, connect an OTG cable to your mobile and connect the wireless receiver to the other end of the cable.

* There's not much privacy if I use my TV, can I use an computer monitor?
Yes. It would be unusual for your monitor to have speakers. Which means an adapter is required to separate HDMI to audio and video (VGA, DVI etc.). Get an adapter based on the type of video input that your monitor accepts - HDMI to DVI, DisplayPort or VGA (first two are better).

* Chromecast Help

Friday, 31 July 2015

How to create a cookie notification for countries in the EU

Sites that use cookies must present a notice about cookies to users from the European Union (EU). Seeing the notice, users should be able to do one or more of the following:

  • Agree and use the site
  • Learn more on what cookies are being used
  • Optionally be able to block these cookies.

If you use the Blogger platform and use cookies only from Google


Google can display the following notice without you having to do anything:
This site uses cookies from Google to deliver its services, and to analyse traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies.

All other sites


  • Modify Google's message, link to a landing page on your site which has links to privacy policies of all entities whose cookies you use. This blog uses this approach. See [2].
  • Forego Google's notice entirely and instead use one of the tools suggested by Google in [1] e.g.  Cookie Consent by SilkTide. You will also have to detect the country of the user.

Testing


  • If you use are on blogger, use a domain that belongs to a country from EU e.g. yaanqing.blogspot.fr (France).
  • If you are on blogger but use a custom domain, see this blog on how to test. Basically, append "prx.gb.teleport.to" without quotes to the domain e.g. custom-blogger-domain.com.prx.gb.teleport.to

Going further


If you stop after doing the above, the user can continue to use the site. However, if you would like to go further, you can also allow the user to block the cookies and still be able to use the site. This has may be done by using a cookie (or a local database) whose only purpose is to say which cookies the user wants! The site's code would then inspect this cookie before using code that creates any cookie.

Reference

  1. Google has a page that explains the above in detail.
  2. The following code links to the Privacy page in this blog. The code and the page are the only things that need to be done.

<!-- code to be inserted just before the end tag for HEAD -->
<script type='text/javascript'>
  cookieOptions = {
    msg: &quot;This site uses cookies from Google to deliver its services, and to analyse traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies.&quot;,
    link: &quot;http://yaanqing.blogspot.com/p/privacy.html&quot;,
    close: &quot;Got it!&quot;,
    learn: &quot;Learn more&quot;
  };
</script>

Wednesday, 1 July 2015

How to view Flash content in browser on Android Lollipop

There are useful websites that still use Flash. For example, take a look at this nice site on Yoga which shows each asana in animation.

Unfortunately, this Flash animation cannot be seen on Chrome for Android. Many web browsers prefer HTML5 and do not support Flash.

However, some browsers like UC and Maxthon can still display Flash content. Though Adobe has discontinued development of Flash, the last released versions of Flash work reasonably well with these browsers. With a supporting browser, and with Flash installed, you can still make use of sites with Flash.

Steps to view Flash content

  • Install UC Browser from Google Play Store. This browser is quite popular and is apparently safe for use.
  • After installation, launch the browser and go to a page that needs Flash - for example, the said site on Yoga.
  • Click on the icon which is displayed in place of the Flash content.
  • The browser will ask you to enable support for installation from an unknown source - it needs to download Flash from Adobe's site and install it. Say OK.
  • When you are returned to the page, check if the Flash animation plays properly.
  • Now disable installation from "unknown sources": Android settings->Security->uncheck Unknown Sources.

Switching easily from browser to app


For users who need a easier way to switch from Chrome to UC Browser when a site needs Flash, the Flashify app may be useful. Normally you copy the URL, open the target app, for example UC or YouTube app, and paste the URL. But with Flashify installed, select the browser's menu and share with Flashify, which suggests suitable apps to open the URL.

Popular posts