Robot Unicorn Attack 3 – [adult swim]

[adult swim] - Robot Unicorn Attack 3  artwork

Robot Unicorn Attack 3

[adult swim]

Genre: Games

Release Date: April 27, 2017

*** PLEASE NOTE: For the best gameplay experience, iPhone 6S+ and iPad Air 2 and newer devices are recommended.

Behold mobile gaming's glorious return to glitter-clad annihilation in Robot Unicorn Attack 3! Dash through the sparkling stars; this time with a team of three runners at your fingertips. Gallop into the unending beyond, crashing through golden fairies to unleash Radiant Blast Mode. Build your citadel from the tears of failures past and construct stables to house ever more dazzling allies. Send your magnificent fleet forth on raids to collect gleaming piles of soul crystals. Recycle these unfortunate souls at mystical forges to conjure new unicorns and fuel your unstoppable glitzkrieg!

-Choose a team of three runners that gallop to an explosive demise
-Collect tears to build and power a mighty citadel in your likeness
-Melt down unwanted unicorns to upgrade your runners
-Send stabled unicorns on raids for rare rewards
-Participate in long-term events for mountains of loot
-Summon rare and legendary unicorns from one of three celestial forges

© © & ™ Cartoon Network (s17)

Source: Apple

Your twirling, dancing, arts-appreciating Google Assistant

Ok Google, when is International Dance Day?

It’s tomorrow! So grab your dancing shoes—the Google Assistant is your new partner. Here’s how it can help you get in the spirit of International Dance Day:


  • Practice makes perfect! Ask your Assistant on Android phones to “show me a video of a fouetté.”
  • Those who can’t dance can become dance history buffs. Ask your Assistant on Google Home “who was the founder of ballet?”
  • If you’re looking to learn new dance moves—ask your Assistant on Android phones “how do you do the Nae Nae?”
  • Get in the spirit with the right music—ask your Assistant on Google Home to “play some samba.”
  • Dust off your history books and ask your Assistant in Google Allo “when was the Lindy Hop popular?”
  • Or answer that burning question you’ve always been wondering about—ask your Assistant “can you dance?” (who wouldn’t want to be a part of the world’s longest conga line?)

Whether you want to hone your dancing skills with some practice or leave it to the experts by watching a video, your Google Assistant can help. We’ll see you on the dance floor.

Source: Google

The Beam Machine

A Retrospective

In late 2016, the Windows Insider team did something new. We hosted a real-time Webcast. While the concept of a webcast is not new, this was the first one for us. We hosted it during the development cycle for the Creator’s update and we timed it with the first Bug Bash. It was a small but fun session and we immediately knew it was something we’d want to do again. When the second Bug Bash for the Windows 10 Creators Update occurred in February of this year, we hosted two more webcast sessions. Each session was a success and brought in more Insiders from around the world. The webcasts provided an opportunity to chat directly with, for Insiders to chat with one other, and to have a little face-to-face time with some of the Microsoft employees they engage with frequently on social media.

As with anything new, there were some growing pains. The webcast sessions were fun and engaging, but the broadcast itself was a bit rough around the edges. There were a few technical difficulties with the streaming software, the PC hosting the video stream was a bit underpowered, and Insiders reported the video quality as being sub-par. Although the general feedback about the webcasts was positive, we knew we could make some improvements and provide a better experience.

What to do?

Insider feedback in-hand, it was time to make a few changes, but where to start? The easy thing to tackle was the video quality. We used a small lower-resolution webcam for the original webcasts, so making a change here was straight-forward. To enhance this part of the webcast experience, we acquired a Logitech BRIO 4k webcam. It is the first 4k consumer webcam and during our internal testing with it, it provides a huge leap in video quality compared to our previous hardware.

The Logitech Brio

The Logitech Brio

The Logitech Brio

