Showing posts with label on. Show all posts
Showing posts with label on. Show all posts

Install Ubuntu 15 10 on Windows 10 VirtualBox

| 0 comments |

Ubuntu 15.10 is now available, this video show how to install it on Windows 10 with VirtualBox.


With Addition CD Image installed, we can improve screen resolution and share folder between guest Linux and host running Windows.


This video show how to, and the screen reesolution improved.


To share folder, setup Shared Folder in VirtualBox Setting of the guest, assign a machine folder in host. Then run the command in guest Ubuntu Linux
sudo mount -t vboxsf vbShare mntShare

where:
vbShare is the shared folder in host, and assigned as Shared Folder in VirtualBox Setting of the guest.
mntShare is the folder in guest Ubuntu Linux.




Related:
- Install Ubuntu GNOME 15.10 on Windows 10/VirtualBox

Related features:
- Record screen video of VirtualBox guest OS
- Share Clipboard and DragnDrop between VirtualBox guest Linux and host Windows


Read More..

Install Oracle java8 on Ubuntu 15 10 via PPA

| 0 comments |

To install Oracle java8 on Ubuntu 15.10 via PPA, enter the command:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer



Read More..

Very short review of TOP 3 tablets on the market

| 0 comments |
Yesterday I bought second tablet in my Android carrier - Samsung Galaxy Note 10.1 (N8000). Internet is full of different reviews about this device, so I wont be writing essay about it. What I want to do, is to write about 3 current high-end tablets you can find on the market and why non of them are worth to buy. This concerns: Galaxy Nexus 10, Galaxy Note 10.1 and Asus Transformer Infinity. I will mostly write short pros and cons of each.

Every of these three devices presents different approach of using a tablet:
  1. Galaxy Nexus 10 ---> hand only
  2. Galaxy Note 10.1 --> hand & active pen
  3. Asus Transformer Infinity ---> hand & keyboard dock
Galaxy Nexus 10
The build quality of Nexus 10 is superb. Screen is actually the best on the market. Hardware (CPU, GPU) are top components as well. However, using N10 with only a hand makes this device nothing more then a overgrown phone. You can browse internet, zoom in or zoom out 100 times the same pictures, watch a movie (if you have some battery bank with you), chat with friends etc. You can do all these amazing things... Oh wait... no, you cant! There is no 3G connectivity. So if you are not close to some Wi-Fi hot-spot (you can make one yourself if you have enough mobile data-plan in your smartphone) you can only watch photos, read some e-book or listen to the music. Or you can browse the Internet on your tablet sitting home on the couch with your notebook next to you. I dont know whats so cool in browsing Internet on 10" screen, if you can do it on 15"4 screen as well, with full keyboard and mouse. Lets get back to that hot-spot. Why it sucks? Because now you need 2 battery banks. One for your tablet, and one for your mobile phone.

You might say there are many advanced active pens on the market you can buy and use with your Nexus 10. Sure, you can. Try to make a note having your hand lying on the screen. Its not possible to write anything (at least nothing readable) if there is no software protection against random hand touch (like Samsung has in Note 10.1). So forget about using pen with Nexus 10. Pure Android is not ready yet for active pens.

Pros:
  1. Great screen (2560 x 1600)
  2. Great hardware
  3. Great design
Cons:
  1. No 3G connectivity
  2. Not ready for active pens, so using this device is limited just to entertainment.
Samsung Galaxy Note 10.1

Now... lets be honest. Im not disappointed with this device. But Im also not that excited as I was when I bought my first tablet - Asus Eee Pad Transformer TF101. So whats wrong about it? Its Samsung design, so it feels plastic. And no matter how great and innovatory this plastic will be, it still feels like plastic. Other tablets are plastic too, but when you hold Samsung you feel like holding a cheap plastic. Sorry, its they way I feel. But what is worse, its creaking here and there. Samsung, please! For that price you give us cheap, noisy plastic? Im not saying its creaking a lot. But it shouldnt be creaking at all. Another things is the screen. 1280 x 800 is embarrassing resolution for 101 tablet. This should not happen. Screen quality is just bad. And there is no Gorilla Glass. By the way - S-Pen feels cheap too.

When it comes to connectivity, its one of not many tablets on the market with 3G connection. So if you have a SIM card with at least 2 GB mobile data plan, its a perfect solution to have your tablet connected all the time.

The best thing about this tablet is not S-Pen. Its Samsung software. And trust me - Im a HTC fan so its not easy for me to say that I like anything about Samsung software. But when it comes to using a pen, this is the only tablet on the market with such advanced software for handwriting. There is also great multitasking - you can have active applications on the desktop and work without closing each other. It would take too long to write about all amazing things you can find using this tablet together with S-Pen. If youre looking for a tablet that you can use not only for fun - Note 10.1 its the only right choice.

Pros:
  1. Great active pen (S-Pen)
  2. Amazing software for handwriting and great multitasking features
  3. 3G connectivity
Cons:
  1. Plastic design
  2. Low resolution (1280 x 800)
  3. No Gorilla Glas protection
  4. Cracking body
Asus Transformer Infinity

The last one from the TOP 3. Asus tablets are well known from their keyboard dock stations. What is so great about it? In my opinion - nothing. But lets start from the beginning. Screen in this model is somewhere in between Nexus 10 and Galaxy Note 10.1. It has 1920 x 1200 resolution. Not as good as Nexus 10, but decisively much better than Galaxy Note 10.1. It also has IPS+ panel instead of TFT (guess which one have TFT...?). Also there is 3G connectivity. Of course if you find TF700TG version. So far 3G variant seems to be a ghost version, almost like Nexus 10 in some countries. Build quality is very good, I like the design as well. Again, its between Nexus 10 and Samsung. Not that good as N10, but much better then Note 10.1.

When it comes to software I must say I pretty like it. GUI is not as expanded as HTC Sense or Samsung TouchWiz, but it gives you some more widgets and applications than pure Android (Galaxy Nexus 10).

Now the best part - keyboard. This is the approach I find the most ridiculous. And the useless touchpad is lovely too! Just one question - if you need to write fast on your portable device - why using limited Android with quasi-keyboard is better then using ultrabook with Windows (or Linux) Intel CPU, big SSD drive, HD graphic and 4 GB RAM? If you want to carry 101 tablet with external keyboard, you can get Asus or Samsung ultrabook for the same price. With much more features and power under the hood.

Of course you can buy an active pen. But like I mentioned before in Nexus 10 part, using an active pen without a special software is pointless. It just wont work as you could expect.

Pros:
  1. Good screen (IPS+ 1920 x 1200)
  2. Nice design
  3. Good build quality
Cons:
  1. Almost not possible to find model with 3G
  2. Not ready for active pens, so using this device is limited just to entertainment (if you dont have keyboard dock)
  3. If you actually have keyboard dock, think about functionality of such combo against e.g. HP Envy ultrabook.
Conclusion

As you can see, there is no perfect tablet on the market. At least not for me. Some of them are missing 3G, some of them are not yet ready for handwriting. And if there is a tablet with 3G and great handwriting software, it doesnt look as good as it could. Maybe its time for HTC to show some tablet? We havent seen from HTC anything new with 101 screen since a long time.

So what the best tablet should be and look like?
  1. Galaxy Nexus 10 build quality and design
  2. Wi-Fi and 3G connectivity (additionally variant with LTE instead of 3G)
  3. Samsung handwriting software & S-Pen
  4. IPS+ panel with 2560 x 1600 resolution, covered with Gorilla Glass
  5. Top CPU, GPU and sufficient amount of RAM memory
  6. MicoSD card slot
For such tablet I will pay every price.

