We're giving android tablets to several clients to showcase some apps we've built, and we want to create another app to automatically start up as soon as the device is powered on (and perhaps only the first time it's powered on) to convey with some graphics and text that we have these other apps installed they should check out. Can I do this with PhoneGap or do I have to create a Java-based android app? Thanks very much.
Asked
Active
Viewed 5,607 times
3
-
not sure if you can do it with phonegap. But either way it would be difficult to do only the first time it powered on. Is more of an all or nothing kind of a thing I think – FoamyGuy Jul 05 '12 at 22:40
-
Are you creating your PhoneGap app via PhoneGap Build? Or do you have the Android SDK and such and are building your APK locally? – CommonsWare Jul 05 '12 at 23:05
-
@Tim - actually, the one time part is simply a matter of setting a shared preference to indicate that you have already run. – Chris Stratton Jul 06 '12 at 00:09
-
@ChrisStratton But the broadcast receiver is still going to get a callback every time. Even if it chooses not to start an Activity the application is still technically running. I suppose that is a bit nit picky though. – FoamyGuy Jul 06 '12 at 02:42
2 Answers
0
Actually it is possible to do, a good example of what is required is posted in this thread How to Start an Application on Startup?. The Java code would have to make its way as a custom phonegap plug-in as you're using phonegap..

Community
- 1
- 1

silverchair
- 920
- 2
- 9
- 18