Shared posts

22 Jul 16:31

Aereo could win big in fee dispute between CBS and Time Warner Cable

by Greg Sandoval
Kanojia-aereo-antenna-racks_large

Aereo CEO Chet Kanojia

Time Warner Cable says if it can't reach an agreement with CBS over the fees it pays to retransmit the network's programs, it will recommend that customers try Aereo, according to a published report.

A TWC spokeswoman told The New York Times today that if CBS pulls its shows from TWC, it would recommend to its New York customers to try Aereo, the service that, because of its unique business model, doesn't pay any retransmission fees to broadcasters to access their TV shows.

Continue reading…

22 Jul 14:46

'Veronica Mars' movie sneak peek debuts at Comic-Con

by Carl Franzen
Veronica-mars-movie-sneak-peek_large

"A long time ago, we used to be friends." Almost 10 years after it first debuted on TV screens across America, beloved cult series Veronica Mars is back and on a bigger screen than ever. After a successful Kickstarter campaign in which it surpassed its $2 million goal in less than 12 hours, the movie starring Kristen Bell as the titular sharp-witted private eye is currently in-production, but already giving fans a first tantalizing glimpse behind-the-scenes.

Continue reading…

18 Jul 17:51

Buy Your VHS Tape Rewinders Elsewhere: RadioShack Is Revamping Its Image… Again

by Mary Beth Quirk

If you need a new (old?) VHS tape rewinder you better scoot your tush out the door right now and see if RadioShack still has one. The store’s new CEO is all revved up and ready to give some 220 of the company’s stores a whole new look, and is ready to refresh the retailer’s image by dumping all those old products it used to hang onto. Just don’t call it The Shack anymore, please.

CEO Joe Magnacca has the big job of trying to get RadioShack back into the game, a game dominated by mega retailers like Amazon and eBay. To that end, the Associated Press says the newly renovated stores will be turned into bright, airy bastions of shiny, trendy electronics.

Those stores that don’t get the makeover treatment will still move toward other merchandising changes, like displaying phones by manufacturer instead of sitting on tables at the front of the store organized by wireless carrier.

“I want to be the store that people go to and say, ‘I want to go to RadioShack and see what’s new and exciting,” Magnacca said. “Key for us is how do we make the stores shoppable, and not overwhelm the customer.”

As for those home phones or other past-peak electronics you might’ve visited RadioShack for in the past, they’re going the way of the dinosaur, if the dinosaur is only online or residing beneath the surface as a fossil.

“We used to be known as a company that holds onto products until the very end of their life cycle,” Magnacca said. Some of those products will still be sold but just in limited quantities or online. Others will be gone forever, like the box of VHS tapes you finally set out on the curb last month upon realizing you will never, ever need them again.

Let’s hope this works out better than that whole “Call us The Shack! All the cool kids do!” debacle of 2009. Because that was fun.

RadioShack revamps some stores [Associated Press]


18 Jul 17:50

Tracing the rise of 'authentic' digital design

by Nathan Ingraham
Ios7-control-center_large

Apple's unveiling of a radically redesigned iOS last month at WWDC reignited a discussion about the merits of the more simplified, "authentic" design style that we've already seen Microsoft and Google push across the majority of their products. For those who want to go deeper into how Apple got to the point where it thought fake leather calenders were good design and why it's finally time for the company to move away from its skeuomorphic past, check out this article from Smashing Magazine. It traces design trends back to 19th century architecture, noting how many buildings were heavily ornamented with machine-produced decorations meant to mimc the hand-crafted styles of previous decades — a design trend that was decidedly inauthentic.

...

Continue reading…

18 Jul 17:50

Netflix receives its first Emmy nominations, nine for 'House of Cards' and three for 'Arrested Development'

by Matt Brian
Hoc_pds_010_h_large

Netflix's commitment to developing original content for its video streaming service appears to be paying off. Following the launch of House of Cards and a fourth season of Arrested Development earlier this year, the Academy of Television Arts & Sciences announced both Netflix shows have been nominated in the 65th Emmy Awards — with Netflix becoming the first company to receive a nomination for an online-only show.

Continue reading…

18 Jul 17:50

Verizon's answer to AT&T and T-Mobile's financing options launches August 25th

by Dan Seifert
Chris Benard

AT&T and Verizon's versions of T-Mobile's JUMP program are a HUGEEEEEEEEEEEEE ripoff.

Razrhd-razrmaxxhd-55511_555_large

During a call for investors today, Verizon CFO Fran Shammo confirmed that the carrier is planning to launch its Edge device financing program, though he declined to provide any details on the service. Edge has been rumored to be Verizon's answer to T-Mobile's Jump and AT&T's Next programs, which let customers get new phones more often than traditionally possible. Shammo said that Verizon customers are interested in financing programs, and that the carrier is weighing its options in this area. Unfortunately, he didn't give any further details on what the Edge program entails, though he did say that more information would be announced in the near future.

Update: And just like that, Verizon has officially announced its Edge early upgrade...

Continue reading…

18 Jul 17:50

The Speakers: how two people became the voice of 110 airports and the NYC subway

by Lessley
Chris Benard

Really cool read.

Voices_lead_large

Airports trigger anxiety. Subway systems cause paranoia. We all know the statistics: it’s riskier to get in your car than it is to board an aircraft or take a train. But our collective memories of bombings, hijackings, and poison gas attacks often turn public spaces of transport into psychic mine fields. Stuck in limbo between the here and there, pushing through a crush of strangers, we are totally vulnerable and alone. Except we’re not. There’s always the voice.

