Android program to switch modes. Switching between applications in Android. Use adb to backup software on your computer
The Launcher tab, which opens from the Home screen, contains icons for all applications installed on your phone, including applications downloaded and installed from Android Market or other sources.
When you open an app, other apps you're using don't stop; they continue running, playing music, displaying web pages, and more. You can quickly switch between apps to work with multiple apps at once. operating room Android system and the applications running on it communicate so that unused applications do not consume resources. Applications are stopped and started again when necessary. Therefore, there is no reason to stop applications unless you are sure that the downloaded application is not functioning correctly. For details about how applications use memory and how to manage those applications, see .
Learn about finding and installing additional apps for your phone (including performance tools, utilities, games, reference materials and other types software) see section.
Opening and closing the Launchpad
If you have more apps open than can fit on the launcher, you can scroll the launcher up or down to see all the apps.
You can add an app icon to your Home screen by pressing and holding the icon on the Launcher until it vibrates, and then dragging the icon to the desired location on the Home screen.
The Launchpad closes automatically when you tap an icon to open an app or move an icon from the Launchpad to the Home screen.
Opening an application
- Click the application icon in the Launcher panel.
- Tap the app icon on the home screen.
Switch to a recently used app
A small window will open containing icons of all recently used applications.
- Tap an icon to open its associated application.
Or click the button Back to return to the current application.
I'm making an application that needs to be able to switch between applications that the user has open (for example, applications in the multitasking menu), I have the ComponentName of 10 new applications, and can start them (i.e., switch to them) like this:
Intent = new Intent(); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setComponent(info); startActivity(intent);
However, when I try to change on Facebook (And probably some similar apps), it asks for a specific permission:
java.lang.SecurityException: Permission Denial: starting Intent ( flg=0x10000000 cmp=com.facebook.katana/.activity.FbFragmentChromeActivity ) from ProcessRecord(42310bc0 8578:com.javanut13.multitaskheads/u0a10095) (pid=8578, uid=10095 ) requires com.facebook.permission.prod.FB_APP_COMMUNICATION
Is there a way around this by actually switching to the app instead of starting it? Can I just send the focus to a different application?
01 answers
If you don't have permission, I think you can only start another application's activity when its "export" attribute is set to true. A Facebook-like application might set this to false and does not allow the other application access to its activity.
I haven't tested this alone, but you can try the following codes:
Intent extApp= getPackageManager().getLaunchIntentForPackage(facebook-package-name); this.startActivity(extApp);
Hope this helps.
An application does not always consist of one screen. For example, we have created very useful program and the user wants to know who its author is. He clicks on the “About” button and is taken to new screen, where there is useful information about the program version, author, website address, how many cats the author has, etc. Think of the activity screen as a web page with a link to another page. If you look at the code in the file MainActivity.java from previous lessons, you will see that our class MainActivity also applies to Activity(or his heirs) or, more precisely, inherited from him.
Public class MainActivity extends AppCompatActivity
As you might guess, we should create a new class that could be similar to MainActivity and then somehow switch to it when the button is pressed.
For the experiment, we will take the program from the first lesson and use a button for experiments (or create new project with one button on the screen). Next, let's create a new form to display useful information. For example, let's show the user what a cat does when it goes left and right. Agree, this is very important information that provides the key to unraveling the Universe.
We will create a new activity manually, although the studio has ready-made templates. But there is nothing complicated there and for a better understanding it is useful to do everything by hand.
Let's create a new XML markup file activity_about.xml in folder res/layout. Right click on the folder layout and select from context menu New | Layout resource file. A dialog box will appear. In the first field, enter the file name activity_about. In the second, you need to enter the root element. By default it's there ConstraintLayout. Erase the text and enter ScrollView. Entering a few characters is enough for the studio to suggest ready-made options; you can immediately press Enter without waiting for the full word to be entered:
You will get a corresponding blank into which we will insert the element TextView.
Information will be retrieved from resources, namely the string resource about_text. Now it is highlighted in red, signaling the absence of information. It was possible to press Alt+Enter and enter text in the dialog box. But for our example, this method will not work, since our text will be multi-line, using control characters. So let's do it differently. Let's open the file res/values/strings.xml and enter the following text manually:
We used the simplest HTML text formatting tags like , , . For our example, it is enough to highlight in bold the words that relate to the cat and the direction of movement. To move text to a new line, use symbols \n. Let's add another string resource for the title of the new screen:
We figured out the markings. Next you need to create a class for the window AboutActivity.java. Select from the menu File | New | Java Class and fill in the required fields. At first, it is enough to indicate only the name. Then you'll deal with other fields.
Let's get the blank.
Now the class is almost empty. Let's add the code manually. The class must inherit from an abstract class Activity or his relatives like FragmentActivity, AppCompatActivity etc. Let's add extends Activity. The activity class must have a method onCreate(). Place the mouse cursor inside the class and select from the menu Code | Override Methods(Ctrl+O). In the dialog box we look for the required class; you can type the first characters on the keyboard for a quick search. In the created method you need to call the method setContentView(), which will load the prepared markup onto the screen. We will have this option.
Package ru.alexanderklimov.helloworld; import android.app.Activity; import android.os.Bundle; /** * Created by Alexander Klimov on 12/01/2014. */ public class AboutActivity extends Activity ( @Override protected void onCreate(Bundle savedInstanceState) ( super.onCreate(savedInstanceState); setContentView(R.layout.activity_about); ) )
Now comes the most important part. Our task is to go to a new screen when we click a button on the first screen. Let's go back to class MainActivity. Let's write a button click handler:
Public void onClick(View view) ( Intent intent = new Intent(MainActivity.this, AboutActivity.class); startActivity(intent); )
Here I used the button click processing method described in the lesson.
To launch a new screen you need to create an instance of the class Intent and indicate the current class in the first parameter, and the class to go to in the second, we have this AboutActivity. After this the method is called startActivity(), which launches a new screen.
If you now try to test the application in the emulator, you will receive an error message. What did we do wrong? We missed one important step. You need to register a new one Activity in the manifesto AndroidManifest.xml. Find this file in your project and double click on it. The file editing window will open. Add a new tag
This is where the string resource comes in handy about_title. We launch the application, click on the button and get a window About the program. Thus, we learned how to create a new window and call it by clicking a button. And we have a mega-convenient program at our disposal - now we will always have at hand a hint of what the cat does when it goes left.
Once again, please note that the second activity class created must inherit from the class Activity or similar ones ( ListActivity etc.), have an XML markup file (if required) and be specified in the manifest.
After calling the method startActivity() a new activity will be launched (in this case AboutActivity), it will become visible and move to the top of the stack containing the running components. When calling a method finish() from a new activity (or when the hardware return key is pressed) it will be closed and removed from the stack. The developer can also navigate to the previous (or any other) activity using the same method startActivity().
Creating a third screen - a method for the lazy
Programmers, like cats, are lazy creatures. Always remember that for an activity you need to create markup and a class that inherits from Activity, and then don’t forget to register the class in the manifest - oh well.
In this case, select from the menu File | New | Activity | Basic Activity(or other template). Next, the familiar window for creating a new activity will appear. Fill in the required fields.
Click on the button Finish and the activity will be ready. To verify this, open the manifest file and check for a new entry. I’m not even talking about class and markup files, they will appear in front of you on their own.
Add a new button to the main activity screen yourself and write code to switch to the created activity.
At first, I would advise you to manually create all the necessary components for the new activity so that you understand the relationship between the class, markup and manifest. And when you get the hang of it, you can use the Activity Creation Wizard to speed up your work.
Passing data between activities
We used a simple example to call another activity screen. Sometimes you not only need to call a new screen, but also transfer data to it. For example, username. In this case, you need to use a special area extraData, which the class has Intent.
Region extraData is a list of pairs key/value, which is transmitted along with the intention. Strings are used as keys, and any primitive data types, arrays of primitives, class objects can be used for values Bundle and etc.
To transfer data to another activity, use the method putExtra():
Intent.putExtra("Key", "Value");
The receiving activity must call some appropriate method: getIntExtra(), getStringExtra() etc.:
Int count = getIntent().getIntExtra("name", 0);
Let's redo the previous example. We already have three activities. The first activity will have two text fields and a button. Appearance could be as follows:
At the second activity SecondActivity set the element TextView, in which we will display the text received from the first activity. Let's write the following code for the method onCreate() at the second activity.
@Override protected void onCreate(Bundle savedInstanceState) ( super.onCreate(savedInstanceState); setContentView(R.layout.activity_second); String user = "Animal"; String gift = "donut hole"; TextView infoTextView = (TextView)findViewById( R.id.textViewInfo); infoTextView.setText(user + " , you were given " + gift); )
If we now run the program and simply call up the second window, as was described in the first part of the article, then we will see the default inscription Animal, they handed you a donut hole. Agree, it’s quite annoying to receive such messages.
Let's correct the situation. Add the code to the first activity:
Public void onClick(View view) ( EditText userEditText = (EditText) findViewById(R.id.editTextUser); EditText giftEditText = (EditText) findViewById(R.id.editTextGift); Intent intent = new Intent(MainActivity.this, SecondActivity. class); // into the username key we push the text from the first text field intent.putExtra("username", userEditText.getText().toString()); // into the gift key we push the text from the second text field intent.putExtra("gift ", giftEditText.getText().toString()); startActivity(intent); )
We placed the object in a special container Intent two keys with values that are taken from text fields. When the user enters data into the text fields, it will go into this container and be passed to the second activity.
The second activity should be ready to warmly receive messages as follows (in bold).
// Default values String user = "Animal"; String gift = "donut hole"; user = getIntent().getExtras().getString("username"); gift = getIntent().getExtras().getString("gift"); TextView infoTextView = (TextView)findViewById(R.id.textViewInfo); infoTextView.setText(user + " , you were given " + gift);
Now the message looks less offensive, and even pleasant for some. In complex examples, it is advisable to add a check when processing data. There may be situations where you launch a second activity with empty data of type null, which may cause the application to crash.
In our case, we know that we are expecting a string value, so the code can be rewritten like this:
Intent intent = getIntent(); user = intent.getStringExtra("username");
User = getIntent().getStringExtra("username");
The program has a drawback - it is not clear from whom we receive greetings. Any well-bred monkey will not accept a gift from an anonymous source. So as homework, add another text field to enter the name of the user who is sending the message.
Google recommends using the following format for keys: your package name as a prefix, followed by the key itself. In this case, you can be sure of the uniqueness of the key when interacting with other applications. Something like this:
Public final static String USER = "ru.alexanderklimov.myapp.USER";
Who framed the cat Vaska - we get the result back
It's not always enough to simply pass data to another activity. Sometimes you need to get information back from another activity when it is closed. If earlier we used the method startActivity(Intent intent), then there is a related method startActivityForResult(Intent intent, int RequestCode). The difference between the methods is additional parameter RequestCode. It's basically just an integer number that you can come up with yourself. It is needed in order to distinguish from whom the result came. Let's say you have five additional screens and you assign values from 1 to 5 to them, and using this code you can determine whose result you need to process. You can use the value -1, then it will be the same as calling the method startActivity(), i.e. we won't get any results.
If you use the method startActivityForResult(), then you need to override the method in your code to receive the result onActivityResult() and process the result. Confused? Let's look at an example.
Let's say you're a detective. Information was received that two pieces of sausage and other products were stolen from the table of an influential person in a restaurant. Suspicion fell on three suspects - a crow, a fucking dog and Vaska the cat.
One of the visitors provided a series of photos from his show-off iPhone:
There is also testimony from another witness: And Vaska listens and eats.
Create a new project Sherlock with two activities. On the first screen there will be a button to switch to the second screen and a text label in which the thief's name will be displayed.
On the second screen there will be a group of switches:
Since we will expect a response from the second screen, we need to use the method startActivityForResult() on the first screen in which we will pass the variable CHOOSE_THIEF as a parameter RequestCode.
Static final private int CHOOSE_THIEF = 0; public void onClick(View v) ( Intent questionIntent = new Intent(MainActivity.this, ChooseActivity.class); startActivityForResult(questionIntent, CHOOSE_THIEF); )
Look at the code. When we click on the button we are going to work with the second screen ChooseActivity and launch the second screen waiting for the result.
Let's go to the second screen and write the code for the second activity.
Public final static String THIEF = "ru.alexanderklimov.sherlock.THIEF"; public void onRadioClick(View v) ( Intent answerIntent = new Intent(); switch (v.getId()) ( case R.id.radioDog: answerIntent.putExtra(THIEF, "Fucking doggie"); break; case R.id .radioCrow: answerIntent.putExtra(THIEF, "Crow"); break; case R.id.radioCat: answerIntent.putExtra(THIEF, "Przewalski's Horse"); break; default: break; ) setResult(RESULT_OK, answerIntent); finish (); )
Everything is simple here, when the detective chooses the name of the criminal, then through the method putExtra() we pass the name of the key and its value.
For convenience, after selecting, we immediately close the second window and before closing we pass the value RESULT_OK, so that it is clear that the choice has been made. If the user closes the screen via the Back button, the value will be passed RESULT_CANCELED.
Method setResult() takes two parameters: the resulting code and the result itself, represented as an intent. The resulting code tells you what the result of the activity was, as a rule, it is either Activity.RESULT_OK, or Activity.RESULT_CANCELED. In some cases, you need to use your own return code to handle variations specific to your application. Method setResult() supports any integer value.
If you will be passing data explicitly through a button, then it would be a good idea to add a method finish() to close the second activity as unnecessary. If the transition occurs through the Back button, then this is not necessary.
If the activity was closed by the user by pressing the hardware return button or if the method finish() was called before the method setResult(), the resulting code will be set to RESULT_CANCELED, and the returned intent will show the value null.
We return to the first screen. The first screen is waiting for a response from the second screen, so you need to add a method to the code onActivityResult().
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) ( super.onActivityResult(requestCode, resultCode, data); TextView infoTextView = (TextView) findViewById(R.id.textViewInfo); if (requestCode == CHOOSE_THIEF) ( if (resultCode == RESULT_OK) ( String thiefname = data.getStringExtra(ChooseActivity.THIEF); infoTextView.setText(thiefname); )else ( infoTextView.setText(""); // erase the text ) ) )
The method expects incoming data with code CHOOSE_THIEF, and if such data arrives, it retrieves the value from the key ChooseActivity.THIEF using the method getStringExtra. We display the resulting value in TextView(variable infoTextView). If we returned to the screen through the Back button, then we simply erase the text.
When a child activity is closed inside the parent component, a handler is fired onActivityResult(). Handler onActivityResult() accepts several parameters.
- Request code. Code used to start the activity that returns the result
- Resulting code. A result code set by the child activity indicating how its work completed. This can be any integer value, but typically either Activity.RESULT_OK, or Activity.RESULT_CANCELED
- Data. The intent used to package the returned data. Depending on the purpose of the child activity, it may include a URI path that represents the selected piece of content. Alternatively (or complementarily), the child activity can return information as simple values wrapped in an intent parameter extras
If a child activity terminated unexpectedly or if no result code was specified before closing it, this parameter will become Activity.RESULT_CANCELED.
We launch the project, click on the button and go to the second screen. There we select one of the options. If you select the crow, the screen will close and the criminal's name will appear on the first screen. If you select a dog, its name will be displayed.
By the way, if you select a cat, its name will not be displayed! Check it out and see for yourself. You will ask why? Elementary Watson! The criminal did not take into account one important detail. The restaurant was under surveillance from video cameras, and the recording showed who actually stole the sausage and framed the cat. Vaska, hold on!
P.S. If at first something seemed unclear, then with practice a lot will become clearer. Transferring data between screens is common in applications, and you will study the example more than once.
P.P.S. The best fish is sausage. Knowing this weakness, it was not difficult to frame the cat.
Using filters
In the article I showed a common way to switch to another activity when in the method startActivity() the current class and the class to be transferred are indicated. By the way, the activity class does not have to be part of your application. If you know the class name from another application, you can switch to it. But you can move to another activity in another way.
In practice it is less common, but can be useful. Let's say you already have a second activity. In the manifest we will add a special filter to it:
And we launch the second activity by clicking a button in this way.
Public void onClick(View view) ( startActivity(new Intent("ru.alexanderklimov.testapplication.SecondActivity")); )
Let's replace the long string with a constant.
Public static final String ACTION_SECOND_ACTIVITY = "ru.alexanderklimov.testapplication.SecondActivity"; public void onClick(View view) ( startActivity(new Intent(ACTION_SECOND_ACTIVITY)); )
So what did we do. For the second activity, we registered a filter and specified a name for action in attribute android:name. For convenience, I just put the full name of the activity with the name of the package in it. Class constructor Intent has several overloaded versions. In one version, you can specify a string for the action. We indicated our created action, which is registered in the second activity. During operation, the system views the manifests of all installed applications. When searching for a match, the system finds our filter and launches the required activity.
You can launch other activities using the same principle. Look at the example. If you copy the example to yourself and look at the documentation for android.provider.Settings.ACTION_AIRPLANE_MODE_SETTINGS, you will see that this code corresponds to a string constant public static final java.lang.String ACTION_AIRPLANE_MODE_SETTINGS = "android.settings.AIRPLANE_MODE_SETTINGS". Compare with our code. You can assume that the settings activity for offline mode has this line in its filter.
Filter category name android.intent.category.DEFAULT tells the system to perform the default action, which is to start the activity. There are other names that do not interest us yet.
And now a final question. What happens if you create another activity and specify the same filter as the second activity? Let's check it out. Create a third activity and copy the block with the filter from the second activity into it.
Click on the button in the first activity. The system will ask you to select the desired option.
If you select ALWAYS, then next time you won’t have to choose. To reset the selection, go to the application properties in Settings and find the button Clear defaults.
Multitasking interfaces and interaction with them have always been one of the weak points of the Android operating system, at least for me personally. Either the Google guys just don't want to do a good task switching and are trying to go their own way, or they just good interfaces protected by patents. Anyway operating system Android has become popular because its interface can be easily changed. For example, Recent makes it easier to work with frequently used tasks. Read the full review under the cut.
Before Pintasking appeared, the application already had several analogues, for example and. But they were all imperfect to one degree or another. The new development from the PhinxApps studio offers a convenient way to switch between “hot” tasks and even adds one interesting gesture, which is analogous to ALT + Tab on Windows computers.
How does it work
The main function of the Pintasking application is to display additional application icons on the side of the display. They appear on top of any application, so you can tap on the icons to switch between related tasks or simply launch programs. In this case, application icons can be left on the screen forever, but by default they disappear after the device goes into sleep mode. Add new icon You can do this through the top bar, where a notification from the Pintasking application is always displayed. You just need to tap on it and the currently open application will be added to the side bar fast switching tasks.
If you are annoyed by the constantly hanging notification, then you can remove it - just disable Pintasking’s access to notifications in the application manager. The icons in the bar are quite clever, for example: after you launch the browser, its icon in the bar will disappear and in its place a task switch icon will appear, which will return you to the previous application.
Long pressing on the icons allows you to quickly go to the Pintasking settings or remove the icon from the bar.
Gestures
Convenient swipe gestures are one of the main features of the Pintasking application. The program settings suggest activating two gestures: swipe up from the Home button (replacing the Google Now call) and swipe down from the left side of the notification bar panel. Personally, I don’t use Google’s personal assistant at all, so replacing the gesture from the Home button was easy for me. The gesture switches between the current and previous tasks, which is quite convenient. As a user of a BlackBerry smartphone, where the bottom-up gesture is systemic, I liked Pintasking’s capabilities in this regard.The task switch gesture is not very fast because it brings up the task menu and automatically switches to the right application, but still saves one tap.
GIF animation on click (lots of traffic!)
Pintasking is full of interesting settings and hidden possibilities. For example, on devices with it is possible to remove the delay when switching tasks. You can also adjust the size and position of icons in the side bar, enable or disable gestures, increase or decrease the speed of animations. And most of these features are only available in the paid version of the application. The creators of Pintasking have limited the functionality as much as possible free application. In it, users can pin only two icons without settings. The full potential of the application is revealed only in the paid version.
Pintasking will definitely appeal to those who use a small set of programs and often switch between them. While vanilla Android hasn't yet introduced full-fledged multi-window functionality, Pintasking can be useful in everyday use. You can download the Pintasking app for Android on Trashbox.
In four years, from a small but ambitious Android project has turned into perhaps the most complex and functionality-packed mobile OS of our time. Android supports a huge number of technologies and functions, many of which are hidden from the user or hidden in places you wouldn't even think to look at. This article is a collection of tips and tricks that can be applied to any Android device without the need to root.
01. DISABLE THE AUTOMATIC CREATION OF ICONS ON THE DESKTOP
I think I’m not the only one who is annoyed by the way the market behaves when installing an application. For some reason he thinks that for any more or less software or the next game I definitely need an icon on the desktop, and he successfully creates it. And I have to delete it. And then another one. And so every time.
Fortunately, this behavior is easy to disable - just open the Google Play settings (in the left panel) and uncheck the “Add icons” option. There you can also disable the forced password request every 30 minutes when purchasing applications, as well as the hated auto-update of applications.
02. DISABLE GOOGLE SEARCH AND OTHER USELESS SOFTWARE
The standard firmware of Android smartphones includes a huge amount of useless software, ranging from a bunch of Google applications (do you know that Google requires manufacturing companies to include almost all the software it develops in the firmware of their devices?) and ending with all sorts of junk from the smartphone manufacturer . All of this (or at least most) can be disabled.
Go to “Settings → Applications → All”, tap on the desired software and click “Disable” (of course, you will be warned how “dangerous” this is). By the way, when disconnecting Google search Google Now will also disappear, as well as the search bar from the desktop (after a reboot), instead of which there will be an empty area.
03. RESET TO SAFE MODE
Few people know, but Android, like many other operating systems, has a so-called Safe mode. This is a mode in which the operating system boots with disabled third party applications. Malware that is not very skillfully written (one that is not registered in the system partition) then falls off, like any software that interferes with normal operation systems. Safe mode can be used to bypass screen blockers, applications that cause the smartphone to freeze, or, alternatively, to identify who is actually eating up the battery - the next firmware or software update.
The mode is turned on in a rather simple, but not at all obvious way: by holding down the power button and then holding your finger on the “Turn off power” item. After rebooting, the culprit of the problem can be removed through “Settings → Applications”.
04. GET RID OF INSTRUCTIVE NOTIFICATIONS
“The construction of the castle is finished!” - how did you get these notifications? Everyone who is not too lazy is trying to notify me about all possible and impossible events: “Vasya Dzhubga replied to you on Twitter,” “You have 100,500 new messages,” “You won surgery to enlarge your right leg.” You swipe away one notification, and three new ones appear in its place.
How to get rid of all this slag: hold your finger on the notification for a long time and uncheck the “Stop” button. This is the recipe for KitKat. In Lollipop, everything is a little different, but the essence is the same: hold down, then the i button, in the window that opens, put a checkmark on “Block”. There you can also force the notification to be a priority so that it is always at the very top.
05. DON'T FORGET ABOUT THE SERVICE MENU
Another not at all obvious function is the service menu. It can be opened by dialing *#*#4636#*#*. Basically there are different Technical information such as IMEI number, signal strength, current location or network type. But there is also a very useful function for some situations to force the smartphone to switch to the desired type of network (2G, 3G, LTE).
In conditions of poor 3G/LTE signal levels, the device tends to reset to 2G in order to save battery power and ensure subscriber availability. This behavior can be disabled. Open the service menu and in the “Set up preferred network type” item, select WCDMA only or LTE only. In the same way, you can switch your smartphone to 2G - GSM only. It will help if you need to save battery power and the Internet is rarely used. By the way, you can also disable the radio module there altogether (until the next reboot, of course).
Smartphones based on Chinese MTK chips have their own and much more sophisticated service menu. His number is *#*#3646633#*#*. There is various system information and a huge number of tests, among which you can find several useful settings, such as adjusting the call volume or, for example, changing GPS/AGPS settings. The menu itself is terribly illogical and contains so much varied information that I don’t even dare to describe it, but simply send the reader to three letters - XDA.
06. USE A STANDARD BROWSER
I don't know why users don't like the built-in one so much Android browser. In my opinion, he is wonderful. Lightweight, fast, based on the Chromium engine, can synchronize with Google account(that is, it immediately includes all bookmarks and passwords from Chrome), but most importantly, it has a very convenient and almost ingenious navigation method. This is the so-called radial menu, which can be activated in the settings (only in Android 4.0–4.4).
07. MANAGE YOUR CONTACTS FROM YOUR COMPUTER
Google has web services not only for remotely installing software, blocking and searching for a smartphone, but also for managing contacts. All people's contacts ever saved and synchronized when connecting a new smartphone can always be found on the page google.com/contacts. They can be viewed, edited, added and deleted. Moreover, oddly enough, it is essentially part of Gmail.
08. MONITOR YOUR PROCESSOR LOAD
Android has a built-in function to show the current CPU load and active this moment processes on top of the screen. In theory, it is intended for application and firmware developers and is hidden from ordinary users, but no one is stopping us from activating it. But first you will have to reach the “For Developers” settings section, which by default does not exist at all.
Go to settings, then “About phone”, find the line “Build number” and tap on it seven times in a row. The message “You have become a developer!” should appear on the screen. This means that the “For Developers” item is now open, and we go to it. We rewind almost to the very bottom of the screen and in the “Monitoring” section we find the “Show CPU load” switch.
Turn it on and see a list in the upper right part of the screen. The first line is the so-called loadavg, which shows the number of processes that had to run or wait their turn to run in the last minute, five and ten minutes. To put it very roughly: if these values, divided by the number of processor cores, are above one, this means 100% processor load in the last minute, five or ten minutes, respectively. Below is a list of the most power-hungry processes (essentially, an analogue of the top command from Linux).
09. USE ADB TO BACKUP SOFTWARE ON YOUR COMPUTER
We have already written more than once about a wonderful tool called ADB, which can significantly simplify managing a device from a computer for a person who is familiar with the console (here we are mainly talking about Linux, of course). In addition to the ability to install software, transfer files to a smartphone, view logs and other useful things, ADB has recently made it possible to backup all smartphone settings and applications.
To use this functionality, install universal ADB driver(goo.gl/AzZrjR), then download ADB itself (goo.gl/3P7klM), install the driver, then expand the archive with ADB, connect the smartphone to the computer with a USB cable, launch command line and execute the command
A message will appear on the smartphone screen asking you to specify the encryption password for the backup - you can safely press “Next”. The application backup process will begin, which will affect both the APK packages themselves (the -apk flag in the command) and their settings. All applications from the memory card will also be included in the backup. You can restore a backup using the following command:
$ adb restore backup . ab |
10. DISABLE BACKGROUND DATA TRANSFER IN APPLICATIONS
Working in the background, applications can actively use the Internet for a variety of purposes, from updating their content to leaking information about your location. In addition, such activity in any case leads to increased battery consumption.
Android has the ability to selectively restrict applications from transferring data in the background, but it is located in a place where most users would hardly ever look. To prevent any application from using the Internet in the background, you need to go to settings, then “Data transfer”, scroll down the screen to the list of applications actively using the network (for some it will be a surprise that it is there at all) and tap on the desired software. At the bottom there will be an option to “Limit background activity”. It is worth keeping in mind that the option will disable data transfer only via mobile network, so data will continue to flow over Wi-Fi.
11. USE THE SEARCH BAR
Often, smartphone owners Android based neglect the search bar at the top of the main screen. This is really logical, given the ability to search by typing a request into the address bar of any mobile browser.
Meanwhile, the desktop search bar does much more than just redirect your request to google.com. It allows you to search contacts, applications, calendar events, bookmarks and web browser history in automatic mode. For normal smartphone use, it may not be as useful, but when connecting an external keyboard, it is an indispensable tool. Just click
12. USE SMART LOCK
Smart Lock is one of those features that you don’t think about, but once you try it, you can’t live without it. This is one of the most notable new additions to Android Lollipop and one of the most useful features added to Android recently. The idea of Smart Lock is extremely simple - it disables the PIN code or other lock screen protection if there is a specific Bluetooth device or map location nearby.
By default, Smart Lock is “sort of” disabled. That is, it does not light up anywhere, but after pairing with a new Bluetooth device (of any type), it will definitely offer to add it to its white list. After this you will forget about her again. But only until you enable lock screen protection in the “Security” section of the settings. Now it will work as it should.
The Smart Lock settings themselves are in the same section, and, in addition to adding new Bluetooth devices, you can specify “safe places” there, along with a list of options based on Google Now “observations.” By the way, if you disable it, as described in the first tip, then this functionality will also be lost.
13. SAVE ENERGY RIGHT
Another notable innovation from Lollipop is its power saving mode. IN standard Android it migrated from the firmware of smartphone manufacturers, who previously sold it independently. Now the function is available in pure Android - you use your smartphone to the fullest, and when the battery charge reaches 15%, the system prompts you to turn on the power saving mode, which turns off background data transfer, reduces the brightness to a minimum, turns off some sensors and reduces the screen rendering FPS to a couple of dozen frames per hour. give me a sec. For clarity, the status bar and on-screen buttons at the bottom of the screen turn red - so you don’t forget.
To save battery life on a smartphone with an AMOLED screen, you can set black wallpapers and use apps with black backgrounds.
The energy saving mode is customizable. Go to “Settings → Battery → menu → Power saving mode.” Here you can specify the condition for automatically turning on the mode (though the choice is meager: 5%, 15% or never) and, most importantly, turn on the mode right now. Very convenient if you have a long trip ahead without the possibility of recharging.
14. MONITOR TRAFFIC
Most likely, smartphone manufacturers, as usual, will shovel the standard Android 5.0 interface and change everything (hello Samsung - the biggest fan of breaking interfaces), but in the standard Lollipop curtain, or rather, in the “second curtain” with
There is one highlight to the quick settings options. The data transfer button in the center does not switch data transfer at all, but expands into an interface that allows you not only to view the current traffic consumption, but also to disable data transfer using the switch on top.
15. SHARE NOT YOUR PHONE, BUT THE APPLICATION
Especially for those who like to give their phone to other people, Lollipop has a Screen pinning feature that allows you to lock your smartphone on one application without the ability to close it or switch to another. Like many other useful features, it is completely invisible and hidden quite deep in the settings. To activate, go to “Settings → Security”, scroll almost to the very end and turn on the “Block in application” option.
Now if you click the view button running applications(“Browse”), an pushbutton will appear at the bottom of the current application’s thumbnail. Once you tap the icon, the screen will be locked on the selected app and you will need to hold the Back and Overview buttons simultaneously to go back. In this case, you will have to enter a PIN code if it is set for the lock screen.
XX. USE ACITIVITY LAUNCHER
Any graphic Android application includes one or more so-called “activities”. Each of them is an application window (screen), for example the main screen or the settings screen, maybe even a file selection window. By default, you can open directly (from the desktop) only those activities that the application developer marks as main; the rest are accessible only through the application itself and only if the developer himself allows this.
However, having the right tool at hand, you can reach any other activity of any application and even create a shortcut for it on the desktop. Activity Launcher does just that. Just install the application, select “All actions” in the menu at the top and find the software you need. All of her activities will appear on the screen, and any of them can be opened with a simple tap or placed on the desktop by holding your finger for a long time.
An example of useful “internal” activities is the Chrome bookmarks window (Chrome →Bookmark), access to the hidden AppOps mechanism in Android< 4.4.2 (Настройки → AppOps), запуск поиска в TuneIn Radio (tunein.ui.activities.TuneInSearchActivity). Очень много активностей имеет в себе ES Проводник, включая редактор, music player, image viewer and much more. Any of them can be launched directly from the desktop. In the same way, you can open any section of the settings and gain access to some OS functions that are difficult to reach. This is completely legal functionality and does not require root.
Android has a large set of hotkeys for connected keyboards. You can use Arrow, Tab, and Enter to navigate the desktop and various menus. In addition, the following key combinations are available:
Esc - “Back” button;
Win + Esc - Home button;
Ctrl + Esc - “Menu” button;
Alt + Tab - switch between applications;
Ctrl + Space - switch layout;
Ctrl + P - open settings;
Ctrl + M - control installed applications;
Ctrl + W - change wallpaper;
Win + E - write a letter;
Win + P - music player;
Win + A - calculator;
Win + S - write SMS;
Win + L - calendar;
Win + C - contacts;
Win + B - browser;
Win + M - google maps;
Win + Space - search;To find out your MAC and IP address, go to “Settings → Wi-Fi → menu → Advanced
new functions". MAC and IP will be at the very bottom.Lollipop has a built-in Flappy Bird style game. Go to “Settings → About phone”,
Tap on the “Android Version” item several times, then hold your finger on the “Lollipop” that appears. Let's play.Google Now supports a large number of Russian-language voice commands. All of them can be divided into two groups: voice search and the voice commands themselves. Voice search allows you to perform an intelligent search on Google, when the system displays a specific answer on the screen instead of a list of links, and voice commands allow you to perform certain actions, for example, send an SMS or set an alarm. The list of commands is shown in the image " Voice commands Google Now." Voice search includes more than a dozen various types questions:
Weather. What will the weather be like tomorrow morning?
Addresses. Where is the nearest pharmacy?
Flight information. When does Aeroflot flight number 2336 depart?
Time. What time is it in London?
Events. When is sunset today?
Computing. What is the square root of 2209?
Translation. How do you say "cucumber" in Spanish?
Sport. When does Spartak play?
Finance. What is the S&P 500 index today?
Data. What is the height of the tallest building in the world?
Exchange Rates. Convert 2600 rupees to US dollars.
Images. Show photos of the Golden Gate Bridge.
Interestingly, Google Now understands a large number of much less obvious questions in English. As an example we can give:
Should I wear a jacket today?
How much tip for 420 rubles?
Where is my parcel?
This, of course, is not all that could be talked about, but it will not be possible to lengthen the article, and many of the other possibilities are already known. Don't forget about these tricks, and your smartphone will become
a little more convenient. at January 26, 2017.