The ActivityManager
class provides details about activities, services and the containing process of Android. Some methods of the class are meant to be used for debugging or information, so they shouldn't be used to affect any behaviour of your application during the runtime.
If your code uses this class, the exception on the IDE "Cannot resolve symbol 'Activity Manager'" will appear due to the absence of importing the related class. This class can be imported in your class with the following line at the top of your class:
import android.app.ActivityManager;
Don't forget as well that Android Studio has an autoimport feature that recognizes classes if they're already in the android namespace. This dialog appears if you wait enough over the same line of code that throws the exception (the time differs of your device performance):
Pressing Alt + Enter on the recommendation will auto import the android.app.ActivityManager
namespace at the beginning of your Java code.
Happy coding !