Starting the Reactive Journey

Share if the site was helpful

Starting the Reactive Journey

If you’re an Android developer, then odds are you’ve heard of RxJava.  It’s a popular library that utilizes the observer pattern.  Rx (ReactiveX) allows us to program reactively, meaning our code can be executed as events happen.  It’s tough to fully wrap your head around it at first, but once you get it your codebase can become more efficient and clean.

The Observer Pattern:

The Observer pattern (and RxJava) revolves around three key concepts.  The three O’s: observables, observers, and operators.  When combined these three allow us to emit information, modify it, and then react to it.  The best way to think about the observable pattern is to consider everything a stream. Data starts at the top of a stream and flows downhill.  On its way down things can happen to it to modify the data, and then at the bottom of the hill we use the data.

This is a high-level view of how the observer pattern works.  Think of observables as the top of the stream, operators changing the data on its way down, and observers as the bottom of the hill.  Ok, maybe this analogy will make a little more sense after you learn a little more about each of these O’s.

Observables:

An observable is something that can be observed.  It is something that emits data that we can react to.  A good example that already exists in Android is a button.  Whenever a button is pressed by the user it emits data. That data is basically just saying “I was pressed”, but it’s still data emitted from an observable!  What we do with that data is our option and none of the observable’s concern (think about the standard Android button; it just knows it was pressed, we write the logic for what it does).

So an observable is…literally something that is observable.  Real life examples could be a movie playing or a singer singing. These are things we could watch happen, but they don’t really impact us until we observe them.  Which brings us to the bottom of the stream.

Observers:

We’ll skip over operators right now and jump straight to observers because they are essential to this paradigm. So we have a movie playing already (the observable), and once we turn on the TV to watch it we have become the observer. The data (movie) is coming to us and we can react to it however we want.  Likewise, with an observer in Android we can write a function to react to the data an observable emits.

In the RxJava world observables don’t always have to emit just one piece of data, that’s the beauty of it.  They can emit thousands and thousands of pieces of data, and then observers can react to each and every piece of data if they see fit.  And just like multiple people can watch one tv, multiple observers can observe one observable.

Wrapping Up:

It’s a lot of “o” words I know, but the concept is pretty simple.  Observables emit data, observers react to it.  We’ll dive into plenty of code in part 2, so stay tuned for that as well as examples of how operators come into the mix!  RxJava takes a little while to get down, but once you do it’s too addictive to quit!

Samsung Leaks Unfold

Share if the site was helpful

Samsung Leaks Unfold

The newest trend in Mobile is upon us.  We’ve seen generation follow generation of smartphones each with more features than the last, and while the software has changes dramatically the physically devices have just changed in size.  2019 is the year that this changes as the world adopts its first foldable phones (again!).

Samsung’s Leak(s)

Samsung announced the arrival of its first foldable phone a few months ago, but other than a few concept picture’s it’s just been floating around.  At their developer conference in November they unveiled the Infinity Flex flexible screen giving us a sneak peek at that idea.  Next week we can expect to see quite a bit more about this concept though.

The Galaxy S10 Unpacked event is scheduled for February 20th, and we have good reason to believe this event will also bring news about the foldable device. Ishan Agarwal, a reputable leaker, posted a GIF on twitter showing a demo of a phone folding.  With it he said

“EXCLUSIVE! Looks like Samsung’s sticking with the name ‘Galaxy Winner’ for the Foldable Phone right now. As far as I can see, the product page for special phone will be live after the event as well! Doesn’t exactly looks like a final name but it is I guess. Welcome Galaxy Winner!”

Winner is the rumored codename for the Galaxy F right now, and if what Ishan posted is true, then we will be seeing two new product pages after the event.

More on the S10:

There’s a lot of hype around the Galaxy F since it’s a revolutionary product, but let’s not forget the S10 is making its debut.  One of Samsung’s biggest leaks ever has just taken place releasing full specs for the three new phones we’ll be seeing soon.  These are the Galaxy S10e, S10, and S10+. It looks like they’ll range in size from 5.8 inches to 6.3, along with a side fingerprint sensor and facial recognition.

There’s no lack of pixels on these screens either.  The S10e weighs in at 2280 x 1080 with 438 ppi, the S10 at 3040 x 1440 with 550 ppi, and the S10+ at 3040 x 1440 with 522ppi.  We have some great displays on their way, and they’ll be running the newest software for a superb user experience.

Why So Sudden?

With the world waiting to see more of the S10 next week, why would Samsung mesh in a release of such a groundbreaking phone at the same event?  Because of healthy competition.  Huawei will likely be unveiling their first foldable handset later this month as well, and if you’re not first you’re last.

I’m sure we’ll see this trend in quite a few phone makers over the next year or two, and I’m particularly interested to see if Google takes any action with a foldable Pixel.  What are your thoughts on foldable devices?  Let us know in the comments below!

 

Magic Leap is Moving into Mobile

Share if the site was helpful

Magic Leap is Moving into Mobile

Augmented reality has been all the rage the past few years.  From headsets to mobile apps we’ve seen it start to infiltrate every piece of technology.  One of the companies behind this infiltration is Magic Leap.  They released their first headset last August after nearly 10 years of development work.  And now it seems their looking to up the ante by bridging the gap between headsets and phones.

Magic Leap’s History:

Magic Leap has been flying under the radar for quite some time now.  Their central product is a head-mounted virtual retina display which superimposes 3D images over real-world objects.  That’s the fancy way of saying AR goggles.  And fancy they are!  The company has raised more than $1.4 billion in investment capital since 2010 and in 2016 was valued at $4.5 billion by Forbes.

So the company has some serious backers, and in 2018 when they released their goggles for the first time they were available only to investors.  I wish I could say I’ve tried them on, but I unfortunately can’t attest to their experience.  CNBC, however, was granted an exclusive trial run of the goggles and the description is quite amazing.

Their tester wrote about how he was able to “place” a tv anywhere in a room to watch an NBA game. What’s more he could also place a 3D rendering of the entire game on the floor and walk around it seeing live gameplay from every angle.  Seriously, just think about this for a second and all the possibilities it holds!

Seeking AR Mobile Developers:

The goggles can already do some pretty sweet things, and when they came out in August they came with a mobile support app.  The main purpose of this was to help users with setup, but it seems now Magic Leap is hoping to go further.  Earlier this month they posted a job description for a senior software engineer with experience in mobile AR.  The description says

“In this role, you will help build a cross-platform framework that enables large scale shared AR experiences between mobile devices (iOS, Android) and Magic Leap devices. Your work will include implementing high-performance, production quality AR and computer vision algorithms, and designing and building the Magic Leap mobile SDK.”

ARKit and ARCore:

It also lists the developer should have experience with ARKit and ARCore, the AR frameworks by Apple and Google respectively.  The company’s CCO spoke on this saying that undoubtedly the whole world will not use Magic Leap’s goggles, but they should all have access to a smaller version of the experience.  Rio Caraeff said “…if there’s a 500 foot tall dragon in Central Park, you know we all want to see the dragon, not just the people with Magic Leap. And so we need an interoperability solution.”

Regardless of if you’re interested in Magic Leap as a company, the simple fact that AR is penetrating every corner of our world is undeniable.  That being said, the sooner you get in on the action the more likely you are to ride the wave up!  What are your thoughts on Magic Leap’s goggles?  Let us know in the comments below.

 

en English
X