Making Material Design Work For You

Share if the site was helpful

Making Material Design Work For You

So you’ve built an app.  You’ve come up with a million dollar idea and you’re ready to build it and market it to the masses.  The concept is there and you know enough to develop it.  But does it look…good?

There’s a lot more to that one simple question than we initially see.  No matter what your app has to offer the world, people aren’t going to keep coming back to it unless it has a well designed interface.  This means that things should be both pleasing on the eyes and easy to use.  Users should find themselves knowing exactly where to look when they want something to happen.

So how can we design such an app?  There’s full courses for this one concept that you could enroll in, but here are some key highlights to making your app pop:

ConstraintLayout:

If you’ve taken intro to Android programming courses before then chances are you’ve done a little design with LinearLayout and RelativeLayout.  These are simple ViewGroups that you can use to organize the images and text on a user’s screen.  While these are useful at times, if used improperly they can start to bog down your app (learn why here!).

ConstraintLayout offers a more efficient way to group your apps exactly how you want them on your screen.  You can group your images in relation to one another on the screen or choose to position them a percentage away from your edges.  Really if you can think of a way you want to organize things, chances are there’s a way to do it with ConstraintLayout.  And without hurting your performance too!

Surfaces:

A simple way to think about the surfaces in your app is in terms of pieces of paper being stacked upon one another.  You can have views side by side or on top of one another, but however you organize things you want the user to know what’s important and what’s just extra.  Changing the elevation of your surfaces can bring what your want to the forefront and control where the user is looking.  It’s sneaky, but it makes a world of difference. 

By raising the elevation of a view a bit it begins to cast a shadow onto the views below it.  This way the end user gains a 3D perspective of what objects are closer to them and thus deserve attention.  Things like Floating Action Buttons (FABs) have this built into them already.  Use them wisely thought, as overcrowding your screen with elevated views can make it just look crowded and sloppy.

Custom fonts:

Style runs deep.  Deeper than just picking a font that you think looks neat.  Fonts with a very static and bold tone can give off the impression that your app is serious.  This can be great if you’re making something like a banking app that wants users to take it seriously and see it as secure.  But if you use one of those fonts with an art app it will be very unrelatable.  Likewise if you have a security based app that has fancy cursive writing users will naturally assume that the creators cares more about looks than performance and may lose faith in it.  Obviously I can’t pick for you, but I can tell you the decision matters!

Transitions With Motion:

As I said earlier your user should know what to do without even thinking about it.  This is where transitions and motion can come in handy.  Take for example a list of songs that a user can scroll through.  Well, if your user doesn’t know much about the app and their screen just so happens to load evenly (aka there are no songs cut off at the bottom), they might think they’re already looking at the whole list.  This would be tragic as they wouldn’t know to scroll down and might assume you just don’t have many songs available.

To fix this you could design your app so that when the list appears it slides in from the bottom of the screen.  This way the user sees it scroll a little upon launch, and their pattern recognizing brain will naturally assume it can keep scrolling.  It’s small, but given the right situation the impact can be huge.

What do you look for in an app when you download it?  Or more importantly what have apps lacked in that made you think twice about keeping them?  Let us know in the comments below!

Keeping Your Keys Safe

Share if the site was helpful

Keeping Your Keys Safe

At some point in your app development career, you’ll create an app that has secrets.  By this I mean there will be keys inside that you want to keep secure from prying eyes.  If someone else gets a hold of your private info, the results could be disastrous (or expensive).

Let’s say your app uses Amazon Web Services and your monthly bill runs about $350 a month. That’s fine because you’re making the money back through app usage.  That is, until a 3rd party gets a hold of your secret key and decides to use it for their own purposes.  Then when your next bill comes due you find that you’re being charged for $50,000.

Not an exaggeration.  This exact scenario actually happened.  So the lesson is painful but memorable: secrets should be kept secret!  Let’s use this blog to talk about a couple ways people tend to store their keys and what you should avoid.

Avoid pushing keys to github:

I’ll start with what may sound obvious.  That sight that you put all of your code onto so that people can publicly view it?  Yeah, don’t put your secret keys up there.  This sounds obvious, but recent studies have shown thousands upon thousands of keys are available on public git repositories.  It’s possible your using a free service and don’t care, but if you’re being charge even a dollar for the service you’re using, keep it close to your heart.