Next up for review was the broadcasting software.  Our first broadcasts were run using OBS Studio with FTL.  This software was simple to set up and configure and was easy to become familiar with for our webcasts. Knowing we wanted to get progressively “fancier” over the course of time, we posed some questions to the web community and to our partners on the Beam team as to what the best software out there is and were pointed to XSplit Broadcaster. While we haven’t hosted a webcast using this new software, it does look like it will allow us to achieve some of our future goals with providing higher quality webcasts.

Having tackled two of the three important aspects of the webcast, it was time to overhaul the computer being used to host the broadcast. That brings us to the birth of the #BeamMachine.

The #BeamMachine

How do you start a new PC build?  If you could pick out the parts and build to your own specifications, what hardware would you choose? The core of any new PC builds comes down to two key questions: what is your budget, and do you want an Intel or AMD based setup? Our focus for this build was video streaming, a function that is CPU intensive and is good to support with the proper RAM.  We weren’t building a gaming rig, so we didn’t need the most cutting edge graphics card. The rest of the core components would fall into place as we compiled our parts list.

Wanting to build a solid machine that would be somewhat future-proof, we chatted with some partner teams and set our build expectations. As much fun as it is to spend money on new computers, we have budgets too! Being the figurative core of the new build, the first part up for consideration was the CPU.  Intel has a reputation for being the fastest and most cutting-edge, but that performance comes at a price. Comparatively, AMD recently released their new Ryzen series processor and the initial reviews on performance were promising. Keeping our budget in mind, the new Ryzen chipset was now the focal point of the build. The difference between the 1700x and the faster 1800x was $100, so we decided to splurge a bit and go for the faster version.

The AMD Ryzen 7 1800x Processor

The AMD Ryzen 7 1800x Processor

Having settled on a processor, the rest of the #BeamMachine build fell into place quickly. Being a first-generation processor, the list of compatible motherboards was somewhat limited, but thankfully some of the better-known OEMs have already been working on their supporting hardware. Given our timeline for the build, general availability, and MSI’s reputation for ease of setting over-clocking configurations, the new X370 Gaming Pro Carbon motherboard rose to the top of our build list.

MSI’s X370 Gaming Pro Carbon

MSI’s X370 Gaming Pro Carbon

Next up was RAM and the choices were bountiful. Honestly there were more options than we could sort through. There’s a lot to take into consideration though. What speed RAM do you want? Are you going to over-clock it?  What’s the performance vs. cost ratio?  I personally have had great past experiences with G.Skill RAM and overclocking and quickly settled on a choice.

G.Skill Trident Z RGB RAM

G.Skill Trident Z RGB RAM

Next on the list was graphics.  As mentioned before, we didn’t need the most powerful graphics card out there since it’s not vital to the streaming experience. Knowing this wouldn’t be a constraint, there were plenty of options to select from. Hard drive capability was another important factor if we were going to record the video streams, so we made sure to put a high-quality solid-state drive (SSD) on the build list.

Samsung 960 EVO M.2 NVMe SSD

Samsung 960 EVO M.2 NVMe SSD

At this point we were down to the finishing components. We needed to top off the build with a quality power supply, a case that would show off the internal components, and we made the decision to add a closed-loop liquid cooling system (because hey, why not!).  With these final components selected, the #BeamMachine was ready to go! Well, on paper at least.  Now it was time to order parts and wait for the boxes to arrive. Over the course of about two weeks, boxes arrived one-by-one until the full slate of components was ready to go and the new PC was ready to come to life. It was finally time to start building!

Here’s a quick recap of the system components used in the build:

  • AMD Ryzen 7 1800x CPU
  • MSI x370 Gaming Pro Carbon motherboard
  • 32GB (4x8GB) G.Skill Trident Z RGB DDR4 RAM
  • Samsung EVO 960 M.2 NVME solid-state drive
  • MSI GEFORCE GTX 1050 TI graphics card
  • Corsair H110i liquid cooling system
  • Corsair RM750x power supply
  • Thermaltake X71 full-tower case
  • Arctic Silver 5 thermal paste
  • And of course, some awesome LEDs to make the build stand out

