Package com.inmobi.commons.utils
Object ProcessUtils
-
- All Implemented Interfaces:
public class ProcessUtilsIdentifies whether the SDK is running in the host app's main process.
Host apps can run components in extra processes (
android:process=":name"), and Android callsApplication.onCreate()in each of them. Publishers that start their ad stack there end up initialising the SDK in more than one process.
-
-
Field Summary
Fields Modifier and Type Field Description public final static ProcessUtilsINSTANCE
-
Method Summary
Modifier and Type Method Description final BooleanisMainProcess(Context context)Returns true in the app's main process, false in a secondary process, or null when it cannot be determined (below API 28, where Application.getProcessName()is unavailable).-
-
Method Detail
-
isMainProcess
final Boolean isMainProcess(Context context)
Returns true in the app's main process, false in a secondary process, or null when it cannot be determined (below API 28, where
Application.getProcessName()is unavailable).The main process name is
applicationInfo.processName, which also covers apps that rename it via<application android:process>.
-
-
-
-