1

I am running Android 4.3 Jelly Bean on a Samsung Galaxy SIII.

I am trying to figure out how to configure applications such a Skype to start up automatically once the system has gone through the bootstrapping process, finished booting, and started up. I would like to be able to do this via an application that does not require my device to be rooted, if possible. When I look at the information related to Skype in the default Application Manager, I can see that the Skype application makes use of the "run at startup" permission, which means that it should be possible to configure this app to run at startup but I could not find a checkbox to do so on this screen, nor from the Skype application settings. A similar situation may take place with other apps as well.

This post deals with preventing apps from starting up, and mentions useful third-party appilcations such as Autorun Manager which seems to be maily concerned with blocking applications from starting and from restarting once killed, or at least this is what I gather from the app's description on the play store, and Autostarts which triggers which manages which apps are triggered by events.

So, here are my questions:

  • Why isn't there a preinstalled native Startup Manager app on android to control which apps are to start by default and which aren't?

  • If skype requires the "run at startup" permission, and there is no place in the OS or in the app to configure such app to start up automatically, then what does this permission achieve?

Thanks.

  • 1
    I find your 2nd question interesting as I also just tested to see if there was something that Skype ran on startup (perhaps, background service?), and I didn't see anything. I'd say, "probably the developer forgot to remove the permission request", unless it's working on some other devices, for some reasons. – Andrew T. Dec 13 '14 at 18:44
  • Yes, I also don't understand. Once my system was rebooted, under Task Manager, I find: "Active applications: 0", "Clear defaults: Launch by default: YouTube [Clear]". If YouTube is launched by default, as Task Manager points out, then why doesn't it appear under Task Manager active applications. Maybe an app needs to be running in the foreground to be listed as an "active application". Then in Application Manager, Skype does not appear under the RUNNING tab, but if I click on it under either the DOWNLOADS tab or ALL tabs there is an enabled "Force stop" button, which can be used to stop it. – John Sonderson Dec 13 '14 at 19:05
  • So Skype can be stopped even though it doesn't appear in Task Manager or under the Application Manager's RUNNING tab. I don't understand what this all means. – John Sonderson Dec 13 '14 at 19:06
  • 1
    I just checked again, and it seems that all apps have "force close" button enabled, even for those which haven't been opened, which I also don't know the reason. – Andrew T. Dec 13 '14 at 19:11
  • 1
    I think your second question is very Windows like approach. When you install apps that uses this permission they are able to receive a broadcast and from there set a service, for example. But the option to start or not to start at startup is very Windows. Usually Android apps declare its permission needs in the beginning and then they decide how to act and react – Joaquin Iurchuk Dec 14 '14 at 7:54
3

It really would be nice to have some startup manager shipping with the system, which lets the user decide what to start and what not. But that's not the case, it works a bit different:

Apps with the "run at startup" permission can register a "listener" for the BOOT_COMPLETED broadcast ­– which the system always issues on that event. This way they get notified of that event, and can decide to perform some action. That could be starting some background service which keeps running – but they could also do something little and then exit again.

IMHO Skype has an option to automatically log you in after boot, so you're available for incoming calls. AFAIR that's even the default behavior of the app. If there's no background service running for that, it might register for some cloud messaging then – which again would "wake it up" to deal with incoming calls. That way the app had no need to permanently run in background. Indeed the app also declares the com.google.android.c2dm.permission.RECEIVE permission (C2DM stands for "Cloud 2 Device Messaging", which now is GCM = Google Cloud Messaging), so this could be the explanation.


UPDATE:

Andrew T. confirmed this in the comments:

I finally checked the Android manifest of Skype by opening its APK file (base.apk), and indeed there is com.skype.android.push.DeviceBootReceiver with intent filter android.intent.action.BOOT_COMPLETED. I didn't investigate what it's doing though. Also, I forgot that broadcast receiver is not listed under running process as John mentioned (I can confirm this being a developer). So, you're correct on your guess :)

  • 1
    That's also what I believed, but not sure after confirming that there is no foreground/background process related to Skype after booting. It might be possible that the startup only register for cloud messaging, but then again, from what I know, it's impossible for the message to be processed if there is no running process that will handle that. I might be wrong, though. – Andrew T. Dec 14 '14 at 7:32
  • 2
    Thank you @Izzy for your answer. In Application Manager I can see that Skype makes use of the "receive data from internet" permission which corresponds to the C2DM permission com.google.android.c2dm.permission.RECEIVE. Since Skype is not listed under RUNNING my guess is that when there is no process or service running in the background, but rather the "run at startup" (android.permission.RECEIVE_BOOT_COMPLETED) permission allows Skype to register a broadcast receiver for C2DM, and when the C2DM message arrives from the server, the broadcast receiver launches the Skype activity. – John Sonderson Dec 14 '14 at 10:25
  • 2
    My guess is that broadcast receivers are not listed under RUNNING in the Application Manager, as these are started by another system service (whose name I can't remember right now). Correct me if I'm wrong. Thanks. – John Sonderson Dec 14 '14 at 10:29
  • 1
    @AndrewT. that's where I have to pass as well: not being a developer, I have no insight in how exactly this works. But my expectations go with what John described in his comments: Skype gets launched at boot, registers a broadcast receiver, and exits. Whenever a GCM message arrives and is directed at Skype, the corresponding broadcast "wakes up/starts" Skype again to process it. This way there's no need for a "useless" process to consume resources. BTW: The Stack Exchange app works the same way :) – Izzy Dec 14 '14 at 12:27
  • 2
    I finally checked the Android manifest of Skype by opening its APK file (base.apk), and indeed there is com.skype.android.push.DeviceBootReceiver with intent filter android.intent.action.BOOT_COMPLETED. I didn't investigate what it's doing though. Also, I forgot that broadcast receiver is not listed under running process as John mentioned (I can confirm this being a developer). So, you're correct on your guess :) – Andrew T. Dec 14 '14 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.