Thankfully we took many photos throughout the build process as we wanted to document and share the build process for anyone who has never assembled their own PC, or for those who love watching new PCs come to life.  Without further ado, let’s get to the photos!

The pile of internal components

The pile of internal components.

A freshly unboxed PC case

A freshly unboxed PC case.

The new MSI motherboard, complete with built-in M.2 SSD slots

The new MSI motherboard, complete with built-in M.2 SSD slots.

Time to start building!

Time to start building!

What’s a PC build without a little Mountain Dew? And a CPU!

What’s a PC build without a little Mountain Dew? And a CPU!

The new AMD Ryzen 7 1800x CPU taking its place.

The new AMD Ryzen 7 1800x CPU taking its place.

Dropping the new SSD into place

Dropping the new SSD into place.

Dropping the new SSD into place.

Next in: the Corsair RM 750X Power Supply.

Next in: the Corsair RM 750X Power Supply.

A fully-modular power supply is a dream for cable management!

A fully-modular power supply is a dream for cable management!

It’s starting to look a little like a PC!

It’s starting to look a little like a PC!

Now for some cooling capability: Corsair H110i liquid cooling unit

Now for some cooling capability: Corsair H110i liquid cooling unit.

Yours truly attaching the radiator to the top of the case.

Yours truly attaching the radiator to the top of the case.

The Corsair H110i comes with the necessary AMD Ryzen bracket!

The Corsair H110i comes with the necessary AMD Ryzen bracket!

Four quick snaps and our 32GB of RAM is quickly installed.

Four quick snaps and our 32GB of RAM is quickly installed.

Graphics anyone?  Remove two accessory panels from the back of the case and the new MSI GeForce GTX 1050 Ti is a quick install.

Graphics anyone? Remove two accessory panels from the back of the case and the new MSI GeForce GTX 1050 Ti is a quick install.

Attaching up the case header pins, some fan plugs, and of course… the speaker!

Attaching up the case header pins, some fan plugs, and of course… the speaker!

Easy clean:  the Thermaltake X71 case has a removable magnetic mesh top.

Easy clean: the Thermaltake X71 case has a removable magnetic mesh top.

A view from “the dark side”.  Cable management is important!

A view from “the dark side”. Cable management is important!

The end is near!

The end is near!

A quick-power on to ensure all is well and that the BIOS posts as expected.

A quick-power on to ensure all is well and that the BIOS posts as expected.

Who is going to clean up this mess?

Who is going to clean up this mess?

The #BeamMachine is alive and well. And in the words of the late Bob Ross, “we’ll put a happy little tree right here…”

The #BeamMachine is alive and well. And in the words of the late Bob Ross, “we’ll put a happy little tree right here…”

In total the build took a little over two hours. I’ll admit that I’m picky about cable management, a topic that many home PC builders tend to be very particular about (and rightfully so). If you’re going to take the time to build a beautiful new PC, it’s worth putting in the effort to do it properly.

Overall the build went very smoothly; there were no hardware install problems and with the careful consideration put into the parts before purchase, all the hardware chosen was fully compatible and we did not encounter any inter-operability issues. It’s nice when a build comes together! There’s something special about putting in the time and effort to build it yourself, and while not all Windows Insiders out there build their own PCs, there are no doubt many of you who have gone through this same process and felt the wave of joy when it boots and posts after you press the power button for the first time.

Any time you set out to create something, be it a piece of software, a new PC build, or something as altruistic as sharing feedback on a bug or new feature idea you have, you’re taking the time to invest yourself. You’re investing in your abilities, your ideas, and your desire to have an impact. Windows Insiders invest every day via participation in this program. Our efforts to build a new PC to better connect with you all via our monthly webcasts is another way of showing our appreciation for all you do day-in and day-out to make the Insider program the success it has become and will continue to be. I look forward to connecting with you and am excited about our new series of webcasts.