At the end, here is some thought - do you think tablets have a chance to survive in a world where more and more ultrabooks and notebooks have touch screens or even rotating screens (like Dell XPS 12, Lenovo ThinkPad Twist) or dual-screen like Asus Taichi.

Do you have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) below this post!


For latest news follow Android Revolution HD on popular social platforms:

Read More..

The first ever Chrome Live Coming to a screen near you on April 22nd

| 0 comments |

Chrome was a big bet when it was introduced six years ago and has since grown to provide a simpler, speedier and safer web for more than 750 million users around the world. Today, Chrome is an integrated hardware and software solution for work that meets the challenges of and innovates upon traditional platforms.


Join us online April 22nd at 10:00am PDT at Chrome Live, our first-ever online event, to hear from Googlers, technical experts and our customers about how Chrome is meeting the needs of a more mobile, social and cloud-oriented workplace. At Chrome Live, you’ll:

  • Have a front-row seat to two keynotes from:
    • Amit Singh, President of Google for Work, who’ll share how Chrome for Work is part of the transformational agenda of many businesses today. He’ll also be announcing a number of new products coming to the Chrome for Work family.
    • Rajen Sheth, Director of Product Management for Chrome for Work, who’ll discuss how devices have revolutionized the way we work. He’ll also uncover a few pathways of our top-secret roadmap and may have a few surprises in store.
    • Learn how the web, meeting technology and digital displays are being reimagined with Chrome for Work product managers Saswat Panigrahi and Vidya Nagarajan
    • See live deployment and management demos by Chrome team experts
    • Hear from IT leaders at Netflix, Pinterest and Chico’s about integrating devices with the cloud and enabling IT admins at top companies to streamline day-to-day operations
    • Get a sneak peek at the team’s plans to continue innovating and addressing new needs in the market

    To be a part of Chrome Live, all you need is a comfortable seat, an Internet connection and a computer, tablet or phone; pants are optional but recommended. You’ll be able to interact with Google experts and ask questions.

    Register now to learn all this and more at the first Chrome Live event on Wednesday, April 22nd at 10:00am PDT. And even if you can’t attend on the scheduled dates, be sure to register to stay up to date on all things Chrome. Feel free to share your thoughts, impressions and questions using #chromelive15 on social media.
    Read More..

    Join us for Education On Air

    | 0 comments |


    (Cross-posted on the Google for Education Blog.)

    Editors note: Educators, read on to learn how you can access new work tools at our free online conference, Education on Air.

    When I was a teacher 15 years ago, I loved my students, teammates and the work, but I wished I could work more closely with other teachers and observe their classrooms. Luckily, technology helps us connect more easily, and educators don’t have to feel isolated. We have tools, many of them free, that allow us to share with each other.

    We’ll put these tools to work on May 8-9, when we host Education On Air, a free online conference about leading for the future and shaping the classroom today. All you need is a web browser and an Internet connection to join from the best seat in the house — your own. Whether you’re a school leader, teacher, administrator, parent, student or just someone who cares about education, we hope you can join us.
    Here’s what we have planned:

    Day 1: Leading the future
    On Friday, May 8 from 10am-3pm EST, hear from educators, students and business leaders on the topic of leadership in education. Short keynotes and panels will help answer the question “how do we prepare our students for a future that is ever-changing?” Topics will include creating student ownership, leading change and fostering innovation in schools.

    Day 2: Shaping the classroom today
    On Saturday, May 9, join any of the 90+ sessions, run by educators for educators and held throughout the day across time zones. These sessions are designed to help you immediately in your school. We’ll have tracks for four groups: teachers, leaders, IT and general interest. Topics will include supporting literacy in early learners, successful device deployment and empowering digital citizens.

    Even if you can’t attend on the scheduled dates, do register to stay informed. We’ll share the conference schedule and list of speakers in April. We’ll also be recording the sessions, so you can check out anything you missed.

    In the meantime, tell us what sessions you want to see by responding to this Tweet or this Google+ post using #GoogleEduOnAir.
    Read More..

    Java code to listing Network Interface Addresses run on Windows 10

    | 0 comments |
    One of the most useful pieces of information you can get from a network interface is the list of IP addresses that are assigned to it. You can obtain this information from a NetworkInterface instance by using one of two methods. The first method, getInetAddresses(), returns an Enumeration of InetAddress. The other method, getInterfaceAddresses(), returns a list of java.net.InterfaceAddress instances. This method is used when you need more information about an interface address beyond its IP address. For example, you might need additional information about the subnet mask and broadcast address when the address is an IPv4 address, and a network prefix length in the case of an IPv6 address. ~ https://docs.oracle.com/javase/tutorial/networking/nifs/listing.html

    The following example program lists all the network interfaces and their addresses on a machine (tested on PC running Windows 10):
    package javalistinetaddress;

    import java.net.InetAddress;
    import java.net.NetworkInterface;
    import java.net.SocketException;
    import java.util.Collections;
    import java.util.Enumeration;

    public class JavaListInetAddress {

    public static void main(String[] args) throws SocketException {
    Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces();
    for (NetworkInterface netint : Collections.list(nets))
    displayInterfaceInformation(netint);
    }

    static void displayInterfaceInformation(NetworkInterface netint) throws SocketException {
    System.out.printf("Display name: %s ", netint.getDisplayName());
    System.out.printf("Name: %s ", netint.getName());
    Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
    for (InetAddress inetAddress : Collections.list(inetAddresses)) {
    System.out.printf("InetAddress: %s ", inetAddress);
    }
    System.out.printf(" ");
    }

    }



    Related:
    - Java code to listing Network Interface Addresses, run on Raspberry Pi/Raspbian Jessie

    Read More..

    Port forwarding on your router a suggested tutorial

    | 0 comments |
    Its a good tutorial explain "How To Forward Ports on Your Router".


    Read More..

    Download and Install JDK8 on Ubuntu 15 10 using update alternatives and also set JAVA HOME

    | 0 comments |

    This post show how to Install JDK8 on Ubuntu 15.10 (running in VirtualBox hosted on Windows 10).

    To download Oracle JDK:
    - visit Java SE Downloads page.
    - Click to download Java Platform (JDK).
    - Accept agreement and sselect download file, jdk-8u65-linux-x64.tar.gz.

    Download and unpack in your local storage. /home/eric/jdk1.8.0_65 folder for me.

    Setup java and javac update-alternatives:
    Run the command:
    $ sudo update-alternatives --install /usr/bin/javac javac /home/eric/jdk1.8.0_65/bin/javac 1
    $ sudo update-alternatives --install /usr/bin/java java /home/eric/jdk1.8.0_65/bin/java 1

    $ sudo update-alternatives --config javac
    $ sudo update-alternatives --config java

    Where /home/eric/jdk1.8.0_65 is the folder of jdk.

    Check the video.


    Set JAVA_HOME also:

    Setup JAVA_HOME and path to JDK on Linux (Ubuntu in this example), edit the file .bashrc
    $ nano .bashrc

    Add the line:
    export JAVA_HOME=<path to jdk>
    export PATH=$JAVA_HOME/bin:$PATH

    Where <path to jdk> is the path to the installed JDK.




    Alternatively, you can install also Install Oracle java8 on Ubuntu 15.10 via PPA.

    Read More..

    Set image on Toolbar

    | 0 comments |
    This post show how to set image on Toolbar:

    Modify from last post "Add OptionsMenu to Toolbar".

    To set background image of Toolbar, edit layout/activity_main.xml to set android:background of <android.support.v7.widget.Toolbar>
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout

    android_layout_width="match_parent"
    android_layout_height="match_parent"
    android_paddingBottom="@dimen/activity_vertical_margin"
    android_paddingLeft="@dimen/activity_horizontal_margin"
    android_paddingRight="@dimen/activity_horizontal_margin"
    android_paddingTop="@dimen/activity_vertical_margin"
    android_orientation="vertical"
    tools_context="com.blogspot.android_er.androidtoolbar.MainActivity">

    <android.support.v7.widget.Toolbar
    android_id="@+id/toolbar"
    android_layout_width="match_parent"
    android_layout_height="56dp"
    android:background="@mipmap/ic_launcher"/>
    <TextView
    android_layout_width="wrap_content"
    android_layout_height="wrap_content"
    android_text="Hello World!" />
    </LinearLayout>



    Another method, add ImageView inside <android.support.v7.widget.Toolbar>
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout

    android_layout_width="match_parent"
    android_layout_height="match_parent"
    android_paddingBottom="@dimen/activity_vertical_margin"
    android_paddingLeft="@dimen/activity_horizontal_margin"
    android_paddingRight="@dimen/activity_horizontal_margin"
    android_paddingTop="@dimen/activity_vertical_margin"
    android_orientation="vertical"
    tools_context="com.blogspot.android_er.androidtoolbar.MainActivity">

    <android.support.v7.widget.Toolbar
    android_id="@+id/toolbar"
    android_layout_width="match_parent"
    android_layout_height="56dp"
    android_background="#FFA000">
    <ImageView
    android_id="@+id/toolbarimage"
    android_layout_width="wrap_content"
    android_layout_height="wrap_content"
    android_src="@mipmap/ic_launcher"/>

    </android.support.v7.widget.Toolbar>
    <TextView
    android_layout_width="wrap_content"
    android_layout_height="wrap_content"
    android_text="Hello World!" />
    </LinearLayout>



    In this examples, also modify menu/menu_main.xml to set all app_showAsAction="ifRoom".
    <?xml version="1.0" encoding="utf-8"?>
    <menu
    >
    <item
    android_id="@+id/menu_camera"
    android_icon="@android:drawable/ic_menu_camera"
    android_orderInCategory="100"
    android_title="camera"
    app_showAsAction="ifRoom"/>
    <item
    android_id="@+id/menu_compass"
    android_icon="@android:drawable/ic_menu_compass"
    android_orderInCategory="100"
    android_title="compass"
    app_showAsAction="ifRoom"/>
    <item
    android_id="@+id/menu_agenda"
    android_icon="@android:drawable/ic_menu_agenda"
    android_orderInCategory="100"
    android_title="agenda"
    app_showAsAction="ifRoom"/>
    <item
    android_id="@+id/menu_gallery"
    android_icon="@android:drawable/ic_menu_gallery"
    android_orderInCategory="100"
    android_title="gallery"
    app_showAsAction="ifRoom"/>
    <item
    android_id="@+id/menu_calendar"
    android_icon="@android:drawable/ic_menu_my_calendar"
    android_orderInCategory="100"
    android_title="calendar"
    app_showAsAction="ifRoom"/>
    </menu>

    Next:
    - Implement checkable items in OptionsMenu of Toolbar

    Read More..

    Converga brings together on site and remote employees virtually with Chromebooks

    | 0 comments |


    Editors note: Today’s guest blogger is Douglas Grgas at Converga, a business process outsourcing company based in Australia, providing digital mailroom, document processing and a variety of other managed services. Converga introduced Chromebooks to ensure better availability of internal services for remote employees, as well as a new platform for office staff.

    When employees are based in many different locations, whether it’s at corporate offices or customer sites, it’s important to make all employees feel connected to headquarters. As a company with over 1,300 resources at more than 150 customer locations, we’ve addressed this challenge firsthand by providing employees with technology to stay in touch. Many of our employees spend the majority of their time at our customers’ offices providing managed services, such as operating mailrooms or converting paper documents to digital versions.

    To bridge the gap between off-site and on-site communications, account managers visited customer sites regularly to communicate with remote employees, and our CEO carried out a roadshow, where he talked about company performance, new customer wins and progress on global objectives, but off-site employees still felt disconnected from central operations on a day-to-day basis.

    Our biggest ongoing challenge with keeping employees connected while at customer sites was having to rely on customers’ devices and networks. Often employees couldn’t access email and the Internet, which resulted in being disconnected from corporate communications and reduced productivity. We wanted everyone to feel connected and productive wherever they were, and to have access to technology that simplified their activities.

    We chose Chrome for Converga because of its simplicity of use and seamless remote management. We liked that Chromebooks are sleek and lightweight like a tablet, but have a keyboard for easy data entry.

    Beyond the device, the central Chrome Device Management service allows easy deployment and controls, device security, network connectivity and integrated apps across Converga’s fleet of Chromebooks, all with the additional benefit of leveraging Google’s Support services.

    Also, since Chromebooks integrate with Citrix XenApp, which virtually delivers existing apps through the Chrome Browser, we don’t have to repurchase or rewrite existing applications.

    Converga has deployed Chromebooks at 50 customer sites across Australia and New Zealand during the past year. We’ve also deployed numerous devices, many utilizing the Citrix XenApp, at our corporate offices.

    Now more than 500 employees have a two-way channel to communicate with headquarters, using a reliable and standard operating environment, which IT can manage remotely. Employees can quickly search for information using Chrome, record notes in Google Docs and communicate with employees at other sites via Hangouts and Google+, all accessible via a simple to use, remotely managed, lightweight device.

    Chromebooks are the foundation that helps our employees connect with each other and senior management. We use our company Google Site, which acts as our intranet, to do everything from feature employees of the month to communicate company perks and share performance metrics. Employees also use the intranet to share updates about customer sites, so the rest of the business can stay connected. For example, around Christmas, our employees post pictures of how their customers have decorated for the holidays. Each time an employee does something related to the Converga tree, a tree that represents our company values, he or she is asked to share the activity with the rest of the community.

    Introducing Chromebooks has supported our goal of making all employees, regardless of their location, feel united. As we continue to introduce new technologies, our employees are more engaged in their work and empowered to share their stories with one another.
    Read More..

    Speakers and sessions for Education on Air

    | 0 comments |


    (Cross-posted on the Google for Education Blog.)

    Last month we announced Education on Air — our free online conference taking place May 8-9, 2015 — and asked what you wanted to hear about. Today we released the schedule of sessions, based largely on what we heard from you. We’ll emphasize innovation — 44% of you voted for this — as well as how to empower students and use Google tools effectively. It was clear from our second poll that you also want practical examples, so our speakers will go beyond theory and share their specific advice for enacting change.


    Here’s a look at what you can expect over the two-day conference:

    Friday, May 8: Leading for the future

    Tune in from 10 a.m. to 3 p.m. ET to hear from educators, business and policy leaders, students and researchers, whose keynotes will challenge you to innovate and improve education. In our kickoff session, panelists will tackle the question “What are the skills of the future?” and will touch upon results from an Economist Intelligence Unit survey. You’ll also hear panels of different perspectives about some hot topics for educators, including how technology is transforming learning and how students are guiding their own learning.

    In addition to these panels, our keynote speakers will share their personal passions for the future of education. You’ll hear from Actor, Education Advocate, and Host of Reading Rainbow LeVar Burton, Google Senior Vice President of People Operations Laszlo Bock, education leader and Order of Canada honoree Michael Fullan, and Sir Michael Barber, chief education advisor to Pearson and former Chief Adviser to the Secretary of State for Education during the first term of British Prime Minister Tony Blair. Educators and school leaders like Ryan Bretag, education researcher and Chief Innovation Officer of Illinois’ District 225, and students like Brittany Wenger (2012 Google Science Fair winner) will also share their perspectives.

    Saturday, May 9: Shaping the classroom today

    Over 100 sessions will be led by educators from 12 countries and 29 U.S. states, all specifically designed to offer practical advice and examples. Whether you’re interested in the track for educators, administrators, IT or “anyone,” we invite you to join for the sessions that are most interesting to you.

    Presenters will discuss tools and techniques that you can implement easily, affordably and immediately. Many sessions highlight how Google tools like Google Apps, Earth, Chromebooks and Android tablets can support learning and help educators save time. Others will relate to themes including collaboration and community, computer science and STEM, creation and creativity, digital citizenship, literacy and professional development.

    Here’s a flavor of the range of sessions:

    • Guy Shearer, Head of IT for the David Ross Education Trust in the UK will lead “Create impact by rolling out Chromebooks across a network of schools” at 8:30 a.m. ET
    • Kim Meldrum, Pedagogical Consultant for the Lester B. Pearson School Board in Canada will lead a session on “Developing literacy with Google Apps” at 11:00 a.m. ET
    • Sean Beavers, Digital Information Specialist at the West Morris Regional High School District will lead "Fostering student genius: empowering student leadership through technology" at 12:15 p.m. ET
    • Tonia Dousay, Assistant Professor at the University of Wyoming will lead a session called “Bringing the maker movement to your classroom” at 12:30 p.m. ET
    • James Sanders, Director of Innovation for the EdTechTeam will lead “How to survive a zombie apocalypse using Google Apps” at 3:00 p.m. ET

    Visit the Education on Air site to see the full line-up of sessions and make sure to register; because even if you can’t join us live, if you register we’ll notify you when the recordings are available to view.

    We hope to “see” you there!
    Read More..

    Quake III on your TV with Cast Remote Display API

    | 0 comments |

    Posted by Leon Nicholls, Developer Programs Engineer and Antonio Fontan, Software Engineer

    At Google I/O 2015 we announced the new Google Cast Remote Display APIs for Android and iOS that make it easy for mobile developers to bring graphically intensive apps or games to Google Cast receivers. Now you can use the powerful GPUs, CPUs and sensors of the mobile device in your pocket to render both a local display and a virtual one to the TV. This dual display model also allows you to design new game experiences for the display on the mobile device to show maps, game pieces and private game information.

    We wanted to show you how easy it is to take an existing high performance game and run it on a Chromecast. So, we decided to port the classic Quake® III Arena open source engine to support Cast Remote Display. We reached out to ID Software and they thought it was a cool idea too. When all was said and done, during our 2015 I/O session “Google Cast Remote Display APIs for Games” we were able to present the game in 720p at 60 fps!

    During the demo we used a wired USB game controller to play the game, but weve also experimented with using the mobile device sensors, a bluetooth controller, a toy gun and even a dance mat as game controllers.

    Since youre probably wondering how you can do this too, heres the details of how we added Cast Remote Display to Quake. The game engine was not modified in any way and the whole process took less than a day with most of our time spent removing UI code not needed for the demo. We started by using an existing source port of Quake III to Android which includes some usage of kwaak3 and ioquake3 source code.

    Next, we registered a Remote Display App ID using the Google Cast SDK Developer Console. There’s no need to write a Cast receiver app as the Remote Display APIs are supported natively by all Google Cast receivers.

    To render the local display, the existing main Activity was converted to an ActionBarActivity. To discover devices and to allow a user to select a Cast device to connect to, we added support for the Cast button using MediaRouteActionProvider. The MediaRouteActionProvider adds a Cast button to the action bar. We then set the MediaRouteSelector for the MediaRouter using the App ID we obtained and added a callback listener using MediaRouter.addCallback. We modified the existing code to display an image bitmap on the local display.

    To render the remote display, we extended CastPresentation and called setContentView with the game’s existing GLSurfaceView instance. Think of the CastPresentation as the Activity for the remote display. The game audio engine was also started at that point.

    Next we created a service extending CastRemoteDisplayLocalService which would then create an instance of our CastPresentation class. The service will manage the remote display even when the local app goes into the background. The service automatically provides a convenient notification to allow the user to dismiss the remote display.

    Then we start our service when the MediaRouter onRouteSelected event is called by using CastRemoteDisplayLocalService.startService and stop the service when the MediaRouter onRouteUnselected event is called by using CastRemoteDisplayLocalService.stopService.

    To see a more detailed description on how to use the Remote Display APIs, read our developer documentation. We have also published a sample app on GitHub that is UX compliant.

    You can download the code that we used for the demo. To run the app you have to compile it using Gradle or Android Studio. You will also need to copy the "baseq3" folder from your Quake III game to the “qiii4a” folder in the root of the SD card of your Android mobile device. Your mobile device needs to have at least Android KitKat and Google Play services version 7.5.71.

    With 17 million Chromecast devices sold and 1.5 billion touches of the Cast button, the opportunity for developers is huge, and it’s simple to add this extra functionality to an existing game. Were eager to see what amazing experiences you create using the Cast Remote Display APIs.

    QUAKE II © 1997 and QUAKE III © 1999 id Software LLC, a ZeniMax Media company. QUAKE is a trademark or registered trademark of id Software LLC in the U.S. and/or other countries. QUAKE game assets used under license from id Software LLC. All Rights Reserved

    QIII4A © 2012 n0n3m4. GNU General Public License.

    Q3E © 2012 n0n3m4. GNU General Public License.

    Read More..

    Currency Converter v1 0 released on Slide ME

    | 0 comments |
    Currency Converter v1.0 is released and is available at this location:


    the application provides real time currency convertion for more than 100 currencies.

    provides the conversion rate of two currencies and the conversion of an amount of money from one currency to another.

    download it for free and tell me what you think.
    Read More..

    New feature on xda developers XDA DevDB

    | 0 comments |
    Recently xda-developers presented new forum feature: Development Database, or DevDB for short.

    Here is a short list of what is actually does:
    • Download manager with an XDA torrent tracker
    • ROMs can have multiple "contributors" who can make changes, add files, etc.
    • Ability to tag ROMs (so they are searchable for users)
    • Screenshot management
    • Ability to reserve up to two posts in your ROM thread (below the first post)
    • ROM reviews
    • Q&A thread association
    • Bug tracker / feature requester
    • ROMs will be flashable directly from DevDB *coming soon*
    • Users can "follow" a ROM and get auto-notified of updates

    Of course its not only about ROMs. Any developer can add f.g. kernel project too.

    What I find interesting so far is the possibilities to write a short reviews and follow the project. Everyone can also contribute by writing some idea for some new feature or submit a bug in a bug tracker.

    If you have free 5 minutes (its how much it takes!) please take a look at this new system and follow my HTC One "project" under this link - follow project (if you are HTC One owner) and leave your review for my HTC One ROM under this link - write a short review.

    The project is currently in beta stage, and number of supported devices is limited to:

    Galaxy S II, III, and 4
    HTC One

    Sony Xperia Tablet Z
    Sony Xperia Z
    Droid DNA
    Nexus 4, 10, 7
    Galaxy Note II

    Personally I think that DevDB is a great idea, however it surely needs some time before users and developers will get used to it.

    Have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) down this post!
    Read More..

    Education on Air

    | 0 comments |


    (Cross-posted on the Google for Education Blog.)

    What do a student in Florida, a special advisor to the Ministry of Education in Finland, a filmmaker, a veteran teacher, and a researcher for the Economist Intelligence Unit have in common? They’re all speakers — just a handful of the 130 — who shared their ideas during Education on Air.

    We wanted to tackle the question of how to help students become digital leaders, and it turns out we weren’t the only ones. More than 53,000 people registered for Education on Air, the free online conference we held last week on May 8 and 9. Educators, parents, students, business people and citizens from 201 countries showed their passion for improving education. The posts on Google+ and the comments on Twitter showed that the messages of the speakers really hit home. For example they often quoted Michael Fullan’s "stop boring students" and Lisa Bodells "change is a choice." Today we wanted to provide some highlights of the event.
    You might imagine it would be difficult to recap the highlights from more than 60 hours of programming, but we noticed a handful of common themes. Speakers and participants seemed to broadly agree about the challenges we face in our education systems, the changes we want to see and the steps we need to take to get there. It feels as if people around the world are joining forces to tackle big issues and achieve their goals together.

    Check out the highlight reel that includes the most prominent themes from the conference:

    • The skills and mindset that will prepare students for the future 
    • The need to let students and teachers learn from failure 
    • The importance of giving students choice and voice 
    • The power of technology to open doors 


    If you missed Education on Air, don’t worry. All the sessions are available on demand, so you can check out any of the keynotes, panel discussions and workshops that you missed. Just like the live conference, you can tune in from anywhere.

    Stay tuned to this blog to get more news from Education on Air, including the “Skills of the Future” research you heard highlighted by Zoe Tabary of the Economist Intelligence Unit. We also want to hear from you. Let us know what you’d like to hear about at our next event. Add your voice in the comments under this tweet and this Google+ post.

    Go ahead, get involved. Anyone can do it — even Gus.










    Read More..

    Interpolator effect on ObjectAnimator

    | 0 comments |

    This post demo various Interpolator effect on ObjectAnimator. You can also download the demo APK, from the link on the bottom.


    MainActivity.java
    package com.blogspot.android_er.androidobjectanimator;

    import android.animation.ObjectAnimator;
    import android.animation.TimeInterpolator;
    import android.os.Bundle;
    import android.support.v4.view.animation.FastOutLinearInInterpolator;
    import android.support.v4.view.animation.FastOutSlowInInterpolator;
    import android.support.v4.view.animation.LinearOutSlowInInterpolator;
    import android.support.v7.app.AppCompatActivity;
    import android.view.View;
    import android.view.animation.AccelerateDecelerateInterpolator;
    import android.view.animation.AccelerateInterpolator;
    import android.view.animation.AnticipateInterpolator;
    import android.view.animation.AnticipateOvershootInterpolator;
    import android.view.animation.BounceInterpolator;
    import android.view.animation.CycleInterpolator;
    import android.view.animation.DecelerateInterpolator;
    import android.view.animation.LinearInterpolator;
    import android.view.animation.OvershootInterpolator;
    import android.widget.Button;
    import android.widget.ImageView;
    import android.widget.LinearLayout;
    import android.widget.Toast;

    public class MainActivity extends AppCompatActivity {

    LinearLayout playGround;
    ImageView image;

    AccelerateDecelerateInterpolator accelerateDecelerateInterpolator;
    AccelerateInterpolator accelerateInterpolator;
    AnticipateInterpolator anticipateInterpolator;
    AnticipateOvershootInterpolator anticipateOvershootInterpolator;
    BounceInterpolator bounceInterpolator;
    CycleInterpolator cycleInterpolator;
    DecelerateInterpolator decelerateInterpolator;
    FastOutLinearInInterpolator fastOutLinearInInterpolator;
    FastOutSlowInInterpolator fastOutSlowInInterpolator;
    LinearInterpolator linearInterpolator;
    LinearOutSlowInInterpolator linearOutSlowInInterpolator;
    OvershootInterpolator overshootInterpolator;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    playGround = (LinearLayout)findViewById(R.id.playground);
    image = (ImageView)findViewById(R.id.image);
    image.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    Toast.makeText(MainActivity.this, "Clicked!", Toast.LENGTH_SHORT).show();
    }
    });

    Button btnNull = (Button)findViewById(R.id.bNull);
    btnNull.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(null);
    }
    });

    Button btnAccelerateDecelerateInterpolator
    = (Button)findViewById(R.id.bAccelerateDecelerateInterpolator);
    btnAccelerateDecelerateInterpolator.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(accelerateDecelerateInterpolator);
    }
    });

    Button btnAccelerateInterpolator = (Button)findViewById(R.id.bAccelerateInterpolator);
    btnAccelerateInterpolator.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(accelerateInterpolator);
    }
    });

    Button btnAnticipateInterpolator = (Button)findViewById(R.id.bAnticipateInterpolator);
    btnAnticipateInterpolator.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(anticipateInterpolator);
    }
    });

    Button btnAnticipateOvershootInterpolator
    = (Button)findViewById(R.id.bAnticipateOvershootInterpolator);
    btnAnticipateOvershootInterpolator.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(anticipateOvershootInterpolator);
    }
    });

    Button btnBounceInterpolator = (Button)findViewById(R.id.bBounceInterpolator);
    btnBounceInterpolator.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(bounceInterpolator);
    }
    });

    Button btnCycleInterpolator = (Button)findViewById(R.id.bCycleInterpolator);
    btnCycleInterpolator.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(cycleInterpolator);
    }
    });

    Button btnDecelerateInterpolator = (Button)findViewById(R.id.bDecelerateInterpolator);
    btnDecelerateInterpolator.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(decelerateInterpolator);
    }
    });

    Button btnFastOutLinearInInterpolator
    = (Button)findViewById(R.id.bFastOutLinearInInterpolator);
    btnFastOutLinearInInterpolator.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(fastOutLinearInInterpolator);
    }
    });

    Button btnFastOutSlowInInterpolator
    = (Button)findViewById(R.id.bFastOutSlowInInterpolator);
    btnFastOutSlowInInterpolator.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(fastOutSlowInInterpolator);
    }
    });

    Button btnLinearInterpolator = (Button)findViewById(R.id.bLinearInterpolator);
    btnLinearInterpolator.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(linearInterpolator);
    }
    });

    Button btnOvershootInterpolator = (Button)findViewById(R.id.bOvershootInterpolator);
    btnOvershootInterpolator.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(overshootInterpolator);
    }
    });

    Button btnLinearOutSlowInInterpolator
    = (Button)findViewById(R.id.bLinearOutSlowInInterpolator);
    btnLinearOutSlowInInterpolator.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    prepareObjectAnimator(linearOutSlowInInterpolator);
    }
    });

    prepareInterpolator();
    }

    private void prepareInterpolator(){
    accelerateDecelerateInterpolator = new AccelerateDecelerateInterpolator();
    accelerateInterpolator = new AccelerateInterpolator();
    anticipateInterpolator = new AnticipateInterpolator();
    anticipateOvershootInterpolator = new AnticipateOvershootInterpolator();
    bounceInterpolator = new BounceInterpolator();
    cycleInterpolator = new CycleInterpolator(2);
    decelerateInterpolator = new DecelerateInterpolator();
    fastOutLinearInInterpolator = new FastOutLinearInInterpolator();
    fastOutSlowInInterpolator = new FastOutSlowInInterpolator();
    linearInterpolator = new LinearInterpolator();
    linearOutSlowInInterpolator = new LinearOutSlowInInterpolator();
    overshootInterpolator = new OvershootInterpolator();
    }

    private void prepareObjectAnimator(TimeInterpolator timeInterpolator){
    //float w = (float)playGround.getWidth();
    float h = (float)playGround.getHeight();
    float propertyStart = 0f;
    float propertyEnd = -(h/2 - (float)image.getHeight()/2);
    String propertyName = "translationY";
    ObjectAnimator objectAnimator
    = ObjectAnimator.ofFloat(image, propertyName, propertyStart, propertyEnd);
    objectAnimator.setDuration(2000);
    objectAnimator.setRepeatCount(1);
    objectAnimator.setRepeatMode(ObjectAnimator.REVERSE);
    objectAnimator.setInterpolator(timeInterpolator);
    objectAnimator.start();
    }
    }


    layout/activity_main.xml
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout

    android_layout_width="match_parent"
    android_layout_height="match_parent"
    android_orientation="horizontal"
    android_padding="16dp"
    tools_context=".MainActivity">

    <LinearLayout
    android_layout_width="0dp"
    android_layout_height="match_parent"
    android_layout_weight="1"
    android_orientation="vertical">

    <TextView
    android_layout_width="wrap_content"
    android_layout_height="wrap_content"
    android_layout_gravity="center_horizontal"
    android_autoLink="web"
    android_text="http://android-er.blogspot.com/"
    android_textStyle="bold" />

    <LinearLayout
    android_id="@+id/playground"
    android_layout_width="match_parent"
    android_layout_height="match_parent"
    android_layout_margin="10dp"
    android_background="#E0E0E0"
    android_gravity="center"
    android_orientation="vertical">

    <ImageView
    android_id="@+id/image"
    android_layout_width="wrap_content"
    android_layout_height="wrap_content"
    android_layout_gravity="center"
    android_src="@mipmap/ic_launcher" />
    </LinearLayout>
    </LinearLayout>

    <ScrollView
    android_layout_width="0dp"
    android_layout_height="match_parent"
    android_layout_weight="1">

    <LinearLayout
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_orientation="vertical">

    <Button
    android_id="@+id/bNull"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="Interpolator = null (LinearInterpolator)"
    android_textAllCaps="false" />

    <Button
    android_id="@+id/bAccelerateDecelerateInterpolator"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="AccelerateDecelerateInterpolator (default)"
    android_textAllCaps="false" />

    <Button
    android_id="@+id/bAccelerateInterpolator"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="AccelerateInterpolator"
    android_textAllCaps="false" />

    <Button
    android_id="@+id/bAnticipateInterpolator"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="AnticipateInterpolator"
    android_textAllCaps="false" />

    <Button
    android_id="@+id/bAnticipateOvershootInterpolator"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="AnticipateOvershootInterpolator"
    android_textAllCaps="false" />

    <Button
    android_id="@+id/bBounceInterpolator"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="BounceInterpolator"
    android_textAllCaps="false" />

    <Button
    android_id="@+id/bCycleInterpolator"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="CycleInterpolator"
    android_textAllCaps="false" />

    <Button
    android_id="@+id/bDecelerateInterpolator"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="DecelerateInterpolator"
    android_textAllCaps="false" />

    <Button
    android_id="@+id/bFastOutLinearInInterpolator"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="FastOutLinearInInterpolator"
    android_textAllCaps="false" />

    <Button
    android_id="@+id/bFastOutSlowInInterpolator"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="FastOutSlowInInterpolator"
    android_textAllCaps="false" />

    <Button
    android_id="@+id/bLinearInterpolator"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="LinearInterpolator"
    android_textAllCaps="false" />

    <Button
    android_id="@+id/bLinearOutSlowInInterpolator"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="LinearOutSlowInInterpolator"
    android_textAllCaps="false" />

    <Button
    android_id="@+id/bOvershootInterpolator"
    android_layout_width="match_parent"
    android_layout_height="wrap_content"
    android_text="OvershootInterpolator"
    android_textAllCaps="false" />

    </LinearLayout>

    </ScrollView>

    </LinearLayout>



    download filesDownload the files (Android Studio Format) .

    download filesDownload the demo APK.


    ~ Old example of Various effect of interpolator in Android Animation

    Read More..

    Optimizing for Bandwidth on Apache and Nginx

    | 0 comments |
    This post originally appeared on Webmaster Central
    by Jeff Kaufman, Make the Web Fast


    Webmaster level: advanced
    Everyone wants to use less bandwidth: hosts want lower bills, mobile users want to stay under their limits, and no one wants to wait for unnecessary bytes. The web is full of opportunities to save bandwidth: pages served without gzip, stylesheets and JavaScript served unminified, and unoptimized images, just to name a few.
    So why isnt the web already optimized for bandwidth? If these savings are good for everyone then why havent they been fixed yet? Mostly its just been too much hassle. Web designers are encouraged to "save for web" when exporting their artwork, but they dont always remember.  JavaScript programmers dont like working with minified code because it makes debugging harder. You can set up a custom pipeline that makes sure each of these optimizations is applied to your site every time as part of your development or deployment process, but thats a lot of work.

    An easy solution for web users is to use an optimizing proxy, like Chromes. When users opt into this service their HTTP traffic goes via Googles proxy, which optimizes their page loads and cuts bandwidth usage by 50%.  While this is great for these users, its limited to people using Chrome who turn the feature on and it cant optimize HTTPS traffic.

    With Optimize for Bandwidth, the PageSpeed team is bringing this same technology to webmasters so that everyone can benefit: users of other browsers, secure sites, desktop users, and site owners who want to bring down their outbound traffic bills. Just install the PageSpeed module on your Apache or Nginx server [1], turn on Optimize for Bandwidth in your configuration, and PageSpeed will do the rest.

    If you later decide youre interested in PageSpeeds more advanced optimizations, from cache extension and inlining to the more aggressive image lazyloading and defer JavaScript, its just a matter of enabling them in your PageSpeed configuration.

    Learn more about installing PageSpeed or enabling Optimize for Bandwidth.

    [1] If youre using a different web server, consider running PageSpeed on an Apache or Nginx proxy.  And its all open source, with porting efforts underway for IIS, ATS, and others.

    Posted by Mano Marks, Google Developer Platform Team
    Read More..

    Install Ubuntu GNOME 15 10 on Windows 10 VirtualBox

    | 0 comments |
    Ubuntu GNOME is an official flavor of Ubuntu, featuring the GNOME desktop environment. This video show how to install Ubuntu GNOME 15.10 on Windows 10 with VirtualBox. (Basically, its same as Install Ubuntu 15.10 on Windows 10/VirtualBox).


    Download Ubuntu GNOME 15.10 and install on VirtualBox.


    Insert Guest Additions CD Image to improve display resolution.


    Create shared folder between guest Ubuntu GNOME 15.10 and host Windows 10.

    To share folder, setup Shared Folder in VirtualBox Setting of the guest, assign a machine folder in host. Then run the command in guest Ubuntu Linux
    $ sudo mount -t vboxsf vbShare mntShare

    where:
    vbShare is the shared folder in host, and assigned as Shared Folder in VirtualBox Setting of the guest.
    mntShare is the folder in guest Ubuntu Linux.


    remark@2015-11-14:
    Starting with version 4.0, VirtualBox can mount shared folders automatically. This post show how to create share folder between host Windows (D:vbShare) and guest Ubuntu Linux (/media/sf_vbShare), and add current user to the vboxsf group.

    Read More..

    Get your students on the same web page instantly

    | 0 comments |
    Posted by Catherine Davis, former 4th grade teacher and Director of Academic Technology at Pilgrim School

    (Cross-posted on the Google for Education Blog.)




    Editors note: Today we’re launching a new Chrome extension, Share to Classroom, which solves a big pain point for teachers: getting all students to the same website during class. The Share to Classroom extension works on any laptop, including Chromebooks, Macs and PCs. Catherine Davis, former 4th grade teacher and Director of Academic Technology at Pilgrim School, piloted the Classroom extension with Mrs. Shorkey’s 3rd grade class, and here she describes her experience using this new extension and the impact on her students.







    Sharing a website with my students is a great way to get them engaged. When we studied South America, I shared a video of Tierra del Fuego, and my students were able to view the coast, hear the wind and see the waves soar. But getting a class full of 4th graders on the same web page is a huge challenge. I typically write the URL on the board, then walk around to help each student who misses a capital or underscore or backslash. My students get frustrated, I get frustrated, and before I know it 10 minutes of precious teaching time is lost.

    So I was thrilled to pilot the Share to Classroom extension. With the extension I can open a website and “push” it to my Google Classroom students, so the page opens immediately on all their devices. Our 3rd graders gasped when we tried it – the webpage instantaneously popped up on all of their screens.
    The new extension lets me engage my students and help them drive their own learning on 1:1 devices at our school. When our 3rd graders were studying Native American culture, I pushed a website to the class so they could research traditional clothing and food. The students aren’t locked to the page I send, and one student navigated from there to an even better site. With the Classroom extension, the student was able to push the new site to me, and I reviewed and pushed to the entire class. She had a boost of confidence when her discovery drove class discussion.
    Using the extension also lets me think on my feet. When discussing pioneers, a brave student raised his hand and asked “What’s a stage coach?” I realized my students hadn’t been exposed to the term. I immediately pulled up a definition and video and pushed it to the class. I also saved the webpage as a draft to post to my other Classroom students later. I could have projected on a screen, but the intimacy of having the webpage on each device allows students to explore on their own, hear clearly and watch repeatedly. It also levels the playing field for ELL and students of different backgrounds so everyone starts literally on the same page.

    As teachers, we never feel we have enough time to do everything we want with our students. The new Share to Classroom extension gives us back those few minutes it takes to get students to the same place and makes learning about investigating, not about navigating.

    *Note: Google Apps admins can install the extension for their entire domain so that it’s easiest for teachers and students to get started. Teachers and students both need the extension in order to push web pages to each other.
    Read More..

    Display StreetViewPanoramaView in DialogFragment when user click on InfoWindow

    | 0 comments |

    Example modify from last example "Detect user click on InfoWindow, by implementing GoogleMap.OnInfoWindowClickListener()", to open DialogFragment with StreetViewPanoramaView when user click on InfoWindow.


    MapsActivity.java
    package com.blogspot.android_er.androidstudiomapapp;

    import android.app.AlertDialog;
    import android.app.Dialog;
    import android.app.DialogFragment;
    import android.app.Fragment;
    import android.app.FragmentTransaction;
    import android.content.DialogInterface;
    import android.content.Intent;
    import android.graphics.drawable.Drawable;
    import android.net.Uri;
    import android.os.Bundle;
    import android.support.v7.app.AppCompatActivity;
    import android.text.InputType;
    import android.view.Menu;
    import android.view.MenuItem;
    import android.view.View;
    import android.widget.EditText;
    import android.widget.ImageView;
    import android.widget.LinearLayout;
    import android.widget.TextView;
    import android.widget.Toast;

    import com.google.android.gms.common.GoogleApiAvailability;
    import com.google.android.gms.maps.CameraUpdateFactory;
    import com.google.android.gms.maps.GoogleMap;
    import com.google.android.gms.maps.OnMapReadyCallback;
    import com.google.android.gms.maps.StreetViewPanoramaOptions;
    import com.google.android.gms.maps.StreetViewPanoramaView;
    import com.google.android.gms.maps.SupportMapFragment;
    import com.google.android.gms.maps.model.LatLng;
    import com.google.android.gms.maps.model.Marker;
    import com.google.android.gms.maps.model.MarkerOptions;

    public class MapsActivity extends AppCompatActivity implements OnMapReadyCallback,
    GoogleMap.OnMapClickListener, GoogleMap.OnMapLongClickListener,
    GoogleMap.OnMarkerDragListener, GoogleMap.InfoWindowAdapter {

    private GoogleMap mMap;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_maps);
    // Obtain the SupportMapFragment and get notified when the map is ready to be used.
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
    .findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);

    }

    /**
    * Manipulates the map once available.
    * This callback is triggered when the map is ready to be used.
    * This is where we can add markers or lines, add listeners or move the camera. In this case,
    * we just add a marker near Sydney, Australia.
    * If Google Play services is not installed on the device, the user will be prompted to install
    * it inside the SupportMapFragment. This method will only be triggered once the user has
    * installed Google Play services and returned to the app.
    */
    @Override
    public void onMapReady(GoogleMap googleMap) {
    mMap = googleMap;
    mMap.setOnMapClickListener(this);
    mMap.setOnMapLongClickListener(this);
    mMap.setOnMarkerDragListener(this);
    mMap.setInfoWindowAdapter(this);
    mMap.setOnInfoWindowClickListener(MyOnInfoWindowClickListener);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return super.onCreateOptionsMenu(menu);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
    case R.id.menu_addmarkers:
    addMarker();
    return true;
    case R.id.maptypeHYBRID:
    if(mMap != null){
    mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
    return true;
    }
    case R.id.maptypeNONE:
    if(mMap != null){
    mMap.setMapType(GoogleMap.MAP_TYPE_NONE);
    return true;
    }
    case R.id.maptypeNORMAL:
    if(mMap != null){
    mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
    return true;
    }
    case R.id.maptypeSATELLITE:
    if(mMap != null){
    mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
    return true;
    }
    case R.id.maptypeTERRAIN:
    if(mMap != null){
    mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);
    return true;
    }
    case R.id.menu_legalnotices:
    String LicenseInfo = GoogleApiAvailability
    .getInstance()
    .getOpenSourceSoftwareLicenseInfo(MapsActivity.this);
    AlertDialog.Builder LicenseDialog =
    new AlertDialog.Builder(MapsActivity.this);
    LicenseDialog.setTitle("Legal Notices");
    LicenseDialog.setMessage(LicenseInfo);
    LicenseDialog.show();
    return true;
    case R.id.menu_about:
    AlertDialog.Builder aboutDialogBuilder =
    new AlertDialog.Builder(MapsActivity.this);
    aboutDialogBuilder.setTitle("About Me")
    .setMessage("http://android-er.blogspot.com");

    aboutDialogBuilder.setPositiveButton("visit",
    new DialogInterface.OnClickListener() {
    @Override
    public void onClick(DialogInterface dialog, int which) {
    String url = "http://android-er.blogspot.com";
    Intent i = new Intent(Intent.ACTION_VIEW);
    i.setData(Uri.parse(url));
    startActivity(i);
    }
    });

    aboutDialogBuilder.setNegativeButton("Dismiss",
    new DialogInterface.OnClickListener() {
    @Override
    public void onClick(DialogInterface dialog, int which) {
    dialog.cancel();
    }
    });

    AlertDialog aboutDialog = aboutDialogBuilder.create();
    aboutDialog.show();

    return true;
    }
    return super.onOptionsItemSelected(item);
    }

    private void addMarker(){
    if(mMap != null){

    //create custom LinearLayout programmatically
    LinearLayout layout = new LinearLayout(MapsActivity.this);
    layout.setLayoutParams(new LinearLayout.LayoutParams(
    LinearLayout.LayoutParams.MATCH_PARENT,
    LinearLayout.LayoutParams.WRAP_CONTENT));
    layout.setOrientation(LinearLayout.VERTICAL);

    final EditText titleField = new EditText(MapsActivity.this);
    titleField.setHint("Title");

    final EditText latField = new EditText(MapsActivity.this);
    latField.setHint("Latitude");
    latField.setInputType(InputType.TYPE_CLASS_NUMBER
    | InputType.TYPE_NUMBER_FLAG_DECIMAL
    | InputType.TYPE_NUMBER_FLAG_SIGNED);

    final EditText lonField = new EditText(MapsActivity.this);
    lonField.setHint("Longitude");
    lonField.setInputType(InputType.TYPE_CLASS_NUMBER
    | InputType.TYPE_NUMBER_FLAG_DECIMAL
    | InputType.TYPE_NUMBER_FLAG_SIGNED);

    layout.addView(titleField);
    layout.addView(latField);
    layout.addView(lonField);

    AlertDialog.Builder builder = new AlertDialog.Builder(this);
    builder.setTitle("Add Marker");
    builder.setView(layout);
    AlertDialog alertDialog = builder.create();

    builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
    @Override
    public void onClick(DialogInterface dialog, int which) {
    boolean parsable = true;
    Double lat = null, lon = null;

    String strLat = latField.getText().toString();
    String strLon = lonField.getText().toString();
    String strTitle = titleField.getText().toString();

    try{
    lat = Double.parseDouble(strLat);
    }catch (NumberFormatException ex){
    parsable = false;
    Toast.makeText(MapsActivity.this,
    "Latitude does not contain a parsable double",
    Toast.LENGTH_LONG).show();
    }

    try{
    lon = Double.parseDouble(strLon);
    }catch (NumberFormatException ex){
    parsable = false;
    Toast.makeText(MapsActivity.this,
    "Longitude does not contain a parsable double",
    Toast.LENGTH_LONG).show();
    }

    if(parsable){

    LatLng targetLatLng = new LatLng(lat, lon);
    MarkerOptions markerOptions =
    new MarkerOptions().position(targetLatLng).title(strTitle);

    markerOptions.draggable(true);

    mMap.addMarker(markerOptions);
    mMap.moveCamera(CameraUpdateFactory.newLatLng(targetLatLng));

    }
    }
    });
    builder.setNegativeButton("Cancel", null);

    builder.show();
    }else{
    Toast.makeText(MapsActivity.this, "Map not ready", Toast.LENGTH_LONG).show();
    }
    }

    @Override
    public void onMapClick(LatLng latLng) {
    Toast.makeText(MapsActivity.this,
    "onMapClick: " + latLng.latitude + " : " + latLng.longitude,
    Toast.LENGTH_LONG).show();
    }

    @Override
    public void onMapLongClick(LatLng latLng) {
    Toast.makeText(MapsActivity.this,
    "onMapLongClick: " + latLng.latitude + " : " + latLng.longitude,
    Toast.LENGTH_LONG).show();

    //Add marker on LongClick position
    MarkerOptions markerOptions =
    new MarkerOptions().position(latLng).title(latLng.toString());
    markerOptions.draggable(true);

    mMap.addMarker(markerOptions);
    }


    @Override
    public void onMarkerDragStart(Marker marker) {
    marker.setTitle(marker.getPosition().toString());
    marker.showInfoWindow();
    marker.setAlpha(0.5f);
    }

    @Override
    public void onMarkerDrag(Marker marker) {
    marker.setTitle(marker.getPosition().toString());
    marker.showInfoWindow();
    marker.setAlpha(0.5f);
    }

    @Override
    public void onMarkerDragEnd(Marker marker) {
    marker.setTitle(marker.getPosition().toString());
    marker.showInfoWindow();
    marker.setAlpha(1.0f);
    }

    @Override
    public View getInfoWindow(Marker marker) {
    return null;
    //return prepareInfoView(marker);
    }

    @Override
    public View getInfoContents(Marker marker) {
    //return null;
    return prepareInfoView(marker);

    }

    private View prepareInfoView(Marker marker){
    //prepare InfoView programmatically
    LinearLayout infoView = new LinearLayout(MapsActivity.this);
    LinearLayout.LayoutParams infoViewParams = new LinearLayout.LayoutParams(
    LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
    infoView.setOrientation(LinearLayout.HORIZONTAL);
    infoView.setLayoutParams(infoViewParams);

    ImageView infoImageView = new ImageView(MapsActivity.this);
    //Drawable drawable = getResources().getDrawable(R.mipmap.ic_launcher);
    Drawable drawable = getResources().getDrawable(android.R.drawable.ic_dialog_map);
    infoImageView.setImageDrawable(drawable);
    infoView.addView(infoImageView);

    LinearLayout subInfoView = new LinearLayout(MapsActivity.this);
    LinearLayout.LayoutParams subInfoViewParams = new LinearLayout.LayoutParams(
    LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
    subInfoView.setOrientation(LinearLayout.VERTICAL);
    subInfoView.setLayoutParams(subInfoViewParams);

    TextView subInfoLat = new TextView(MapsActivity.this);
    subInfoLat.setText("Lat: " + marker.getPosition().latitude);
    TextView subInfoLnt = new TextView(MapsActivity.this);
    subInfoLnt.setText("Lnt: " + marker.getPosition().longitude);
    subInfoView.addView(subInfoLat);
    subInfoView.addView(subInfoLnt);
    infoView.addView(subInfoView);

    return infoView;
    }

    GoogleMap.OnInfoWindowClickListener MyOnInfoWindowClickListener
    = new GoogleMap.OnInfoWindowClickListener(){
    @Override
    public void onInfoWindowClick(Marker marker) {
    Toast.makeText(MapsActivity.this,
    "onInfoWindowClick(): " +
    marker.getPosition().latitude + " " +
    marker.getPosition().longitude,
    Toast.LENGTH_LONG).show();

    showStreetViewDialog(marker.getPosition());
    }
    };

    private void showStreetViewDialog(LatLng pos){
    FragmentTransaction ft = getFragmentManager().beginTransaction();
    Fragment prev = getFragmentManager().findFragmentByTag("streetview");
    if (prev != null) {
    ft.remove(prev);
    }
    ft.addToBackStack(null);

    DialogFragment newFragment = StrretViewDialogFragment.newInstance(pos);
    newFragment.show(ft, "streetview");
    }


    public static class StrretViewDialogFragment extends DialogFragment {

    LatLng latLng;

    static StrretViewDialogFragment newInstance(LatLng latLng) {
    StrretViewDialogFragment f = new StrretViewDialogFragment();

    Bundle args = new Bundle();
    args.putDouble("latitude", latLng.latitude);
    args.putDouble("longitude", latLng.longitude);
    f.setArguments(args);

    return f;
    }

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
    latLng = new LatLng(getArguments().getDouble("latitude"),
    getArguments().getDouble("longitude"));

    LinearLayout layout = new LinearLayout(getActivity());
    layout.setLayoutParams(new LinearLayout.LayoutParams(
    LinearLayout.LayoutParams.MATCH_PARENT,
    LinearLayout.LayoutParams.MATCH_PARENT));
    layout.setOrientation(LinearLayout.VERTICAL);

    StreetViewPanoramaOptions options=new StreetViewPanoramaOptions();
    options.position(latLng);
    StreetViewPanoramaView streetViewPanoramaView =
    new StreetViewPanoramaView(getActivity(), options);
    streetViewPanoramaView.setLayoutParams(
    new LinearLayout.LayoutParams(
    LinearLayout.LayoutParams.MATCH_PARENT,
    LinearLayout.LayoutParams.MATCH_PARENT));
    streetViewPanoramaView.setPadding(5, 5, 5, 5);
    streetViewPanoramaView.onCreate(savedInstanceState);

    layout.addView(streetViewPanoramaView);

    return new AlertDialog.Builder(getActivity())
    .setTitle(latLng.latitude + " : " + latLng.longitude)
    .setPositiveButton("OK", null)
    .setView(layout)
    .create();
    }
    }


    }


    reference: https://developers.google.com/android/reference/com/google/android/gms/maps/StreetViewPanoramaView


    ~ Step-by-step of Android Google Maps Activity using Google Maps Android API v2, on Android Studio

    Read More..