How to switch software buttons on the Samsung Galaxy S8

Annoyed by the Samsung Galaxy S8’s software button positioning? Those who are not accustomed to Samsung’s layout will have a hard time getting used to it. Back and multi-window button placement is one of those things manufacturers just can’t agree on, but software navigation buttons are here for the rescue, as they can be easily switched to one’s preference.

The process is super simple, but it’s also one of those options no one ever tells you about and have to find on your own. We are here to help you, though. Let’s walk you through the process!

How to switch software buttons:

  1. Go to Settings.
  2. Tap on Display.
  3. Select Navigation bar
  4. Hit Button layout.
  5. Select your order of choice.

Within this menu you can also do certain things not usually found in other phones. It’s possible to adjust home button sensitivity, unlock with the home button and even change the background color.

An introduction to Firebase – the easiest way to build powerful, cloud-enabled Android apps

Google I/O 2017 is rapidly approaching and taking a look at the scheduled sessions, it’s apparent that Firebase will be featuring heavily. This is something of a clue as to how Google views Firebase. In short: it’s kind of a big deal. And Google is right to want to promote the service. Firebase is a tool that allows us to make cloud-enabled apps quickly and easily, which opens up a huge number of opportunities.

Normally, when a friend tells me they have an idea for an app, it will almost always involve a strong social element. Historically, I would have balked that this is probably the most difficult kind of app for a newbie to make, even though it is undoubtedly also the kind that most people are interested in. Thanks to Firebase, making this kind of app is not only possible for a beginner but also relatively easy. Though relative is certainly the operative word there…

See also:

Create an error-free Android app, with Firebase crash reporting

6 days ago

So, what exactly is Firebase? What uses does it offer the Android developer? And how do you get started?

What is Firebase?

Firebase is a mobile platform from Google offering a number of different features that you can pick ‘n mix from. Specifically, these features revolve around cloud services, allowing users to save and retrieve data to be accessed from any device or browser. This can be useful for such things as cloud messaging, hosting, crash reporting, notifications, analytics and even earning money through AdMob – which I discussed in a previous post.

In short, Firebase handles the backend online element for your apps, allowing you to focus on the front-end UI and functionality. All this is done through a single SDK with easy-to-use APIs and excellent integration into Android Studio. This removes the need to create your own server-side script using PHP and MySQL, or a similar set-up. This is ‘Backend as a Service’ or ‘BaaS’, and essentially this means that anyone really can make that ambitious social app. It works with Android apps, iOS apps and web apps and best of all: it’s free!

Are there any reasons not to use Firebase? Sure. One downside of Firebase is that it means relying on a third-party solution. If Google should ever abandon Firebase, then you’d be forced to migrate your data and rebuild your app, which could be quite a headache. It seems unlikely right now, but it’s something you should always keep in mind.

It works with Android apps, iOS apps and web apps and best of all: it’s free!

Another potential concern is that this is that Firebase uses a real-time database and all data is automatically synchronised across all users – rather than being stored on the phone first and then ‘sent’. While this certainly has advantages, it means that an internet connection is necessary at all times for your app to work.

For the most part though, this is a fantastically powerful and versatile way to build cloud-enabled apps and is something that every Android developer should familiarise themselves with.

Setting up a project

Before you can do anything with Firebase, you first need to create an account. You can do this over at firebase.google.com.

Once you’ve done that, you’ll be taken to the ‘console’. Here you’ll see any projects you’ve previously created and you’ll have the opportunity to add new ones. Previously, we would have had to do this manually, which would involve downloading a JSON file, updating Gradle build files and more. The good news is that Firebase has evolved and we can now do everything from within Android Studio itself.

So, create a new app project in Android Studio and then choose Tools > Firebase to open up the ‘Firebase Assistant’ in a window on the right of the IDE. Now click ‘Connect’. A browser window will open up for you to sign into your account and then the project will be created automatically.

I called my app ‘Firebase Example’ and if I now head back to the Firebase console, I can see  the project has been created automatically. Click on it to open the project console.