Continue creating, and as Dona always says, “keep hustlin’”!

– Jason

Source: Windows

Announcing Windows 10 Insider Preview Build 16184 for PC + Build 15208 for Mobile

Hello Windows Insiders!

Today we are excited to be a) hosting our very first Insider webcast from the brand new #BeamMachine AND b) doing our first ever build release during a webcast. We are releasing Windows 10 Insider Preview Build 16184 for PC to Windows Insiders in the Fast ring. We are also releasing Windows 10 Mobile Insider Preview Build 15208 to Insiders in the Fast ring.

What’s New in Build 16184 For PC

My People: Technology is all about making it easier for you to connect with your most important people. Whether you want to share a photo, make plans for dinner, or get an answer from a friend or coworker – My People is here to take it to the next level and bring the people you care about most to the center of your experience.

My People

You can now:

  • Pin your people to the taskbar – we’ll suggest some to start with, or you can pick your own! (Note: you are currently limited to having 3 people pinned to your taskbar currently.)
  • View multiple communication apps together and filtered to each person on your taskbar.
  • Choose the app you want to use to chat and we’ll remember for next time.

By now, you are wondering ‘but how do I host this party in my taskbar?’. To start with, go to the Store app and make sure you have all the latest updates for the Skype, Mail, and People apps. Then click on the People icon in the taskbar to activate the first run experience and get setup.

Note: Contact syncing is enabled by default following system settings in versions 11.13+ of Skype. If you have an older version of Skype you will need to manually enable contact syncing via the Skype app settings.

Have feedback you want to share with the team? We want to hear it! You can send us feedback by tapping the ellipsis in the People flyout and selecting “Send feedback”, or by opening the Feedback Hub and sharing your thoughts in the Desktop Environment > My People section. We have some more work on its way for this that will soon be lighting up for Insiders, including our improved Share story for People, so stay tuned!

New experience for Gmail accounts in Windows 10 Mail & Calendar apps: Last week, we announced we’re introducing a new experience for Gmail accounts in the Windows 10 Mail and Calendar apps that brings our latest features such as Focused Inbox and richer experiences for travel reservations and package deliveries that were previously only available to those with an or Office 365 email address. Windows Insiders will be the first to try out the new experience as the roll-out gradually happens over the next few weeks. You’ll know the new experience is available for your account when you are prompted to update your Gmail account settings.

Your favorite features are now available for your Google account!

Changes, improvements, and fixes for PC

  • We fixed an issue where night light could get stuck in a disabled state.
  • We’ve updated Start to use the improved XAML scrollbar style announced during Creators Update development.
  • We fixed an issue from recent flights where dragging an app from Start’s All apps list into the tile grid would result in Start crashing.
  • We fixed an issue for those using Windows in Japanese, where on first login after an upgrade certain apps would unexpectedly appear at the bottom of the Start’s All apps list for an hour or until being launched, instead of the normal sorted position.
  • Since the preview picture in Start Settings only previewed background and theming changes, which are already available to be previewed on their corresponding Settings pages, we’ve made the decision to remove it.
  • We’ve improved the loading performance of the Notification Settings page.
  • Some audio drivers have an “encoding Audio Processing Object” feature; this is commonly known as “Dolby Digital Live” or “DTS Connect”. This takes the output of the Windows audio engine mix, encodes it (as Dolby Digital, DTS, or some other format) and sends it out over a S/PDIF optical link for decoding by an external audio receiver. An issue was introduced which resulted in this feature no longer working, which is now fixed.
  • We fixed an issue from recent flights resulting in Photos crashing if you opened a picture from the Collection page and then pressed the back button in the title back.
  • We fixed an issue resulting in Counter Strike Global Offensive hanging or freezing during game play on the latest builds (16176+).
  • We fixed the issue where pressing F12 to open the Developer Tools in Microsoft Edge while F12 is open and focused may not return focus to the tab F12 is opened against, and vice-versa.