You know, the one that tells us that “smoking inside the terminal is prohibited,” and that “unattended baggage will be removed immediately,” and that “the next stop is Times Square.” It’s sort of irritating, yet something to cling to, as familiar and...

Continue reading…

18 Jul 17:46

Android 4.3 detailed in new leak, but updates are minimal

by Dante D'Orazio
Android-4-robot-logo-stock2_1020_large

Google is set to reveal the next version of Android at a press event next week, but we have already received a pretty good look at what the update will bring courtesy of a leaked copy obtained from a secondhand Nexus 4 sold by a Google employee. Android 4.3 Jelly Bean, as the name suggests, will be a minor update to the user experience introduced in 4.2. One of the most welcome changes comes to the dialer. With the update, the phone will automatically suggest phone numbers from your contacts as you dial either by matching the digits or using the T9 dial pad to look up names. It is worth noting that it's not on by default, however. The dialer now includes an option to add pauses when calling a number as well.

Continue reading…

18 Jul 14:28

With Bacon And M&Ms, Resort Makes Couple Feel At Home

by Laura Northrup

6xOb56i
When making a hotel reservation online, there’s a box where you can type in any special requests you have for your stay. Do you need down-free pillows? A cot, if the hotel doesn’t charge extra for them? You could ask there. One vacationing Redditor, though, took the opportunity to see whether anyone reads that box at all. 

Three red M&Ms on the counter. Not packages, just single M&Ms. One for me, one for my girlfriend, and one to split if we get hungry late at night. And a picture of bacon set on the bed. I love pictures of bacon.

Who doesn’t? By the time the couple checked in, the Redditor claims that he had forgotten about the special requests. No hotel would be so silly as to actually listen to his demands, right?

nIQ0SN9h

“I was quite confused when I walked in and saw three single red M&Ms,” he writes.

AFa5irIh

Amaazing. Now, that’s how you make your guests feel at home. Only better than home, because my home doesn’t have M&Ms or framed photos of bacon in it.

OM6VpP3h

The bacon picture brought it all home, though. “My girlfriend started laughing at the picture on the bed. At that point it clicked and I started laughing hysterically at the beautifully framed picture of bacon.”

This hotel pays attention to your special requests. [Reddit]


18 Jul 14:25

“Goodyear Zeppelin” Doesn’t Have The Same Ring To It As “Goodyear Blimp,” But So It Goes

by Mary Beth Quirk

If you’re the kind of person who just can’t help but correct someone, anyone, who’s had the misfortune to utter something slightly factually inaccurate, let this serve as a warning: Although Goodyear is replacing its fleet of three blimps with zeppelins, the company is still going to call the beloved airships blimps. Because it’s not about technicalities here, people, it’s about blimp love.

That being said, if you’re intent on proving your superior knowledge of random trivia, you can let whoever might possibly be interested that the blimp has served well, but is being retired in favor of the quieter, faster and more maneuverable zeppelins, reports CNET.

The decision to switch out the blimps, which you may have seen idling around in the air space over sporting events, came about in 2011. The new fancy airships were developed by Friedrichshafen, Germany’s Zeppelin Luftschifftechnik (try saying that three times fast, or even once)), which is also the company behind the Hindenburg. You might’ve heard of that infamous air trip, but these zeppelins use non-flammable helium instead of the hydrogen that exploded back in 1937.

Zeppelins will provide the advantage of hovering, due to the way their three-engine design works, which is a boon to TV broadcasters who want an airship to stay right where it is to get the perfect shot. Those riding inside the bl– excuse me, zeppelins, won’t have to wear headsets either, as the zeppelins are much quieter.

And lest anyone gets all up in your face when you refer to the new Goodyear fliers as blimps, let it be known: ”We will still call it the Goodyear blimp,” Goodyear’s director of global airship operations told CNET.

Whew.

Goodyear bids goodbye to blimps, says hello to zeppelins [CNET]


16 Jul 18:07

Robert Lewis III May Be the Saddest Illegal Gun Dealer You'll Ever Meet

by Eric Nicholson
A modest, single-family home on Cromwell Drive in Dallas. Also, an unlicensed gun factory.Robert Lewis III never meant for any of the assault rifles he assembles in his Northwest Dallas home to wind up hidden in a pickup truck bound for Mexico. He considers his gun-making more hobby than profession, though he did reportedly sell some to a guy down in Houston from time to time for a little extra spending money. Yet, despite Lewis' best intentions, customs agents in Hidalgo in January 2011 discovered a cache of 15 assault rifles stashed in the fuel tank of a southbound truck belonging to 37-year-old Edwardo Ibarra. Components from two of the weapons were traced back to Lewis, who, records showed, had purchased them from JP-TEN Sports in Farmers Branch. The discovery intrigued the ATF, which two months later began investigating Lewis for trafficking firearms. They probably suspected that they were on the trail of some sophisticated cartel-connected gunrunner who had finally slipped up. What they found instead was a guileless Army vet running a very small-scale, very homespun gun operation out of a house belonging to his parents.
16 Jul 16:17

The only Utah ISP (and one of the few nationwide) standing up for user privacy

by Cyrus Farivar
Pete Ashdown is the founder and CEO of XMission, based in Utah.

On May 29, 2013, Pete Ashdown received a two-page document from the United States Department of Justice Criminal Division at the United States Embassy in Rome, Italy. Ashdown is the founder and CEO of XMission, an independent ISP and Web host based in Salt Lake City, Utah.

You are hereby requested to preserve, under the provisions of Title 18, United States Code, Section 2703(f), the following records in your custody or control, including records stored on backup media:

A. All stored electronic communications and other files associated with the following IP address: 166.70.270.2

There are two minor problems with this request. First, it’s not a valid IP address—and second, the IP address it’s supposed to be is actually that of XMission’s Tor node (166.70.207.2).

“So not only did they not bother to investigate the fact that it was Tor node, but they didn’t know what a proper IP address was either,” Ashdown told Ars.

Read 15 remaining paragraphs | Comments

    


16 Jul 13:22

Cable providers consider cutting out sports to lower your TV bill

by Jacob Kastrenakes
Vrg_4171_large

Sports programming is driving up your television bill, and cable providers aren't happy about it. Though football, basketball, and baseball may seem to be some of the most watched content around, that's far from the truth: TV tracking firm Nielsen found that only four percent of households tune in to watch sports on average, reports The Wall Street Journal. But despite the low viewership, cable providers are paying disproportionately huge sums in order to carry networks like ESPN — and they're passing those costs along to consumers.

Continue reading…

14 Jul 20:45

The Moto X will always be listening for your voice commands, leaked video shows

by T.C. Sottek
Screen_shot_2013-07-14_at_9

According to a leaked video that appears to be from Canadian wireless carrier Rogers, Google's upcoming Moto X device will feature passive listening in order to respond to voice requests without a button press. The video, originally spotted by Ausdroid, shows a user speaking to the phone to retrieve weather information from Google Now; by saying "Ok Google Now," the phone accepts voice commands, similar to the way Google Glass works. "Your Moto X is ready to listen and respond," the Rogers representative says in the video. "Talk to it, and it learns your voice." If you've been keeping score, that makes the Moto X the second high-profile device this year to boast an always-on listening feature.

The leaked video also demonstrates an alert...

Continue reading…

11 Jul 16:10

Android's Jelly Bean contingent finally surpasses Gingerbread

by Darren Murph

Android's Jelly Bean contingent finally surpasses Gingerbread

It's a new era, we tell ya. An era where Google can finally say that its latest build of Android is also the one being used by the greatest majority of Android users. For over a year, Android 4.1+ has been the most up-to-date build of Google's mobile OS, and yet, the greatest majority of those accessing the Play Store were using a build that was bordering on antediluvian. According to the official Developers Dashboard, the percentages have slid to a point where Android Jelly Bean -- which encompasses 4.1.x and 4.2.x -- now represents 37.9 percent of Play Store users. Gingerbread (v2.3.3 through 2.3.7) has fallen to second place with 34.1 percent, while Ice Cream Sandwich (4.0.3 through 4.0.4) holds down the bronze with 23.3 percent. Hit up the source link to view the full breakdown, and do us a solid -- if you know someone still using Donut, grab 'em a Christmas-in-July present.

Filed under: Cellphones, Software, Mobile, Google

Comments

Via: The Next Web

Source: Android

11 Jul 13:22

Google adds offline Maps button to Android app in response to complaints

by Matt Brian
Google-maps-offline-2013-07-11-verge-1020-1_large

Having come under fire for (mostly) removing the option to save offline maps in its new Android app, Google has pushed a new update that makes it easier for users to save local areas to their device. In a post on Google+, the company notes that its "engineering team has been working around the clock" to add a "Make this map area available offline" card inside the app, mimicking the functionality of the 'OK maps" command.

While it doesn't mark the return of true offline maps — you could previously cache multiple locations and explore larger areas — Google has worked quickly to push new updates that address the concerns of some users. Following the announcement that it will close its Latitude location service on August 9th, Google...

Continue reading…

11 Jul 13:22

Microsoft says PCs were attacked after Google engineer's public Windows bug disclosure

by Tom Warren
Windowslogostock1_640_large

Google Information Security Engineer Tavis Ormandy publicly disclosed a bug in the Windows operating system in May, and Microsoft now claims there have been "targeted attacks" using the vulnerability. In a security bulletin issued on Tuesday, the software maker notes it was made aware of attackers using the bug to elevate security privileges in Windows. "Microsoft detected targeted attacks after the issue described by CVE-2013-3660 became publicly known," says Microsoft's Dustin Childs in a statement issued to The Verge. Targeted attacks is a term usually used to describe malicious malware or threats to specific industry's or organizations.

Ormandy, who claims Microsoft is difficult to work with, revealed the bug publicly in a full...

Continue reading…

11 Jul 13:22

Apple Store is being built on top of 15th-century Spanish ruins

by Nathan Olivarez-Giles
1373392390_720489_1373392599_noticia_grande_large

Apple is building a new store in Madrid right on top of 15th-century hospital ruins, and it's doing so with the local government's blessing. While constructing a basement for the new Apple Store, workers discovered deteriorated walls that served as the foundation of the Buen Sucesco hospital, which was demolished in 1854, according to a report from El País. But rather than halt construction and bring in a team of archeologists to survey the ruins, city officials came up with a plan that allows the store's buildout to continue.

Continue reading…

10 Jul 18:24

Perry and Texas Won't Take Any Responsibility for West Explosion, But We Will Take Money

by Jim Schutze
Count this out with me, will you? Texas Governor Rick "Oops" Perry won't support increased government regulation of fertilizer makers or sellers like the plant that blew up in West on April 17, killing 15, injuring 200 and inflicting property damage now estimated at $80 million. Don't need no stinking regulation. Governor Oops won't dig into the state's $8 billion reserve fund to help West. He can't find any serious money for West in the state's $197 billion two-year budget. Ain't got no stinking money. The Federal Emergency Management Agency, meanwhile, has approved more than $7 million in low-cost loans to residents, has agreed to pay 75 percent of the cost of debris removal and will fully compensate local and state agencies for the cost of the initial emergency response. FEMA declined to hand out more money because the disaster at West did not meet guidelines in federal rules and statutes that would allow bigger payments. So now Governor Oops is saying the whole thing is Obama's fault. In a written statement Governor Oops raked the president because he prayed with West. Obama, Perry said, "stood in front of a grieving community and told them they would not be forgotten." Yeah. Pray, pray, pray. So where's our stinking money?
10 Jul 14:54

Coup or revolution? Wikipedia can't agree on what's happening in Egypt

by Aaron Souppouris
5429476572_2116c6d245_z_large

Last week, Egypt's democratically elected president was forcibly removed by the country's military following large-scale protests. Mohamed Morsi became president last year as the first elected leader since the 2011 Egyptian revolution. A Wikipedia article titled "2013 Egyptian Coup d'état" lays down the events of the past few weeks perfectly, but as a Foreign Policy report details, a war of words has broken out in the article's discussion page, with some vehemently arguing that the page should be renamed to "2013 Egyptian Revolution." It appears that the current name will stick for now, with the majority of seasoned editors pointing out that, despite Morsi's deposition seemingly being supported by the masses, the sudden removal of a...

Continue reading…

10 Jul 13:57

Solving the Android image loading problem: Volley vs. Picasso

by Bill Phllips

The scrolling list of visuals is a classic mobile interface pattern. Unfortunately, it’s always been a hassle to implement well on Android. If they are stored locally, a native Android implementation will result in stuttering. And if they are stored on the web, you have to worry about canceling pending requests, along with caching and a slew of other concerns.

As a result, many Android developers have written their own dedicated image downloading component once or twice. In fact, our Android book has an exercise where you write one called PhotoGallery, which we’ll talk more about below.

And when you start to need caching, transformations, and better performance, it’s natural to ask if someone else has solved this problem before you. Just a few months back, I found myself in that exact situation with one of our client apps. I researched some solutions, but didn’t find anything compelling enough to commit to.

But right around Google I/O, a couple of interesting new image libraries were introduced: Volley and Picasso. They don’t solve exactly the same problem, but each offers solutions for this image loading issue. I decided I’d port them both into the PhotoGallery example code from our book to see how they measured up against one another.

The Setup: PhotoGallery

PhotoGallery is a simple Flickr client that displays the most recent photos on Flickr:

Screencap of completed PhotoGallery

Scroll it down, and you’ll see more pictures. Let’s focus on the image downloading code, though.

PhotoGalleryFragment has a component called ThumbnailDownloader. It is a single thread that is responsible for downloading images, and provides a callback that gets fired when the image is downloaded.

ThumbnailDownloader is initialized inside onCreate() by setting a listener, starting the thread and then calling getLooper() to ensure that its message loop is ready to receive messages:

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        ...

        mThumbnailThread = new ThumbnailDownloader<ImageView>(new Handler());
        mThumbnailThread.setListener(new ThumbnailDownloader.Listener<ImageView>() {
            public void onThumbnailDownloaded(ImageView imageView, Bitmap thumbnail) {
                if (isVisible()) {
                    imageView.setImageBitmap(thumbnail);
                }
            }
        });
        mThumbnailThread.start();
        mThumbnailThread.getLooper();
    }

The listener here is responsible for actually setting the image on the ImageViews that PhotoGallery is populating.

In onDestroyView(), old requests are cleared out:

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        mThumbnailThread.clearQueue();
    }

And in onDestroy(), the thread is cleared out entirely:

    @Override
    public void onDestroy() {
        super.onDestroy();
        mThumbnailThread.quit();
    }

Inside the adapter for PhotoGallery’s GridView, a default image is set, and a request is queued on the thumbnail thread:

    private class GalleryItemAdapter extends ArrayAdapter<GalleryItem> {
        public GalleryItemAdapter(ArrayList<GalleryItem> items) {
            super(getActivity(), 0, items);
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            if (convertView == null) {
                convertView = getActivity().getLayoutInflater()
                        .inflate(R.layout.gallery_item, parent, false);
            }

            GalleryItem item = getItem(position);
            ImageView imageView = (ImageView)convertView
                    .findViewById(R.id.gallery_item_imageView);
            imageView.setImageResource(R.drawable.brian_up_close);
            mThumbnailThread.queueThumbnail(imageView, item.getUrl());

            return convertView;
        }
    }

And that’s it. ThumbnailDownloader itself is a very simple image downloader. It downloads each image one by one from Flickr on a single thread. If a request is invalid or out of date, it skips over to the next request. It has some nice properties, too: it’s simple, small and easy to understand.

There are a few drawbacks to this implementation, though. One is that I have a lot of integration with the lifecycle of my fragment: I have to initialize my thread in three ordered steps, I have to manually clear out stale requests, and I have to shut down my thread when I’m done with it. I could solve some of these problems by centralizing my image downloader in a singleton, but then my implementation would need to be able to handle multiple client fragments simultaneously, making it more complicated.

Okay, enough boring setup. Let’s get to the juice.

The Slickness: Picasso

Picasso comes from the good folks at Square, and it’s the last entry in their Seven Days of Open Source leading up to Google I/O. It’s focused, small and has a wonderfully tiny interface.

Pulling it into your project is as straightforward as these things get. If you’re using maven, add a few lines to your pom file. If you’re not, just download a jar file and include it.

Square claims easy integration into your code, too, stating that

Picasso allows for hassle-free image loading in your application—often in one line of code!

That one line of code looks like this:

    Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);

Square tells the truth. This code is almost exactly what my code in PhotoGallery ended up looking like. All the code onCreate(), onDestroyView() and onDestroy() ended up going away, and my adapter implementation turned into this:

    private class GalleryItemAdapter extends ArrayAdapter<GalleryItem> {
        public GalleryItemAdapter(ArrayList<GalleryItem> items) {
            super(getActivity(), 0, items);
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            if (convertView == null) {
                convertView = getActivity().getLayoutInflater()
                        .inflate(R.layout.gallery_item, parent, false);
            }

            GalleryItem item = getItem(position);
            ImageView imageView = (ImageView)convertView
                    .findViewById(R.id.gallery_item_imageView);

            imageView.setImageResource(R.drawable.brian_up_close);
            Picasso.with(getActivity())
                .load(item.getUrl())
                .noFade()
                .into(imageView);

            return convertView;
        }
    }

That’s the entire implementation. I broke my implementation out into more than one line for clarity, but other than that it is the same. Picasso also includes the ability to specify a placeholder image, but I didn’t use it. As of this writing, Picasso’s implementation seems to override your ImageView’s scaling behavior, so I set my own placeholder.

I also had to disable a default behavior. Out of the box, Picasso displays a slick fade-in animation when your image loads. This is actually nice to see in Android—we rarely get any free visual spiff. In our case, though, the fade-from-white animation looked a little odd on PhotoGallery’s black background. I turned it off with a call to noFade().

I don’t demonstrate it here, but the other interesting thing you can do is transform the image in various ways, by scaling it, cropping it, and so on and so forth. Most of this is what I’d call nifty. Particularly nifty is that the transformations are performed prior to caching, which would be a big win in some scenarios.

Pros and cons of Picasso

So what do I get with those five lines?

  • An automatically created singleton image downloader (which you can do without if you like)
  • Memory and disk caching of uncompress imagery, post-processing
  • Request cancellation
  • Multiple downloads at one time

A couple of things jumped out at me as being handy for embedding Picasso into existing apps:

  • It plays nicely with existing code. No custom ImageView subclass is necessary. In PhotoGallery, no changes needed to be made to my adapter code, apart from ripping out the old image code and plugging in the new.
  • Picasso’s got its own networking layer. If your own networking layer is based off an ExecutorService, you’re in luck. Just plug it in to a Picasso instance, and they’ll run off the same thread pool.

And how can Picasso be extended? My example doesn’t explore it much, but you’ve got a few options:

  • You can make your own custom image transformations. These plug right in alongside the existing transformations.
  • You can plug in your own image loader. This could be handy if you’re doing something like deploying some precached results as assets.
  • You can define your own targets for image loads, handy if you’re loading images into something other than ImageView.

Finally, one thing I found to be a hassle with Picasso: scaling and fitting my images correctly. Picasso doesn’t respect the `scaleType` attribute on your ImageViews, and the following code fails at runtime:

    Picasso.with(getActivity())
        .load(item.getUrl())
        .placeholder(R.drawable.brian_up_close)
        .centerCrop()
        .noFade()
        .into(imageView);

This is Picasso’s raison d’etre. So why is it difficult?

Picasso’s strength is also its weakness: it caches scaled and cropped image requests. This means that it has to know how big the image is at the time you request it. Unfortunately, you will not know how big the image needs to be at the time you usually build the request: right after you create your view.

A more general solution: Volley

During I/O itself, we heard about a completely different solution: a library called Volley from the Android dev team.

I’ll admit to being extremely excited about Volley after seeing Ficus Kirkpatrick’s presentation. (Just ask Chris Stewart if you don’t believe me.) See, Volley isn’t an image loading library—it’s an asynchronous networking library. And what’s the hard part of image loading? Generally it’s the networking and caching parts!

Here’s an example of what a Volley request and response look like. It’s a Vollified version of the code that fetches the initial list of picture XML data from Flickr:

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        mQueue = Volley.newRequestQueue(getActivity());

        GalleryItemRequest itemsRequest = GalleryItemRequest.newRecentItemsRequest(null, 
                new Listener<ArrayList<GalleryItem>>() {
            @Override
            public void onResponse(ArrayList<GalleryItem> items) {
                mItems = items;
                setupAdapter();
            }
        });

        itemsRequest.setTag(this);

        mQueue.add(itemsRequest);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        mQueue.cancelAll(this);
    }

GalleryItemRequest is a custom Volley request object I wrote to parse an XML network request into a set of model objects. The old implementation fetched the items from doInBackground() in an AsyncTask and setup the adapter in onPostExecute(). This implementation has a smaller footprint in my controller code, and also has the advantage that the request gets cleaned up in onDestroy() if the user navigates away for some reason.

This is exciting because traditionally, networking in Android has been hairy. Asynchronous networking would be ideal, but in Android it’s problematic, because your controller components are popping in and out of existence all the time. In practice, something like our AsyncTask implementation is common. We explain how it all works in our book, but I have often wished for something simpler. Volley looked like it’d be just the ticket for me.

So how do we integrate image loading? The very first step is actually to integrate this library into our app. Unfortunately, this isn’t as easy as with Picasso. Volley lives in AOSP, but it is not (for the time being) exposed as a library through, for example, the support library. That means there’s no github page, no jar file or maven distribution. I ended up downloading a copy of Volley’s source to my machine and compiling my own jar.

Once you’ve done that, the first step is to create two things: a RequestQueue and an ImageLoader.

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        ...

        mQueue = Volley.newRequestQueue(getActivity());

        mImageLoader = new ImageLoader(mQueue, new ImageCache() {
            @Override
            public void putBitmap(String key, Bitmap value) { }

            @Override
            public Bitmap getBitmap(String key) {
                return null;
            }
        });

        ...
    }

Note that in a real-world app, your fragments wouldn’t be cluttered with this sort of initialization code. Instead, you’d probably have a shared instance of these two components across the entire app.

Now, the ImageLoader requires an implementation of ImageCache. As of this post, Volley doesn’t include any implementations out of the box, so I have provided an empty one that doesn’t cache anything. This doesn’t mean there’s no caching—Volley caches HTTP response data for you. Not having an image cache here does mean that my images will be decoded every time they’re displayed, though.

Next is to integrate into the adapter. Volley can work with bare ImageViews, but it is a little verbose. To make it easier, Volley provides a class called NetworkImageView. I’ve created an alternate layout file called gallery_item_network.xml that includes a NetworkImageView. I then inflate and configure it:

    private class GalleryItemAdapter extends ArrayAdapter<GalleryItem> {
        public GalleryItemAdapter(ArrayList<GalleryItem> items) {
            super(getActivity(), 0, items);
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            if (convertView == null) {
                convertView = getActivity().getLayoutInflater()
                        .inflate(R.layout.gallery_item_network, parent, false);
            }

            GalleryItem item = getItem(position);

            NetworkImageView imageView = (NetworkImageView)convertView
                    .findViewById(R.id.gallery_item_imageView);
            imageView.setDefaultImageResId(R.drawable.brian_up_close);
            imageView.setImageUrl(item.getUrl(), mImageLoader);

            return convertView;
        }
    }

And that’s it.

Pros and cons of Volley

So what’s nice about Volley?

  • The networking part isn’t just for images. Volley is intended to be an integral part of your back end. For a fresh project based off of a simple REST service, this could be a big win.
  • NetworkImageView is more aggressive about request cleanup than Picasso, and more conservative in its GC usage patterns. NetworkImageView relies exclusively on strong memory references, and cleans up all request data as soon as a new request is made for an ImageView, or as soon as that ImageView moves offscreen.
  • Performance. This post won’t evaluate this claim, but they’ve clearly taken some care to be judicious in their memory usage patterns. Volley also makes an effort to batch callbacks to the main thread to reduce context switching.
  • Volley apparently has futures, too. Check out RequestFuture if you’re interested.
  • If you’re dealing with high-resolution compressed images, Volley is the only solution here that works well.

This last point is worth an aside: Android does not handle high-res images well at all. I have a small obsession with the pattern of catching OutOfMemoryError in Android apps. It seems like a ridiculous tactic, but it’s the only way to reliably handle some image scenarios.

Sure enough, when I looked through Volley I found that it catches OutOfMemoryError. I knew I’d want to test it, so I modified PhotoGallery to download the original resolution image instead of the thumbnail version. The original implementation blows up. The Picasso version doesn’t blow up (it catches OutOfMemoryError, too), but it fails to load any images that are too large. Not only does Volley not blow up, but it displays all these large images with aplomb.

So what about embedding Volley into an existing app?

  • Volley prefers to deal with NetworkImageView, not ImageView. It’s possible to work around this, but you will find Volley integration more painful if you don’t have the freedom to change which class your images are displayed in.
  • Volley’s networking is self-contained. There’s no ExecutorService to plug into like there is for Picasso, so there’s no way to make Volley’s threading play well with Picasso’s.

Extending with Volley is a different story than it is for Picasso. See, Picasso is totally focused on image loading. As a result, if you have quirks in your image loading process, then there’s a hook there to hang your quirk on.

Volley, on the other hand, is totally focused on handling individual, small HTTP requests. So if your HTTP request handling has some quirks, Volley probably has a hook for you. If, on the other hand, you have a quirk in your image handling, the only real hook you have is ImageCache. It’s not nothing, but it’s not a lot, either.

The other drawback to that focus is that as soon as one “request” on the front end is really multiple HTTP requests, you can’t extend Volley. Instead, you have to build something on top of it.

Which Library Should I Use, Then?

Good question. If you’ve gotten this far, you can tell that Picasso and Volley are very different animals. Picasso does just one thing, while Volley tries to solve a more general problem.

So my feeling is that, if you have a large, stable, pre-existing project, you are probably better off using Picasso. Integration is painless, performance seems good, and if the fade-in works for you, you get some free visual fun, too.

If, on the other hand, your app is new, or if it’s small enough that you can think about swapping out the back end completely, and it deals mostly with small HTTP payloads, Volley is worth considering. Once you define your requests, using them from within a fragment or activity is painless. And unlike parallel AsyncTasks, you don’t have to worry about spinning up too many threads, or potential missteps with shared state.

Or what about using both at the same time? If Volley’s image management causes you severe pain, then you’re probably fine using both. I wouldn’t start off using both, however. Picasso solves a couple of pain points that Volley doesn’t address, and it’s trivial to integrate, which means that you should be perfectly fine putting off switching to Picasso until it’s necessary.

The post Solving the Android image loading problem: Volley vs. Picasso appeared first on Big Nerd Ranch Blog.

09 Jul 13:45

US Commerce Department destroyed $170,000 worth of TVs, mice, and more to root out malware

by Jacob Kastrenakes
Mouse-765_large

Though the US military has been preparing itself for digital warfare, other government agencies still seem to be struggling with how to handle basic cybersecurity: last year, the Department of Commerce spent over half of its IT budget — more than $2.7 million — chasing down what appeared to be a major malware infection. The department destroyed over $170,000 worth of equipment in the process, including printers, TVs, and mice, and only stopped destroying them when its disposal budget ran out. But, as the department's own auditor put it, "The destruction of IT components was clearly unnecessary." Indeed, throwing away computer mice seems like a poor approach to ridding an organization of digital threats.

As it turned out, the...

Continue reading…

09 Jul 13:43

Somali American found out his website was caught in a Pentagon 'psyops' campaign from Google Alert

by Joshua Kopstein
030926-f-2828d-089_large

The military's shadowy "counterpropaganda" efforts, known as psychological operations or "psyops," have historically been limited to war zones outside of the domestic United States and tasked with strategically spreading information (and misinformation) in order to disrupt US adversaries. But recently, a Somali American living in Minnesota learned through a Google Alert that his online news aggregator was in the sights of a military contractor involved in “information operations to engage local populations and counter nefarious influences” in Africa and Europe.

The blurry territory between domestic policing and foreign military operations

The Washington Post reports that the United Somalia news aggregator, run by a...

Continue reading…

08 Jul 13:57

Top iOS apps and games go free ahead of App Store's fifth anniversary

by Sam Byford
Screen_shot_2013-02-21_at_11

A host of highly regarded apps for iPhone and iPad have gone free today in what could be a major celebration to mark five years since Apple launched the App Store. So far, games such as Infinity Blade II, Superbrothers: Sword and Sworcery EP, Where's My Water?, Badland and Tiny Wings are all on offer for nothing, alongside apps such as Traktor DJ, Day One, Over, and Barefoot World Atlas.

Continue reading…

08 Jul 13:41

Deals with foreign cable owners, secret court rulings broaden NSA spying potential

by Megan Geuss
Undersea cables have been a communications fixture for a long time.

New information this weekend gave a glimpse into the efforts made by the US to establish a broad network of surveillance around the world. Some of the efforts involve using a proxy telecommunications company to manage the information gathered by local telecom companies in foreign countries, creating internal corporate cells with access to foreign-owned fiber optic cables, and using unchallenged rulings from Foreign Intelligence Surveillance Courts (FISC) to broaden the NSA's powers.

Brazilian newspaper O Globo and UK paper The Guardian published articles on Saturday alleging that the NSA was collecting and storing the e-mail and telephone records of millions of Brazilians through a program called FAIRVIEW. According to The Guardian, that program allows the US to partner with “a large US telecommunications company, the identity of which is currently unknown, and that US company then partners with telecoms in the foreign countries. Those partnerships allow the US company access to those countries' telecommunications systems, and that access is then exploited to direct traffic to the NSA's repositories.”

The Guardian article referenced an earlier post from Der Spiegel, which reported similarly broad surveillance of Germany's citizens. According to Spiegel, “the NSA systematically monitors and stores a large share of the country's telephone and Internet connection data,” which grabs “up to 20 million telephone calls and 10 million Internet data exchanges” on normal days.

Read 12 remaining paragraphs | Comments

    
08 Jul 13:36

Did you know John Roberts is also chief justice of the NSA's surveillance state?

by Ezra Klein

Chief justice of the United States is a pretty big job. You lead the Supreme Court conferences where cases are discussed and voted on. You preside over oral arguments. When in the majority, you decide who writes the opinion. You get a cool robe that you can decorate with awesome gold stripes.

Oh, and one more thing: You have exclusive, unaccountable, lifetime power to shape the surveillance state.

To use its surveillance powers -- tapping phones or reading e-mails -- the federal government must ask permission of the court set up by the Foreign Intelligence Surveillance Act. A FISA judge can deny the request or force the government to limit the scope of its investigation. It's the only plausible check in the system. Whether it actually checks government surveillance power or acts as a rubber stamp is up to whichever FISA judge presides that day.

The 11 FISA judges, chosen from throughout the federal bench for seven-year terms, are all appointed by the chief justice. In fact, every FISA judge currently serving was appointed by Roberts, who will continue making such appointments until he retires or dies. FISA judges don't need confirmation -- by Congress or anyone else.

No other part of U.S. law works this way. The chief justice can't choose the judges who rule on health law, or preside over labor cases, or decide software patents. But when it comes to surveillance, the composition of the bench is entirely in his hands, and, as a result, so is the extent to which the National Security Agency and the Federal Bureau of Investigation can spy on citizens.

"It really is up to these FISA judges to decide what the law means and what the NSA and FBI gets to do," said Julian Sanchez, a privacy scholar at the Cato Institute. "So Roberts is single-handedly choosing the people who get to decide how much surveillance we're subject to."

There's little evidence that this is a power Roberts particularly wants. Tom Clancy, a professor at the University of Mississippi School of Law, has analyzed Roberts's record on surveillance issues and been impressed mostly by how little interest in them Roberts displays. The chief justice doesn't push the Supreme Court to take cases related to surveillance powers, and when such cases do come up, he tends to let another justice write the opinion. "He does not have much of a record in this area at all," Clancy said.

To the degree Roberts's views can be divined, he leans toward giving the government the authority it says it needs. "He's been very state-oriented," Clancy said. "He's done very little writing in the area, but to the extent he has, almost without exception, he's come down in favor of the police."

Roberts's nominations to the FISA court are almost exclusively Republican. One of his first appointees, for instance, was Federal District Judge Roger Vinson of Florida, who not only struck down the Affordable Care Act's individual mandate but the rest of the law, too. (The Supreme Court disagreed.) Vinson's term expired in May, but the partisan tilt on the court continues: Only one of the 11 members is a Democrat.