Authentication

The simplicity continues. To begin adding Firebase Authentication just click ‘Add Firebase Authentication to your app’. This will add a number of dependencies to your Gradle files, so just click ‘Accept Changes’. You’ll need to do this each time you want to use a new feature from Firebase.

See also:

Add Facebook and Twitter authentication to your apps, using Firebase and Fabric

March 21, 2017

 

Unfortunately, the next step is going to require some actual code on our part. The good news is that all the code you’ll need is actually provided by Google and can be copied and pasted directly from the Assistant. I’ve made just a couple of changes so it will be completely ready to run..

First, we declare the FirebaseAuth and AuthStateListener objects in MainActivity.java like so:

private FirebaseAuth mAuth;
private FirebaseAuth.AuthStateListener mAuthListener;

Don’t forget to import the relevant classes. Just click the red underlined text and press Alt + Enter to do this automatically. You’ll need to repeat this as you paste in more of the code that follows.

Now in the onCreate() method, add the following code to initialize the FirebaseAuth instance and AuthStateListener method:

mAuth = FirebaseAuth.getInstance();
mAuthListener = new FirebaseAuth.AuthStateListener() {
    @Override
    public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
        FirebaseUser user = firebaseAuth.getCurrentUser();
        if (user != null) {
            // User is signed in
            Log.d("Main Activity", "onAuthStateChanged:signed_in:" + user.getUid());
        } else {
            // User is signed out
            Log.d("Main Activity", "onAuthStateChanged:signed_out");
        }
        // ...
    }
};

Then attach the listener to the FirebaseAuth instance in onStart. We will remove it in onStop:

    @Override
    public void onStart(){
        super.onStart();
        mAuth.addAuthStateListener(mAuthListener);
    }

    @Override
    public void onStop() {
        super.onStop();
        if (mAuthListener != null) {
            mAuth.removeAuthStateListener(mAuthListener);
        }
    }

Now that’s all ready, we can create a method to add new users! Following along with Google’s instructions, we’ll call this method createAccount. It should look like so:

    private void createAccount() {
        mAuth.createUserWithEmailAndPassword("[email protected]", "password")
        .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                Log.d("Main Activity", "createUserWithEmail:onComplete:" + task.isSuccessful());

                // If sign in fails, display a message to the user. If sign in succeeds
                // the auth state listener will be notified and logic to handle the
                // signed in user can be handled in the listener.
                if (!task.isSuccessful()) {
                    Toast.makeText(MainActivity.this, "Authentication failed!", Toast.LENGTH_SHORT).show();
                }
            }
        });
    }

Now we can sign in our existing users with another, similar method:

    private void signInAccount() {
        mAuth.signInWithEmailAndPassword("[email protected]", "password")
        .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                Log.d("Main Activity", "signInWithEmail:onComplete:" + task.isSuccessful());

                // If sign in fails, display a message to the user. If sign in succeeds
                // the auth state listener will be notified and logic to handle the
                // signed in user can be handled in the listener.
                if (!task.isSuccessful()) {
                    Toast.makeText(MainActivity.this, "Authentication failed!", Toast.LENGTH_SHORT).show();
                }
            }
        });
    }

Right, so let’s actually try using all this shall we? To do that, all we need to do is try running those two methods. At the bottom of onCreate(), add createAccount(); and signInAccount();. Normally, we would pass strings for the email and password which we would acquire through some kind of sign-in screen. For now though, I’ve entered some example strings to keep things easy.

The entire code should look like so:

package android.firebaseexample;

import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;

public class MainActivity extends AppCompatActivity {
    private FirebaseAuth mAuth;
    private FirebaseAuth.AuthStateListener mAuthListener;

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

        mAuth = FirebaseAuth.getInstance();
        mAuthListener = new FirebaseAuth.AuthStateListener() {
            @Override
            public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
                FirebaseUser user = firebaseAuth.getCurrentUser();
                if (user != null) {
                    Log.d("Main Activity", "onAuthStateChanged:signed_in:" + user.getUid());
                } else {
                    Log.d("Main Activity", "onAuthStateChanged:signed_out");
                }
                // ...
            }
        };
        createAccount();
        signInAccount();
    }

    private void createAccount() {
        mAuth.createUserWithEmailAndPassword("[email protected]", "password")
        .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                Log.d("Main Activity", "createUserWithEmail:onComplete:" + task.isSuccessful());
    
                if (!task.isSuccessful()) {
                    Toast.makeText(MainActivity.this, "Authentication failed!", Toast.LENGTH_SHORT).show();
                }
            }
        });
    }

    private void signInAccount() {
        mAuth.signInWithEmailAndPassword("[email protected]", "password")
        .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                Log.d("Main Activity", "signInWithEmail:onComplete:" + task.isSuccessful());
                if (!task.isSuccessful()) {
                    Toast.makeText(MainActivity.this, "Authentication failed!", Toast.LENGTH_SHORT).show();
                }
            }
        });
    }

  [email protected]
    public void onStart() {
        super.onStart();
        mAuth.addAuthStateListener(mAuthListener);
    }

  [email protected]
    public void onStop () {
        super.onStop();
        if (mAuthListener != null) {
            mAuth.removeAuthStateListener(mAuthListener);
        }
    }
}

Before you test the app, first you need to enable email authentication through your profile. Visit the project in the Firebase console and choose ‘Authentication’ from the menu down the left. You’ll see a list of ‘Sign-In providers’, which includes Email/Password. You want to change the toggle here to ‘Enable’.

Now click the tab that says ‘Users’, which should be empty. Keep it open when you run the APK you created though and you should find a new user appears with our [email protected] address. Job done!

Retrieving data and more functions

Using these simple steps, you can now add user-profiles to your apps to improve privacy and customization. If we want to get the user’s email at any point once they’ve signed in, then this is just a matter of using:

FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
String email = user.getEmail();

Of course, you need to check that a user is indeed logged in before doing this. At the bottom of the Assistant window, you’ll be prompted to try setting up authentication using Google or Facebook. Or you can click back and look at storing and retrieving data using the Firebase Realtime Database or setting up analytics.

See also:

How to start using AdMob with Firebase to monetize your app

September 2, 2016

 

Whatever you decide, you should find that Firebase makes life surprisingly easy. You’ll probably have a few headaches along the way but trust me – this is far preferable to becoming a ‘full stack developer’ and handling the frontend and backend yourself. Have a play around and get acquainted ready for Google I/O!

Crowdfunding project of the week: Spark turns your phone into a DSLR camera remote

The ‘Crowdfunding project of the week’ has become a tradition here at Android Authority. This article series is where we highlight some of the hottest tech novelties coming from crowd-sourcing sites like Kickstarter and Indiegogo. What is this week’s featured post all about? Let’s find out!

Other featured projects: 

Photography enthusiasts know shooting the right photo takes skill, work and patience. You need to find the right tools and take full advantage of them. The thing is, we have a smart device that is pretty much capable of undertaking any function. Why are we not using it more for our DSLR needs?

Well, some people actually are. We have seen plenty of accessories that allow for smartphone remote control with DSLR cameras, but this one does seem to offer more versatility, portability and convenience.

For starters, the Spark is a device you can just leave over your camera and never really think about. It is tiny and features over 2,000 hours of battery life. Yes, you heard that right; and when it does die you can easily replace its coin battery (the ones watches use).

Now, what exactly does Spark allow for? On its own, it can be used as a regular infrared or wired trigger. This is convenient, but things get much more fun once you link Spark to your smartphone via Bluetooth. It’s easy to set up regular photos, time lapses, long exposure shots, HDR, a photo booth or more. Get this – one can even take shots from multiple cameras at once.

Pretty neat, right? But I saved the best news for last – this thing is super cheap! You can sign up for a Spark by backing the Kickstarter project with as low a $44. That’s really not much more than regular IR camera remotes cost, and you get much more functionality with the Spark. Who is signing up?!

T-Mobile Samsung Galaxy Note 5 getting Android 7.0 Nougat

Still carrying around a Samsung Galaxy Note 5? It is technically the latest Note handset, so it only makes sense to give it its timely update. Multiple carrier versions of this phone have begun getting Android Nougat, but T-Mobile users are still left wondering when their devices will be ready for prime time.

We have good news: you won’t have to wait much longer! In fact, T-Mobile’s Des has taken it to Twitter to let us know the OTA update is approved and should start hitting smartphones “early next week”. This was posted on the 21st, which means the update is actually being released within the coming days.

“Gadget Guy” Des isn’t unveiling any specific details. We have no idea how large the update file will be or what it comes with, but we assume you can expect the same general features other Galaxy Note 5 devices have gotten from Nougat. This would include the new version of TouchWiz, improved multi-tasking, mini-conversations, improved battery management, a nicer keyboard and more.

Excited to have t he latest and greatest Android version? Sit back and relax until it arrives. And don’t forget to hit the comments to share your experiences once you get the update.

The Galaxy S8 is evidence of Samsung’s changing attitude to bloatware

Remember back when we all used to have a field day bashing Samsung bloatware? There was sooo much of it, you couldn’t disable or uninstall it, and most things duplicated stuff that Google already did perfectly well (and also pre-installed on Galaxy phones). But starting with the Galaxy S6, Samsung started to change its attitude toward bloatware, and the Galaxy S8 benefits greatly from the continuation of that tendency.

But more to the point, we benefit greatly. As much as we understand how lucrative these software deals can be to smartphone manufacturers, none of us really want bloatware clogging up our phones. In the past you could barely uninstall any, having to settle for disabling a few and making your peace with most, but times have changed.

See also:

Does bloatware drain your battery? – Gary explains

June 25, 2016

The 32 GB Galaxy S7 had 8 GB of storage taken up by its ROM and pre-loaded apps. The 64 GB Galaxy S8 in my hands – even without any carrier bloat – admittedly had 12 GB used by the time I peeled the plastic off. But even though I’ve already lost a large chunk of my internal storage to the system it doesn’t feel so bad because the apps that are on the S8 are largely removable.

Pre-loaded apps may not ultimately take up much space, but to have the ability to get rid of most of them almost makes you forget about the rest of the space you’ll never get to reclaim. Of course, pre-installed apps you don’t want, can’t remove and can’t disable are also a drain on your system resources, so any time you can uninstall or disable them, the better.

The Galaxy S8 has 37 pre-installed apps (at least on my unlocked international variant). The Galaxy S6 had 50 apps, not including carrier bloat. By my count there’s only a dozen I can’t uninstall or disable on the S8, and some of those are rather useful like the dialer.

You can still get rid of the few remaining apps Samsung won't already let you disable or uninstall.

Even for those of you suffering from extensive carrier bloat in the US, there are still steps you can take to get rid of the few remaining apps Samsung won’t already let you disable. You simply have to decide if ridding yourself of them is worth $1.50. If it is, you’ll also be able to remove future bloat on your next Galaxy phone. Not uninstall, sadly, but disable any and all apps you want to. And it doesn’t even require root.

You won’t get the storage space back, but you will block them from chewing system resources and you’ll no longer see them in your app drawer. All you need to do is fork out for an app called BK Package Disabler, which you can do via the button below. Install it, grant it the necessary permissions and swipe to the ‘Bloatware’ tab in the app.

Tap the check mark next to the apps you want disabled and that’s it (don’t just go crazy, look for the specific apps in the app drawer you want removed). You’ll no longer see them in your app drawer and they won’t be able to run in the background. If something breaks or you want the app back for some reason, simply relaunch the BK Package Disabler app and uncheck the box next to the apps you want resurrected.

While it’s unfortunate we still have to resort to paid apps to remove everything we want to on a phone that cost us an arm and a leg, the base situation has at least improved from years past. On my S8 I can uninstall or disable 25 apps straight out of the box, and pay $1.50 to disable the rest. That may not quite be ideal, but it sure is better than it once was.