Storing keys as basic Strings:

DON’T DO THIS!  Storing a key as a simple string is just asking for trouble.  There a couple issues behind this, but first and foremost is that it’s incredibly easy to access.  If you read our primer on reverse engineering apps then you know that it’s possible for 3rd parties to decompile your app and look at its code in its (almost) original form.  Storing a key as a string means the hacker just has to glance over your code and look for something that looks like a key.  Then it’s theirs and they can do what they want until you change it. 

Defining keys in build.gradle:

This is better than storing your keys as Strings in any old file, but the end result is unfortunately similar.  A lot of people put their keys in build.gradle in such a way that it’s created in the BuildConfig file of your app.  The bright side is your gradle file isn’t decompiled along with the rest of your app, so secrets are safe in there.  The downside?  Well, that BuildConfig class they were just created in isn’t as secure.  Again, our Strings are exposed in a very simple to access way.

Securing keys with Android NDK:

Let me take a second here to say something important: There is no such thing as absolute security.  If you’re going to have a secret in your app, all you can truly do is make it incredibly difficult to find.  Take the proper precautions to keep things safe, and a hacker will have to decide if it’s worth the time/energy to get to whatever is hidden.

With that said, the Android NDK (Native Development Kit) can help us use C and C++ code with Android.  Why would we want to do this?  Well for starters NDK libraries can’t be decompiled, so the information inside is a lot harder to find.  There are ways to access this code all the same, but we won’t go into them here.  It’s not perfect, but this will throw quite a few entry level hackers off your tail.

Make your code complicated:

This one again goes to what I said earlier about complete security.  It won’t happen, but you can make a hacker’s life hell by making your keys as hard to read as possible.  Let’s take a very basic example:  If your key was 123456, instead of storing that, you could make it the sum of the strings “12”, “34”, and “56”.  How you can break this up depends on how creative you can get, but there really isn’t a limit.  It just means more work for you both upfront and down the road to ensure you understand everything your code is doing.

Keeping keys safe is crucial for a large apps success, so you need to take precautions to avoid disaster.  If you have any suggestions for great ways to hide Strings inside your app let us know in the comments below!

Google I/O, Until Next Year

Share if the site was helpful

Google I/O, Until Next Year

Well Google I/O is a wrap everyone, and if you tuned in then hopefully you left with some cool takeaways.  If not then don’t worry, that’s what we’re here for.  When the conference first kicked off we wrote about day 1 and its highlights, but obviously the fun didn’t stop there.  The following is a crash course selection of (in my opinion) the most important and amazing takeaways for and android junky.

Flutter:

If you’re an android developer, then your undoubtedly familiar with Java and segueing in to Kotlin.  You might not have heard about Flutter before though.  It’s Google’s mobile app SDK for easily creating high quality apps on both Android and iOS devices.  Written in Dart (a language developed by Google as well), Flutter works with existing code and is used to develop at ridiculously high speeds.  Here’s a great video from Google I/O that goes more in depth on how to use Flutter to enhance your material design.

Duplex:

Now this one blows my mind, and I know I’m not alone here.  When you think of a sci-fi future it’s reasonable if computers playing our personal secretaries pops into your mind.  This seems to be the present now. 

I’m very interested to see how Duplex functions successfully in real world applications, but the Google 2018 keynote showed a quick performance of the Google Assistant booking a haircut appointment for Google’s CEO, Sundar Pichai.  From an outsider’s view the conversation was impossible to distinguish from an everyday conversation between two people, and when it was done the Google Assistant confirmed to Sundar that the appointment had been booked and added to his calendar.  It’s only a matter of time before this is both client and server side so that duplex will be having conversations with itself to schedule our days, and that’s pretty wild.

Android P Beta:

Yes, I know we discussed android P in the last blog on Google I/O.  But you’ll have to bear with me because it’s happening again! As of this week the Android P beta is available on Pixel devices as well as 7 other flagship devices.  Android P brings all kinds of cool new features to the table.  A lot of these revolve around predicting what you the user are about to do.  There’s an adaptive battery that adjusts your screen’s brightness and what apps are running in an effort to both improve your experience and conserve precious battery power.

