Showing posts with label How To. Show all posts
Showing posts with label How To. Show all posts

Thursday

,

Those of you who are running the first Android O Developer Preview may have toyed around with its hidden navigation bar customizer located in the SystemUI Tuner. This nav bar customizer has actually been around in AOSP for months, but it was thought that the only way to access it on Android Nougat was through a modification of the System UI APK, which, of course, would require root access. It wasn’t until just this week that we discovered that Android Nougat’s hidden nav bar customizer could actually be accessed without needing root access, a custom ROM, or a System UI mod. With this feature, we can change the nav bar icons, swap the keys around, or add additional buttons.


That’s right – it’s possible to modify your navigation bar on a completely stock, unrooted ROM with a locked bootloader. Functionality people thought was limited to Android O is actually accessible to anyone running Android Nougat on Nexus, Pixel, OnePlus, and some Sony, HTC, and Motorola phones. If your device is running software that is close to Google’s software (sorry Samsung and Huawei/Honor users), then chances are your device has the hidden AOSP nav bar customizer that we can use. In this tutorial, I will show you how you can use the nav bar customizer to change the button icons to whatever you want or re-arrange them in whatever order you want.


Google Pixel Nav Bar on the Nexus 6


Reversed Nav Bar on Nexus 6




Modifying the Nav Bar – Setup



Requirements: You will need a device compatible with the AOSP nav bar customizer. See the “compatibility” section in this thread. (Note: your device OEM or type may not be listed in that thread. The only way to know for sure if your device is compatible is to try it out, which we will show you how to do below.



There are two ways to modify our nav bar. One is with an app, and the other is through ADB shell commands (which is how the app works). We will be showing you both for completeness, but note that as of right now, you can’t modify the stock nav bar icons through the app until the developer updates his app to include this feature.


The first thing we need to do is to make sure that it’s even possible to modify the nav bar on your device. If your device is one of the ones listed as compatible in the Custom Navigation Bar thread, then chances are it will be. We can verify by running through the brief tutorial that accompanies this app.


Install the app from the Google Play Store (and also sign up for beta testing so we can use its experimental feature to re-arrange the nav bar later on). Next, open up the app and proceed through the introductory screens. Custom Navigation Bar will ask you to grant it a certain permission called WRITE_SECURE_SETTINGS in order to proceed with using the app. There are two ways you can do this, as stated in the application.


  1. If you have a rooted device, open up Terminal Emulator on your phone and grant it root access by typing su. Then, enter this command: pm grant xyz.paphonb.systemuituner android.permission.WRITE_SECURE_SETTINGS

  2. If your device is not rooted, then you will need to grant the permission through ADB. Open up a command prompt/terminal on your machine, and then enter the following command: adb shell pm grant xyz.paphonb.systemuituner android.permission.WRITE_SECURE_SETTINGS

Once you’ve granted the app this permission through either of the two methods above, then the app will proceed with a compatibility test. If your nav bar doesn’t change, then you’re unfortunately out of luck. If your nav bar changes to display a right arrow button, then congrats your device is supported! We can now move on to modifying our nav bar.



Re-arranging the Nav Bar Buttons


App Method


Now that you’ve set up the app, it’s very, very easy to re-arrange the nav bar buttons. You have to be on the beta testing version of the Custom Navigation Bar app to be able to do this, so go back and make sure you’re on the beta channel before proceeding.


If you’re on the beta version, you’ll see a section called experimental tweaks in the main Settings section. Tap on that and you’ll see options that allow you to replace the existing back, home, and recent keys. You can easily re-arrange your keys here by having the back button change to the overview (recent) button and having the overview (recent) button change to the back button. Or change them in whatever way you want, there’s no real limitations here. After swapping your keys, you can also play around with the layout options in the navigation bar settings menu.


ADB Method


And here’s how to do the same using ADB commands, if you would prefer that. The command that we will be modifying is the Secure setting preference called sysui_nav_bar. This preference is a string that contains the nav bar layout. The default structure of the preference is as follows


space,back;home;recent,space

Where space represents an empty space that separates the nav bar keys from one another, and back, home, and recent represent the 3 default buttons in the nav bar. If we want to swap the back and the recent key, for instance, we would need to modify the string as follows


space,recent;home;back,space


Note: if you are attempting to enter any of the following commands from a rooted shell environment such as Terminal Emulator on your phone, then you will need to omit “adb shell” from the commands before sending them.



Now, in order to actually modify this string, we need to use the ADB shell command with this syntax


adb shell settings put secure sysui_nav_bar "STRING"

Hence, the command we would send to swap the recent and back keys would look like this


adb shell settings put secure sysui_nav_bar "space,recent;home;back,space"

As you might guess, this is fairly flexible. We can move the keys around however we want by modifying the string value of the preference. We can, for instance, make our flipped nav bar keys left-justified or right-justified by changing where the two spaces are placed:


Left-justified:


adb shell settings put secure sysui_nav_bar "recent;home;back,space,space"

Right-justified:


adb shell settings put secure sysui_nav_bar "space,space,recent;home;back"

But we can also change the nav bar buttons to be something entirely different than the standard back, home, or recent keys, such as sending one of the many KeyEvents. We’ll take advantage of this fact in the next section, where we show you how to change the icons on the nav bar buttons.



Custom Nav Bar Icons


Now, the following section may not seem like a huge deal due to the fact that there are numerous applications on the Play Store that promise to change your navigation bar without root. And they do work – however, many users report that these apps are buggy in certain apps like Chrome, when playing full screen video, or some games. Furthermore, many of these apps require you to enable an Accessibility Service to monitor apps to know when to re-color the nav bar, which may reduce performance. Finally, if you rely on these apps for too long, then you may be suddenly surprised to see them stop working when Android O rolls out because the next Android version is killing the ability of these apps to draw on top of System UI elements.


The method that we are using is based on Google’s implementation of the nav bar tuner, so it has none of these issues. However, there is one issue currently that we want to be upfront about: if you choose to follow this method to modify your home button, then the long-press home button action will no longer work meaning you can’t quickly access Google Assistant from the home button anymore. If you’re okay with that, then here’s how to change the icons on the nav bar.


The first thing you will need to do is download the icons that you want to replace your default nav bar keys’ icons with. I’ll be providing download links for you to grab the Google Pixel nav bar icons, but it’s up to you to find your own icons if you want anything else. You’ll need the icons in the PNG format, and as for the size, you can determine the size of the icons you need by looking up your device’s display density metrics on Material.io and correlating that with an icon size reference chart.


Credits for the extracting these Google Pixel nav bar icons goes to XDA Senior Member dariomrk. Download this archive if you have a 1920x1080p display and this one if you have a 2560x1440p display. Extract the contents of either zip file into a folder called “NavIcons” on the root directory of your storage.


Once you have the icons in the appropriate place, enter the following ADB shell command (warning, it’s a long one):


adb shell settings put secure sysui_nav_bar "space,key(4:file:///storage/emulated/0/NavIcons/back.png);key(3:file:///storage/emulated/0/NavIcons/home.png);key(187:file:///storage/emulated/0/NavIcons/recents.png),space"

What this command does is replace back, home, and recent keys with KeyEvents that do the same function. In particular, back is replaced with KEYCODE_BACK, home is replaced with KEYCODE_HOME, and recent is replaced with KEYCODE_APP_SWITCH. These key codes perform the exact same function, but because we are using KeyEvents, we can specify what icon we want to use for them. In this case, we are pointing towards the back.png, home.png, and recents.png that we saved in /NavIcons.


However, by replacing the stock keys with KeyEvents, we lose the long-press home ability because currently there is no way to recognize long-press events of simulated key inputs.


I realize that right now, this method might not seem ideal or easy to implement, but at the time of this writing the Custom Navigation Bar app has not been updated to support adding your own icons. For now, my method (which is exactly how that app works, and when the app does get updated, it will face the same limitation) is how you can get whatever custom icons you want on your nav bar.



That’s it for this tutorial. In future tutorials I will show off potential practical uses of changing your nav bar, especially in a contextual manner using an automation app such as Tasker. Follow the tutorials category on XDA to keep up to date with all the latest tips and tricks that we publish.

Tuesday

,

Unfortunately, most of us don’t have our alarms hooked up to a mechanical hand to slap us awake. And without it, the answer to waking up easily is to achieve a higher quality of sleep.



But for as much good as smartphones do, they often get a lot of blame for sleep issues today. Of course, there’s always two sides to every story — and there are a few ways that your iPhone can actually improve your sleep. Here are a few ways your iPhone can help you sleep better.


3. Night Shift


iOS 9.3 Beta 5 Makes These 3 Changes to the Highly-Anticipated ‘Night Shift’ Feature





First introduced in iOS 9.3, Night Shift is a nifty little feature that’s scientifically proven to help you sleep better.


According to recent studies, exposure to blue light before bed could actually shift your body’s natural circadian rhythm — and even suppress melatonin, the hormone that helps you fall asleep at an appropriate time. All of this results in overall poorer sleep time and quality. Of course, the easier solution is just to turn off your device and refrain from using it a few hours before bed. But let’s admit it: that’s hard.


Luckily, Night Shift could help with that. The feature actually changes the color temperature of the iPhone’s display to reduce the amount of blue light emitted. This gives the iPhone a warmer hue, and “may help you get a better night’s sleep,” according to Apple. Learn more about Night Shift, here.


How to Turn on Night Shift


  1. Simply swipe-up from the bottom of the home screen to access the Control Center.

  2. Then tap Night Shift.

By default, Night Shift should be set to turn on automatically at a certain time. To edit that time (and the time it turns off)..


  1. Go to Settings.

  2. Tap Display & Brightness.

  3. Tap Night Shift.

2. Bedtime



If you have trouble getting to bed at a decent hour and tracking how much sleep you actually get, Bedtime is here to help. Recently introduced in iOS 10, Bedtime is a sleep-tracking feature that connects to Apple’s Health app. And it does a few different things that could help you adjust to a new (and healthier) sleep cycle.


First of all, Bedtime allows you to set a wake-up time (like the alarm does). Nothing special there. But, Bedtime also lets you input how much sleep you want to get via a radial dial — and then recommends a time to be in bed by. The app also lets you set when you want to be reminded to hit the hay — via time intervals — which is great for night owls who have trouble getting to bed at a decent hour. Bedtime also lets you track your sleep via a new panel in the Health app — as consistency is key.


Bedtime is available as a feature in the stock Clock app. To set it up, just tap on the Bedtime icon and follow the prompts. For a full-guide on using Bedtime, just follow this link.


1. Third-party apps



While Apple’s proprietary sleep-related apps are great, there are a plethora of third-party options that could help you sleep better. For example, Relax Melodies is an app that generates calming white or fan noise, as well as other relaxing sleep sounds and melodies. White noise has been found to actually help people sleep — and there are quite a few of us who can attest to that fact. Apps like Relax Melodies are especially useful if you don’t want to run a fan all night, or if you’re in a hotel room or similar place where that’s not an option.


Similarly, numerous studies have shown that a regular mindfulness meditation practice can actually fight insomnia and significantly improve sleep. An app like Calm has plenty of guided meditations to get you started. As an added bonus, Calm also features so-called Sleep Stories — a modern mindful rift on a child’s bedtime story, but tailor-made for all ages.





Recommended




[ Source:-http://q.gs/DgK3H ]
,

A QR code is a type of barcode that contains information about the item it is attached to. It was first used in the automotive industry in Japan to keep track of car parts, but quickly became popular for other uses due to the amount of information it can hold. Nowadays, QR codes are used for tracking products, managing documents, linking to webpages, and much more. It can hold data such as the information about a particular product, URL links, and geo-coordinates.


To scan a QR code using your iPhone, you have to use a third-party app as iOS doesn’t have this feature. If you use Google Chrome, then you don’t need to install another third-party app because the browser was recently updated to support QR code scanning. It takes advantage of 3D Touch for scanning QR codes, but if your iPhone doesn’t have it, then there is an alternative method for non-3D Touch devices as well.


Here’s how you can use Google Chrome on iPhone to scan QR codes with or without 3D Touch.





How to Scan QR Codes using Google Chrome on iPhone


Step 1: Go to the App Store and update Google Chrome to the latest available version. QR code scanning was added in version 56.0.2924.79.


Step 2: Scanning a QR code can be done with or without 3D Touch. Here’s how it can be done with 3D Touch:


  • Hard press on the Google Chrome app icon to activate 3D Touch.

  • From the 3D Touch menu that appears, tap on “Scan QR Code”.

If your iPhone doesn’t support 3D Touch, here’s an alternative method:


  • Open Spotlight.

  • Type “QR Code” in the Search field.

  • From the search results, tap on “Scan QR Code” located below the Chrome section.

Step 3: When your iPhone’s camera opens, point it at a QR code and it will be automatically scanned.


Step 4: Google Chrome will read the scanned QR code and display the corresponding output. The QR code could either be a URL linking to a webpage, a piece of text, or anything else.


It’s good to see that Google Chrome is taking advantage of 3D Touch to provide a quick method of scanning QR codes. Now that Google Chrome has this feature, there’s no need to use another third-party app unless it offers additional features.





Recommended




[ Source:-http://q.gs/DgHAq ]

Monday

,

Working is great. It allows you to make a living and support yourself and your family. Most people, however, do not realize that business trips do not have to be all about work. Thinking about work all the time makes you feel tired, lost and overwhelmed. Pretty soon, you don’t even want to go on business trips because you associate them with work, responsibilities, lack of sleep and entertainment. You start to think about all the things you are missing out on by being on the road instead of being at home.


There are easy ways to make a difference and make business trips fun and enjoyable


Explore


Once in a while, you will find a business transaction that will require you to fly overseas. Drop the attitude. The trip does not just have to be about the business. In case you find yourself in a new country and the weekend is coming up, explore your environment. Stay the weekend, find something new to do and enjoy yourself. It is not always a good idea to fly in and out of places. By staying over the weekend, you might save your company some money. Most flight companies have a tendency to lower ticket prices on Sunday mornings.


Complete key tasks


If you are taking a business trip and need to stay over for the weekend to unwind and relax, you need to make sure that you don’t have tasks hanging over you. You will never rest if you keep thinking about the balance sheet you were supposed to complete or the papers you had to sign but did not. If you decide to have fun on your business trip, you need to ensure that you will not feel guilty for disregarding your tasks. You also need to ensure that your jobs will be completed on time. When you get back, you need to start with a clean slate.


Watch movies


Download the showbox apk before you begin your trip. Download a couple of movies. If you will be using the bus, be sure that you purchase data beforehand to enjoy a hustle-free trip. It is always a great idea to watch a great movie before you go for meetings. Movies have a way of relieving stress and it’s a great way to get some rest. One in a while, you will find a movie that inspires you to do better and change a couple of things in the way you handle business. Sometimes, you will find a great business idea in a movie.


The airport spa


Is there a better way to relax than getting a great massage from professionals? Most airports have excellent services for premium passengers. Therefore, ask whether there is a spa and book an appointment before or right after your flight. You will feel relaxed, and you will also unwind from the stresses of work.


Conclusion


Working too much can drain you of energy and happiness. It is important to be sure that you take advantage of the few different times you are on a business trip to relax. Make those business trips mini-vacations for yourself.








[ Source:-http://q.gs/DgC9e ]

Follow Us @soratemplates