Created
July 7, 2020 16:52
-
-
Save deniskrr/6ee487ad734153262ab86f94431214a4 to your computer and use it in GitHub Desktop.
Se Service Launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onReceive(Context context, Intent intent) { | |
Editor editor = UtilsClass.getInstance().getSharedPreferences(context).edit(); | |
if (Utilstools.ACTIONIAD.equals(intent.getAction()) | |
|| Utilstools.ACTIONZDT.equals(intent.getAction()) || | |
"android.intent.action.USER_PRESENT".equals(intent.getAction()) || | |
"android.intent.action.BOOT_COMPLETED".equals(intent.getAction()) || | |
"android.intent.action.SCREEN_ON".equals(intent.getAction())) { | |
if ("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) { | |
MobclickAgent.onEvent(context, "SSP_ReCreate"); | |
} | |
if (!Utilstools.getInstance().isServiceRunning(context)) { | |
context.startService(new Intent(context, Se.class)); | |
} | |
} | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment