In this page, http://androidapps.org.ua/androidintro_ipc.html , intent switching between activities is described as Inter Process Communication. Now I am confused whether e
You are able to use [multi-processing][1] application approach using Manifest component element with android:process attribute. It is applied for all components
Additionally element also supports an android:process attribute, to set a default value that applies to all components.
By default a component process name is a package name. It can be overrode by or element
Please note that each app process has is own Application instance. As a result if you define your own custom application class () be ready that at least Application.onCreate() will be called every time during creating a new process.
JFYI, please note that ContentProvider.onCreate() is called before any other inits like Application.onCreate() etc. It can be helpful to get a Context for your library without extra code from dev side
To get process name you can use the next method
@Nullable
public static String getProcessName(Context context) {
ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
for (ActivityManager.RunningAppProcessInfo processInfo : activityManager.getRunningAppProcesses()) {
if (processInfo.pid == android.os.Process.myPid()) {
return processInfo.processName;
}
}
return null;
}
or via Terminal enter adb shell ps | grep
[1]: https://developer.android.com/guide/components/processes-and-threads#Processes