Critics contend the FISA court is too compromised to conduct genuine oversight. It meets in secret, and the presiding judge hears only the government's argument before issuing a decision that can't be appealed or even reviewed by the public. "Like any other group that meets in secret behind closed doors with only one constituency appearing before them, they're subject to capture and bias," said Elizabeth Goitein, co-director of the Brennan Center for Justice's Liberty and National Security Program.

A Reuters investigation found that from 2001 to 2012, FISA judges approved 20,909 surveillance and property search warrants while rejecting only 10. Almost 1,000 of the approved requests required modification, and 26 were withdrawn by the government before a ruling. That's a startling win rate for the government.

Perhaps the federal government is simply very judicious in invoking its surveillance authority. But it's also possible that empowering the chief justice -- especially one with an expansive view of state police powers -- to appoint every FISA judge has created a tilted court. That's probable even if the chief justice has been conscientious in his selections.

Harvard Law School professor and Bloomberg View columnist Cass R. Sunstein has found that judges are more ideologically rigid when their fellow judges are from the same party, and more moderate when fellow judges are from the other party. "Federal judges (no less than the rest of us) are subject to group polarization," he wrote.

The FISA court is composed of federal judges. All are appointed by the same man. All but one hail from the same political party. And unlike judges in normal courts, FISA judges don't hear opposing testimony or feel pressure from colleagues or the public to moderate their rulings. Under these circumstances, group polarization is almost a certainty. "There's the real possibility that these judges become more extreme over time, even when they had only a mild bias to begin with," Cato's Sanchez said.

Just as the likelihood of polarization in the FISA court is more pronounced than in normal courts, the stakes are also higher. If trial judges are unduly biased, their rulings can be overturned on appeal. But FISA judges decide the momentous questions of whom the government may spy on and how. Their power is awesome, and their word is final. As the great legal scholar Kanye West said, no one man should have all that power.

    


07 Jul 22:38

Douglas Engelbart (1925-2013)

Actual quote from The Demo: '... an advantage of being online is that it keeps track of who you are and what you’re doing all the time ...'
07 Jul 20:38

Bed, Bath And Beyond Display Bursts Into Flames, Caught On Camera By Customer

by Laura Northrup
Chris Benard

Can you please go? OUT OUT OUT!!!

Imagine that you’re shopping at Bed Bath and Beyond, and you see a bedding display on fire. Would you whip out your mobile phone and walk toward the flames to take a video, or turn around and run the hell away? We prefer when our readers stay alive, so we recommend the second option. One California shopper chose differently, which is why we have this disturbing video.

It’s not disturbing because of the fire: it’s disturbing precisely because the shopper tries to get a better view and resists store employees’ attempts to herd him out of the store.

According to NBC San Diego, the fire did set off the store’s sprinkler system, but that wasn’t enough to keep up with a shelf full of densely packed bedding. Firefighters arrived and extinguished it, but there’s still significant damage to the store. Mostly water damage. They may lose a lot of merchandise as well, since the fire was in the bedding department. No one wants to buy a smoky duvet.

Authorities are investigating the cause of the fire using store surveillance footage.

Again, if you wander into something newsworthy, you should never film videos vertically on your phone. Ever. Safety first, though: when you see flames, run away.

Caught on Cam: Store Display Explodes in Flames [7 San Diego]


07 Jul 16:31

Douglas Engelbart, inventor of computer mouse and so much more, dies at 88

by Cyrus Farivar

If you’ve used a mouse to click this article, you can thank Douglas Engelbart. The longtime inventor passed away in the late hours of July 2 at his home in Atherton, California. He was 88 years old.

In addition to inventing the computer mouse, Engelbart helped develop other technologies that have become commonplace in the computing world, including pioneering hypertext, networking, and the early stages of graphical user interfaces. He will always be one of the giants of Silicon Valley.

Most famously, Engelbart gave a now-legendary presentation on December 8, 1968 in San Francisco later known as “The Mother of all Demos.” In it, he gave the world’s first demonstration of the computer mouse, video conferencing, teleconferencing, hypertext, word processing, hypermedia, object addressing and dynamic file linking, and a collaborative real-time editor.

Read 4 remaining paragraphs | Comments

07 Jul 16:30

France also scoops up phone, Internet metadata on its citizens

by Nate Anderson
DGSE headquarters, blurrily hiding near the Parisian Périphérique
Google Maps

While Americans were celebrating the July Fourth holiday, French newspaper Le Monde was busy stirring up controversy across the Atlantic with news that the French security services are involved in NSA-style tapping of Internet and phone communications, text messages, and faxes. They have been successful enough that most electronic communications in France are now vacuumed up by the direction générale de la sécurité extérieure (DGSE), which warehouses them in servers occupying three floors of the DGSE's Parisian headquarters.

The focus is on metadata, not content, and as with the NSA, is apparently used to graph webs of connection between groups and individuals. Should useful patterns emerge, intelligence operatives can seek "more intrusive techniques, like wire-tapping or police tails."

Le Monde argues that the system is "perfectly illegal"—or at least extra-legal in the sense that nothing like it had ever been anticipated under intelligence laws passed in the early 1990s. The DGSE data is also not tightly compartmentalized—six other French intelligence agencies can make requests for database searches, used for everything from customs to money-laundering. But the stated goal of the system is—surprise!—terrorism. From Le Monde:

Read 2 remaining paragraphs | Comments