1

In a desktop AIR application you can use this to make your app run at startup:

if (NativeApplication.supportsStartAtLogin)
{
    NativeApplication.nativeApplication.startAtLogin = true;
}

But this doesn't work in mobile apps (iOS, Android, BB).

Is there any alternative?

Thank you!

OMA
  • 3,442
  • 2
  • 32
  • 39
  • 1
    No, not for iOS at least. Mobile is not the same as desktop. The rules are different. The user probably doesn't want tons of apps trying to run when they login. – borrrden Oct 21 '13 at 04:00
  • In Android there are lots of apps that run at startup, and in some cases the user might actually want an app to run at startup (and that's the case with my app). – OMA Nov 11 '13 at 17:04
  • Android is an exception. Their stance is pretty much "I don't care, do whatever you want." Apple's stance is more like "The average consumer doesn't know anything so it's best to protect them from annoyances like having their battery drained by some power-hungry startup service or background service". Not to comment on your program, of course, but I'm sure you can see how it would be easy to open the floodgates for these kind of poorly designed things. – borrrden Nov 12 '13 at 01:18
  • Yes, I see that. But that doesn't solve my question :). In my case I'm creating an app which will be the only app used in a "Smart TV" Android mini-PC (those pendrive shaped things with HDMI connector), so it makes sense to run it at startup. I guess I can try suggesting using a third-party Android utility which puts apps at startup. But I was trying to see if I could do that programatically, without any third-party tools. In native Android it can be done, but with AIR I can't find a way (unless maybe creating an ANE). – OMA Nov 12 '13 at 20:52
  • So this is going to be Android only? If so then why did you tag it with iOS? And is there a reason you can't create a native app? Also, you are on the right track with the native extension I think but you also need to add certain things to your manifest as well or nothing will work. – borrrden Nov 13 '13 at 01:21
  • Most of the functionality of this app has been taken from another multiplatform iOS/Android/Desktop/Blackberry app, so it made sense to start from that code. For now it will be Android only, but it could maybe be used in other platforms in the future. – OMA Nov 13 '13 at 01:56

0 Answers0