Known issues for PC

  • Some Insiders have reported seeing this error “Some updates were cancelled. We’ll keep trying in case new updates become available.” in Windows Update. See this forum post for more details.
  • Double-clicking on the Windows Defender icon in the notification area does not open Windows Defender. Right-clicking on the icon and choosing open will open Windows Defender.
  • Surface 3 devices fail to update to new builds if a SD memory card is inserted. The updated drivers for the Surface 3 that fix this issue have not yet been published to Windows Update.
  • exe will crash and restart if you tap any of the apps listed in the Windows Ink Workspace’s Recent Apps section.
  • Insiders who use Simplified Chinese IMEs or the Traditional Chinese Changjie or Quick IME to input text will find that the candidate window doesn’t appear when typing into certain apps. If you press space, the first candidate will be finalized. Using the number keys will not finalize any other candidate. If the candidate you need is not the first one, for now you will have to enter your text into an app where the candidate window appears, such as Notepad, and copy it into the desired text field.
  • Navigating to Settings > Update & security > Windows Update may crash Settings app. You can simply re-open the Settings app again and it should work again.
  • The “Save” dialog appears to be broken in several desktop (Win32) apps. The team is investigating. This will break things such as Chinese IME, etc.
  • Localized apps on localized x64 Windows 10 Insider Preview builds will not work.
  • We’ve heard some reports that the Action Center isn’t opening as reliably in recent builds, and are investigating.

Changes, improvements, and fixes for Mobile

  • We’ve fixed the issue where some Insiders were unable to open both the Connect UX page and/or the “Add Bluetooth or other devices” setting on the Bluetooth Settings page.
  • We fixed an issue resulting in an unexpected extra ~20 sec being added to the phone shutdown process due to a deadlock if you tried to shut down soon after switching from one network to another.

Known issues for Mobile

  • A small percentage of devices may experience text message backup loss related to backup and recovery of the messaging database.
  • The copyright date is incorrect under Settings > System > About. It shows as 2016 when it should be 2017. Thanks to the Windows Insiders that reported this!
  • Insiders may experience random shutdowns on some devices.
  • In some cases, the WeChat app may crash on launch.

 Community Updates

Many Windows Insiders have asked to be introduced to members of the team beyond the four of us they engage with daily on the Twitters/forums. This is something we’ll do in these blog posts and publish them on our SHINY new website that will debut in June. Today we’ll start with the Windows Insider team.

Windows Insider Team!

First a quick walkthrough of how our org works.

  • Windows and Devices Group – thousands of people who build Windows, our apps, devices and services. Within WDG are a group of people called.
  • Community Champs + FlightOps – Engineers throughout WDG who live and breathe customer data/feedback – these are all the lovely humans who help make flight/no flight decisions based on data and feedback from Windows Insiders. Each person is responsible for a specific area from Core UX to deployment and are the main evangelists for customer feedback for their area. Within this group are a bunch of folks you all probably know well.
  • Windows Insider Team – a scrappy group of six who represent the Windows Insiders both internally and externally. Here we are below left to right with our Twitter handles. Please get in touch with us if you want to know about the things we’re working on!

Dona Sarkar (@donasarkar) – Chief #NinjaCat wrangler Dona’s main responsibility is making sure the right bugs and features are being invested in by the engineering teams for this release +  future releases and communicating back to Insiders. Another responsibility is engaging with all of the other community engagement programs in Microsoft and figure out how they can Insider like Windows does. A third area of investigation is figuring out how to empower Insiders to grow and use their technical superpowers to create a lasting impact in their world.

Blair Glennon (@jbglennon) – Baseball loving Blair leads the Windows Insider Program for Business sub-program and owns Insider Insights. He is the one who partners with our AMAZING data science team to understand the happiness and health of our overall community. Through both quant and qual data (cluster/trend analysis, surveys, side convos at meet-ups), he helps us determine what we need to do to better co-create Windows and the Insider program with you all.