My personal favorite feature of P is Wi-Fi RTT.  Round Trip Time takes our current location services capabilities and amplifies them.  Essentially by triangulating between multiple Wi-fi access points nearby, a user’s position can be calculated within about a meter.  Just use your imagination for what applications this could come in handy for!  For more on Android P you can read our past posts or watch some Google I/O talks.

There’s lots more to take away from Google I/O, and honestly I’m cutting myself off here because otherwise I’d end up writing a paragraph or two about every session that I watched from the entire conference.  It’s a great year to be an android developer or even just own an android device.

What interested you the most from the conference?  Let us know in the comments below!

 

Google I/O Is In!

Share if the site was helpful

Google I/O Is In!

We’ve talked about Google I/O being on the horizon here before, but we can do that no longer.  It’s here! (Actually once it’s over we’ll probably immediately start writing about 2019’s event).

Yes, today marks the kickoff of Google’s 11th annual conference.  And as such the entire Android population has a lot of stuff to talk about.  Google I/O started off strong with its keynote mapping out some of the things to be discussed this year.  Here are some of the highlights of day one:

Artificial Intelligence:

As with most other places these days, AI was one of the most used buzzwords at day one.  It’s somewhat become an all encompassing term for any technological advancement that helps us.  Despite this, Google separates itself from the pack by bringing some pretty cool new features to the table.  Whether it’s self-writing emails or auto adjusting screen brightness to your preference, Google is working on slipping AI into every part of our days.

Actually it’s so much cooler than that.  In the video above at 3:10 you can watch the Google Assistant play as your personal secretary.  It makes a call to a local hair salon and books an appointment without the person on the other end ever realizing they’re talking to AI.  Scary cool.

Android P:

There’s been lots of hype about Android P in the past few months, and we got to see more today.  With it’s 3 key themes of Intelligence, Simplicity, and Digital wellbeing, Android P seeks to one up everything else already in your hand and provide a predictive, pleasant experience.  We’ve talked before about some of the new features coming with Android P, and today that list only gets longer.

Adaptive Battery is a feature aimed to conserving battery life by using (you guessed it) AI.  It studies your app usage patterns and then can dedicate more battery power to conserving the things that you will likely be using in the near future.  Along with this comes the Adaptive Brightness feature I mentioned above where your screen will auto-adjust given your preferences.

Not only does P look to alleviate your battery strain under the hood, but it uses its predictive analytics to bring apps you’re about to use to the forefront.  P is currently available on a select few devices (9 total), and if you’re interested in downloading it click here.  If you’re unsure what you’re doing and want support with flashing your phone, then check out our Smartphone Tech Course over at Phonlab.  Otherwise stay tuned and we’ll post a guide in the near future.

Augmented Reality:

As for the other big buzzword topic, Augmented Reality had some cool new features to display.  Maps have been souped up with the newest computer vision features to recognize where you’re looking in the real world and flash both directional arrows for guidance as well as information about local places.  If you’re walking down the street and a restaurant catches your eye, say goodbye to opening up yelp and searching for its reviews.

The camera has also become greatly enhanced with its new capability to recognize where things are in the real world in terms of depth perceptions.  Moving your phone around your room, office, or down the street you’re able to get live estimates of how far away things are.  This is sure to be crucial in a lot of coming apps.

There’s a lot more to come in this year’s Google I/O, and we’ll keep you updated here.  Is there anything in particular you want us to go more in depth on?  Comment below and we’ll give you all the info you could dream of!

 

 

 

 

Android’s Developer Website Just Got A BIG Makeover

Share if the site was helpful

Android’s Developer Website Just Got A BIG Makeover

If you’ve ever thought about developing for Android then chances are you’ve at least stumbled upon developer.android.com.  And chances are you left with a bitter taste in your mouth.  Fear not, things are looking up.

I remember my first time looking at Android’s developer docs.  I was a novice developer and as such the website was chock-full of useful information, but it seemed borderline impossible to navigate.  Countless topics linked into one another describing the different components of an app.  Couple this with all the attributes listed for each subject, and your brain quickly starts to spin.

What’s New?

I’ve discussed this navigation difficulty with others before, and that’s why I was so happy to hear the website just got a makeover.  First off, it looks much better.  Whitespace is used to give the new layout a sleeker more aesthetic look while the landing page emphasizes a preview for Android P.  Scrolling down from there the home page is neatly divided.  Sections for featured topics, material design, and where to begin your development journey pave the path.

But, of course, there’s much much more to this website than how it looks.  The most important thing is that someone who finds themselves here actually learns about what they’re looking for.  The new website does a much better job of guiding users who are in uncharted territory.  Selecting “Docs” in the top banner takes users to this page.

In here the core developer topics that every android programmer NEEDS to know about are listed.  Clicking on each of these links will take the user to a simple explanation accompanied with an intro video.  Then immediately below these are trees of related/more in-depth topics.  The result is an easy cursory explanation of each topic and then more complicated explanations for those that want to learn more.

Material Design and More

The website has tons of sections and features, but one other one I’d like to highlight is the “Design & Quality” tab.  It’s important to remember that there’s more to developing that just creating sound logic.  Users of your apps also have come to expect high quality layouts and design patterns.  This section of the website helps explain to developers how to wow users with apps that know what they want before even they do.

In summary, the old developer website was certainly useful, you just needed to know what you were looking for.  The new model offers a much easier guide for new entrants. It takes them by the hand and shows them both what topics are easy to comprehend and what fundamentals should be learned first.  Overall I think the new website is a vast improvement to its somewhat clunky counterpart, and I look forward to using it as my development journey continues.

Have you check out the new site and feel that it’s still missing anything?  Let us know in the comments below!

Counting down to Google I/O 2018

Share if the site was helpful

Counting down to Google I/O 2018

 

Google I/O is just around the corner.  Developers and Android users around the world are gearing up to see what’s in store for the coming year.  Theories about what the annual conference will entail are floating about, and Google’s recently updated its event schedule.  With last years discussions about AI, VR, and Android O things are sure to be interesting.

So what’s on the agenda for this year?

Android P

We’ve talked about Android P before here at RootJunky.com, and it’s sure to be discussed in a little more detail at the conference.  P (currently Pistachio Ice Cream) was first released as a developer preview at the beginning of March.  It’s featured things such as an improved notification system, notch support, and triangulated position with Wi-Fi for incredibly accurate positioning.  It’s expected that Google will launch a beta program for any interested users soon (and maybe give a few more hints to the upcoming name).

AI

Artificial Intelligence was all the rage at last year’s conference with Google Lens allowing users to scan real life objects and receive information.  Couple this with Google Assistant and Google Home improvements, and AI seems to be at the forefront of every new technological movement. 

Google Assistant appears quite a few times in the current schedule, so it’s sure to be a big discussion topic.  Assistant is already loaded with tons of features, but it would be silly to leave it as is.  One session is titled “Design Actions for the Google Assistant: beyond smart speakers, to phones and smart displays”.

Assistant could be expanding past voice interactions and into visual cues.  Along with the fact that improvements involve allowing 3rd party app integration, there could be some seriously cool possibilities if the creativity door is open for developers to allow their apps to prompt the Assistant to take action.  Notice how vague I’m being?  It’s because of how open ended these features really could get if the connection is bridged.

AR/VR

In February Google officially released v1.0 of ARCore, the mixed reality development platform, allowing developers to easily integrate Augmented Reality into their apps (way more exciting than I just made it sound).  Our tutorial series shows how to integrate AR into your first app, but ARCore’s potential goes much deeper than what we cover.  I wouldn’t be surprised if plans to improve this platform and potentially incorporate it with Google Lens are underway.

Looking over the current schedule, tons of other topics will be covered in the upcoming conference.  I’ll be one of the many that don’t attend but tune into what I can online.  I’d highly suggest you do the same to stay on top of what’s new in the development world.  Or if you’d prefer, we’re sure to highlight the big parts here.  Stay tuned!

Building Your First Augmented Reality App Pt. 2

Share if the site was helpful

Building Your First Augmented Reality App Pt. 2

Welcome to part two of this Augmented Reality tutorial.  Now that we’re done with the boring set-up process, we’re ready to dive into Unity and see a final product!

As a quick review, in part 1 you created a Vuforia account and a license key.  Then on Vuforia’s website you created a database to hold your image target (the dollar bill) and downloaded that along with our 3D elephant.  Finally you downloaded/opened Unity (our game editor) and changed the build settings to Android.  Ok, now let’s continue from there:

Setting our Package Name:

Remember how last time we opened “Player Settings” and then the tab that said “XR Settings”?  Well there are a few more small things we’ll have to do in this section.  Instead of “XR Settings” open up the “Other Settings” tab.  Every app that is published on the Google Play Store needs a unique ID so that it doesn’t get mixed up with other apps.  So while you may see two apps with the same name, under the hood their ID’s are different.  This ID is known as the app’s package name.

In our “Other Settings” tab we’ll write what we want our package name to be.  This can be whatever you want, but I’ll use “com.rootjunky.vuforiaelephant”.  Now my app has an ID and Unity will be able to run it on any mobile phone.  Also go ahead and uncheck the box “Android TV Compatibility”, since this app won’t work on Android TVs.

Now to import all of our materials from the first post.  In your Unity project you should see a section for the Project hierarchy.  This shows all the files/resources in the project, and we’ll be storing everything inside the folder named Assets.  We already have our Vuforia files in here, and to get everything else into this folder you can click and drag the following into the Assets folder:

  1. The Vuforia database you downloaded
  2. The 3D elephant model

Creating the Scene:

Once all of these assets are together we can begin messing with our scene.  Go to “file” then “Save Scene”, and save this scene as main (we can think of scenes as different parts of our game, but we only need one for this project).    Now inside of our scene’s hierarchy right click on the Main Camera and delete it.  Then click “Create” -> “Vuforia” -> “AR Camera”.  This will add Vuforia’s custom camera to our scene that takes care of all image targeting (i.e. recognizing dollar bills).

But now that we have the AR camera, we still need to tell it to look for a dollar bill, and to place an elephant on top of that dollar bill once we find it.  To do this select “Create” -> “Vuforia” -> “Camera Image” -> “Camera Image Target”.  If you click on an object in the scene the right-side tab will show details about it, and selecting the Image Target will display a detail section titles “Image Target Behavior”.  In here set Type to “Predefined”, Database to “DollarElephant”, and Image Target to “dollarTarget” (see the following image).

Setting these values connects our database to the image target, so now our camera knows to look for a dollar bill.  But in order to use Vuforia we also need to add our license key.  Make sure you have this still copied to your clipboard, and then selected the AR Camera in the scene.  One of the details you’ll see appear for it is labeled “Vuforia Behaviour”,  In here click the Open Vuforia configuration button and then paste in your App License Key.  Then in the Databases dropdown check the boxes that say “Load DollarElephant Data” and “Activate”.

Displaying The Elephant:

Now for the final step: attaching our elephant.  Find the elephant model inside of your Assets folder (most likely named “source” right now).  Click and drag this little guy onto your ImageTarget in the Hierarchy tab.  This will make the elephant become a “child” of the ImageTarget.

Chances are things look funky though on your screen, and this is because the elephant model is HUGE.  Inside of its Inspector tab we can change its position, rotation, and scale, so lets drop its x, y, and z values for scale down to 0.1.  Then set the position to 0 for the x and z axis, and 0.5 for the y axis (this just raises the elephant a bit so he’s on top of the dollar).

And that’s it!  We’ve attached our Vuforia files to the scene and bound a 3D model to Vuforia’s image target.  With just a few steps we’re now ready to see our augmented reality creation come to life. Connect your phone to your computer (make sure it’s USB Debuggable) and then go to File -> Build Settings again.  Select “Build and Run”, and your game will download onto the connected device.

When the app is up and running point it at any dollar bill, and you’ll see a virtual elephant appear on top.  What’s even cooler is that if you pick up the dollar and move it around the elephant will stay on top.

Congratulations on sticking through this whole process.  It’s very possible you got stuck along the way, and if that’s the case just comment below and I’ll try to help you out.  And if you’re interested in learning more about Android development then you can always check out Phonlab’s course HERE.

Augemented Reality is at the ARCore of Android’s future

Share if the site was helpful

ARCore is out!

In the summer of 2016 PokemonGo opened up pandora’s box for augmented reality (AR).  The app was an instant hit around the world.  While it’s user base has certainly declined since then, nearly two years later it still has a constant demand.  Unfortunately, Pokemon are not the topic of this article (I could write some pretty good ones!). Instead we’ll focus on another stride in AR that took place earlier this week; Google’s release of ARCore.

On February 23rd Google officially released v1.0 of ARCore available on over 100 million Android devices.  Individual developers can now design and publish their AR-based apps on the Play Store, and this only means that AR is going to become even more prevalent in our everyday lives. Speaking of Developer, if you are interested in becoming a developer you should check out my new Android developer course on Phonlabteachable.com

Compatible Phones:

While the list of phones is limited at the moment, you can experience this new wave of AR if you have one of the following phones:

  • Pixel/XL
  • Pixel 2/XL
  • Samsung Galaxy S8/S8 Plus
  • Note 8
  • Galaxy S7/S7 Edge
  • LG V30/30+
  • Asus Zenfone AR
  • OnePlus 5 /5T

ARCore is certainly not the first AR software to get into the hands of developers (Apple’s ARKit and Unity’s Vuforia), but it still marks a significant step towards AR becoming the norm on every device.  Google has said they are partnering with many manufacturers this year to enable AR in upcoming devices.  The bottom line: AR is here to stay.

AR’s Implications

As a developer myself AR is a beautiful thing because it empowers us to create more immersive experiences that can connect with other people.  You’ll often hear gamer’s say that gaming is an art form that encompasses many others.  Video games are an interactive visual and audio experience that can invoke feelings just like any other art if the story is told correctly.  AR only creates more opportunities for this to happen, so it’s not surprising that most of the successful AR apps right now are video games.

But of course AR has much more use than just as a gaming feature.  Industry giants like Amazon have already began releasing their personal touches.  Amazon has utilized ARKit for a few months on iOS, and ARCore is now available on Android phones so that users can visualize what products will look like in their homes before ever purchasing.  Google also partnered with Snap to create a virtual tour of Barcelona’s famous Camp Nou soccer stadium.  I think it’s safe to say every tech giant in the world is thinking about either how they can incorporate AR, or what impact it’s going to have on their future.  Even outside of tech a lot of other industries are gearing up for change as well.

With so many new reality technologies emerging, its an exciting time to be either a developer or a user.  And with all this buzz about AR, let’s not forget that the end of the spectrum exists with products like the Vive containing fully immersive VR worlds.  These differ from AR in that 100% of your surroundings are computer generated, not just a portion.  There’s certainly a spectrum of how immersive AR can be.  If we put reality on one end and VR on the other, AR is everything that falls in between.

What do you think the future holds for the immersive computing spectrum?  Let us know in the comments below.

Phonlab E-Campus Free Course

Share if the site was helpful

Phonlab E-Campus free Chromebook Support course

I have been working with Phonlab for many months now and we decided to bring everyone a FREE course on Chromebooks to help techs and repair shops trouble shoot and fix customer devices. If you want to get access to this FREE course just head over to Phonlab.Teachable.com and enroll. Once you enroll in the Chromebook Support course you will have access to all the lessons. We hope you enjoy them and if you find them handy you may want to check out Phonlab E-Campus where we cover smartphone repairs and security.  Phonlab has just added our own tool called MotoReaper and it can remove FRP factory reset protection lock on any Motorola device on the market today. It is an amazing tool and all students at Phonlab E-campus get access to this tool. We hope to see you there so join us and be the future of mobile today.

 

RootJunky

 

Cyanogenmod 14 Released

Share if the site was helpful

Cyanogen mod 14 Released

logo

CyanogenMod 14 official release has started for many devices. Nexus being at the top of that list along with oneplus devices. CyanogenMod 14 release brings CM up to the latest Android OS which is Nougat and all its glory. If you are looking to see if CM14 is available for your device check the official download page you can also check here for unofficial builds. You can also download CyanogenMod Recovery if you want to use it over TWRP Recovery. Here is a list of some of the New features included in this release.

  1. Multi Window Support
  2. New System UI
  3. Better Battery Management

These are all features that are new or improved on Android 7.0 Nougat.

Below is a video showing off CyanogenMod 14 Unofficial check it out.