Jason Howard (@northfacehiker) – #TeriyakiTuesday-loving Beam Master Jason leads social sentiment from Insiders to communicate to the overall WDG org. He also spends a ton of his time helping Insiders get unblocked on build issues and rolling up lists of top issues to the product teams. He is also the creator and owner of the monthly Insider Beam webcasts.

Tyler Ahn (@skrelnick) – Chihuahua-mom Tyler leads the Global fan programs and the Insider MVP Program. She is partnering with Brandon on the website spec and launch and thinking about how to create Insider-in-a-box so you can run Insider programs within your own organizations! She has over a decade of experience doing business development in emerging markets and has the superpower of taking an activity and figuring out how to scale it globally eg CAT-in-a-box, forums, etc. She has been an INVALUABLE asset for our team as we think about building products and services to empower EVERY person and organization on the planet to do the thing.

Brandon LeBlanc (@brandonleblanc) – Bat’leth wielding Brandon owns the main communication to Insiders. He works with the Community Champs to make sure the features and bugs are represented in our communication. Brandon is working on the Insider all-up social media strategy as well as content creation for our shiny new website.

Jeremiah Marble (@jeremiahmarble) – Global negroni hunter Jeremiah is the architect of the Windows Insider Program. He drives projects for our core audiences and projects, deciding where and how to grow our community. This year, he’s focusing heavily on global entrepreneurs and creatives. He also leads our “Co-Creating with Sub-communities” initiative, which will launch its first pilots in June. As a third area, he’s looking at ways to better connect Insiders seeking to help others. Jeremiah was a founding member of the Windows Insider Program and our current “village elder”.

Keep hustling team,
Dona <3

Source: Windows

The High Five: new discoveries in space and fashion

What did Saturn say to NASA this week? “High Five.” Here’s a look at a few of the top trending Google searches orbiting the week of April 24.

What have you done this week?

For the first time ever, a spacecraft cruised through the narrow gap between Saturn and its rings. Now NASA’s Cassini is beaming information back to the mothership, and telling NASA about all the cool stuff it saw. Science, FTW! After the feat, people searched on Google for more information: “How does Cassini communicate with Earth?” and “How long did it take for Cassini to reach Saturn?” Some were looking for a refresher astronomy course, asking “How far is Saturn from Earth?” and “How many rings does Saturn have?”


Here comes the tour

Maybe we’re amazed that Paul McCartney is still touring—that guy is Here, There and Everywhere! It’ll be a Hard Day’s Night on the road, but fans twisted and shouted when he announced his 2017 tour dates this week. Though you can’t buy his love, you can buy a ticket to his show. And fans are itching to get those tickets, with questions like “How much are Paul McCartney tickets?” and “When do tickets for Paul McCartney go on sale?” Let it Be soon.


This Saturday marks President Trump’s 100th day in office, and the first few months of his administration have prompted people to learn more about political concepts and processes. The five most-searched terms related to politics during Trump’s first 100 days are “recuse,” “filibuster,” “vetting,” “executive order” and “immigrant.” Another fun fact to bring to your political debates this weekend: the most-searched names alongside the phrase “Trump handshake”: Justin Trudeau, Angela Merkel, Neil Gorsuch, Shinzo Abe and Benjamin Netanyahu.

Clear as mud

Remember when you were a kid and tracking mud in the house got you into trouble? Times have changed—go ahead and get mud all over yourself. Or pay $425 for jeans covered in fake mud. Perplexed (yet intrigued) shoppers have been searching, “What are mud jeans?” and “Where can I buy mud jeans?”

Shifting gears

NASCAR legend Dale Earnhardt Jr., is at the finish line—he announced he will retire after the 2017 season. Fans are curious about when and why he is retiring and “Who will replace Dale Earnhardt Jr.?” Though he’s known nationwide, southern regions in the U.S. searched most for Earnhardt this week. Top states included North Carolina, West Virginia, Tennessee, Alabama and South Carolina.

Source: Google

Secure Multimedia Playback on Android with BlackBerry Dynamics

BlackBerry Dynamics allows you to secure data in transit using its secure connectivity.  It also provides solutions to secure your data secure while at rest using its secure file system and secure database.  But what about keeping your data secure while it’s in use?

In many scenarios, securing data in use isn’t much of a concern because that data is only briefly stored in RAM only available to your application. But what about large pieces of data, such as audio or video files that are read from flash memory?  If you were to attempt to use a URI in the Android MediaPlayer that points to a video file stored in the BlackBerry Dynamics file system, it will fail to play because the Android MediaPlayer is unable to understand the encrypted file.  Some developers have attempted to work around this issue by copying a media file outside of the BlackBerry Dynamics secure file system for playback, and then delete it when playback is complete.   While this does allow for playback of the file, it does not keep your media files secure.  While that temporary but unencrypted file exists on the regular file system, other applications could gain access to it.

The way to solve this problem, and keep your media files secure is to implement a solution that allows playback directly from the BlackBerry Dynamics secure file system. I’m going to show you a couple of ways this can be done.  One solution will involve creating a custom MediaDataSource that can read from the BlackBerry Dynamics secure file system and provide the Android MediaPlayer with the data it needs for playback.  The second will take a similar approach, but make use of the popular open source media player called ExoPlayer.

Choosing Between Android Media Player and ExoPlayer

If you are creating a new application targeting current versions of Android, the solution that uses MediaPlayer  and MediaDataSource is likely the approach to take.  MediaDataSource was added in API level 23, so it is a relatively new API.  If you need to support older versions of Android, refer to the solution below that uses ExoPlayer, which supports API level 16.  There are some additional elements to consider, which are well described in the Pros and Cons section of the ExoPlayer documentation.

Using Android Media Player

A complete working sample project that uses this solution is available on the BlackBerry Github site here: BDVideoPlayBack

The first step is to extend MediaDataSource and ensure we are using the BlackBerry Dynamics file system APIs.


public class BDMediaDataSource extends MediaDataSource
    private RandomAccessFile randFile;
    private long size;

Next we create a constructor that accepts a String that contains the path and filename to the encrypted file. In this method, we open the file using the BlackBerry Dynamics file APIs.

public BDMediaDataSource(String fileName) throws IOException
    File file = new File(fileName);
    size = file.length();
    randFile = new RandomAccessFile(file, "r");

Next there are three methods of MediaDataSource that need to be overridden. The readAt method is used by the MediaPlayer to request a specific portion of the file.  Again, we use the BlackBerry Dynamics file APIs to read and return the requested portion of the file.

public int readAt(long position, byte[] buffer, int offset, int length) throws IOException

    if (randFile != null)

        return, offset, length);
        return -1;

The next two methods are getSize and close. getSize returns the size of the file.  Note that this is the size of the unencrypted file, which is what is returned by the BlackBerry Dynamics file APIs.  The final method is close, which is called when the file should be closed.

public long getSize() throws IOException
    return size;

public void close() throws IOException
    if (randFile != null)
        randFile = null;

BDMediaDataSource is now ready to be used with MediaPlayer. The following code snippet demonstrates how that can be done.

MediaPlayer mp = new MediaPlayer();
BDMediaDataSource source = new BDMediaDataSource("file.mp4");
mp.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
    public void onPrepared(MediaPlayer mp) {

Using ExoPlayer

A complete working sample project that uses this solution is available on the BlackBerry Github site here: ExoPlayerVideoPlayBack

The solution that uses ExoPlayer has a very similar design to what was done using Android Player above. For ExoPlayer, we extend DataSource, which is used to provide data that will be played back and use the BlackBerry Dynamics file system APIs to read the securely stored media files.  An empty constructor is also defined.


public final class BDDataSource implements DataSource

    private FileInputStream inputStream;
    private boolean fileOpen;
    private Uri filePath;
    private long bytesRemaining = 0;

public BDDataSource() {}

Next we override the open method, which passes in the file to be opened. In this method, we initialize FileInputStream that will be used to read the data.

public long open(DataSpec dataSpec) throws IOException
    filePath = dataSpec.uri;
    //Trim "file:///" that's prefixed to the start of the URI.
    inputStream = GDFileSystem.openFileInput(filePath.toString().substring(8));

    if ( inputStream != null )
        fileOpen = true;
        bytesRemaining =  inputStream.available();

    return bytesRemaining;

The next method to override is the read method, where we use the FileInputStream initialized in the open method to read the file at the desired position.

public int read(byte[] buffer, int offset, int readLength) throws IOException {
    if (bytesRemaining == 0)
        return -1;
        int bytesRead = 0;
        bytesRead =, offset, readLength);

        if (bytesRead > 0) {
            bytesRemaining -= bytesRead;

        return bytesRead;

The getUri method is also overridden and returns the path to the file in the BlackBerry Dynamics file system.

public Uri getUri() {
    return filePath;

The final method overridden is the close method, that closes the FileInputStream and underlying file when playback ends.

public void close() throws IOException {
    filePath = null;
    if (inputStream != null)
        catch (IOException e)
            throw new IOException(e);
            inputStream = null;
            if (fileOpen)
                fileOpen = false;

The code sample below shows how BDDataSource could be used as a DataSource by ExoPlayer.

SimpleExoPlayer player;

// 1. Create a default TrackSelector
BandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
TrackSelection.Factory videoTrackSelectionFactory =
        new AdaptiveVideoTrackSelection.Factory(bandwidthMeter);
TrackSelector trackSelector =
        new DefaultTrackSelector(videoTrackSelectionFactory);

// 2. Create a default LoadControl
LoadControl loadControl = new DefaultLoadControl();

// 3. Create the player
player = ExoPlayerFactory.newSimpleInstance(v.getContext(), trackSelector, loadControl);

// Bind the player to the view.

// Produces DataSource instances through which media data is loaded.
DataSource.Factory dataSourceFactory = new BDDataSourceFactory();

// Produces Extractor instances for parsing the media data.
ExtractorsFactory extractorsFactory = new DefaultExtractorsFactory();

// This is the MediaSource representing the media to be played.
Uri uri = Uri.fromFile(new File("file.mp4"));

MediaSource videoSource = new ExtractorMediaSource(uri,
        dataSourceFactory, extractorsFactory, null, null);

// Prepare the player with the source.

Wrapping Up

Both samples provide similar solutions that you can use from Android API level 16 through to current versions of Android. Give them a try and make sure your data is secure when in transit, at rest and in use.


Need Development Help? The BlackBerry Developer Community Forum has your Answer…Join the conversation, engage with peers, share ideas, and get your app development questions answered. Developer Community Forum

Source: Developer Blackberry

These events allow to you to share time with other replica watches sale watch lovers as well as learn about what the brands are up to. In the process, you'll get treated to rolex replica sale fabulous dinners, meet celebrities, receive gifts, and feel like a valued customer who the brands really want to rolex replica sale have a relationship with. Depending on where you live and the brands you like to purchase from, these events can be quite frequent, and also really fun. Their value should not be underestimated, and again, if you don't purchase rolex replica sale watches in an "official manner" you'll never be included. Personally, I have to say that while I don't like spending more money than I need to, the value of these above unexpected benefits, in many instances, can make up for the discounts replica watches available at gray market retailers when you want to buy a new watch. In a sense, each time you rolex replica sale purchase a high-end timepiece, you are designating yourself as part of a elite group of replica watches sale people who have the appreciation and resources for luxury items.