aspose file tools*
The moose likes Android and the fly likes AutoStart App on Device BootUP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "AutoStart App on Device BootUP" Watch "AutoStart App on Device BootUP" New topic
Author

AutoStart App on Device BootUP

Fred Grott
Ranch Hand

Joined: Oct 05, 2002
Posts: 346
Well, I guess I beter ask a question..

I am developing a system o bring non web widgets to android using two components, A Modified HomeScreenApp and the Widget itself.
Is there a specific Android Manifest attribute that allows an app to AutoStart on device bootup?


MobileBytes blog - Sharing Technology - My Programming Knols
Imran Mohd
Ranch Hand

Joined: Mar 02, 2009
Posts: 38
i think you can use BroadcastReceiver


Cheers,
Mohd Imran (SCJP 1.5)
Fred Grott
Ranch Hand

Joined: Oct 05, 2002
Posts: 346
I was under the impression that BroadCast receiver is once the app has started
Neerhaj Joshi
Greenhorn

Joined: Mar 02, 2009
Posts: 9
Yes, you need to request for permission android.permission.RECEIVE_BOOT_COMPLETED , you have to declare it outside the <application> node of Android Manifest file as,

When the phone boots, an Intent is broadcasted to all apps who have registered to receive this Intent. To register for this Intent, like Imran said, you have to use BroadcastReceiver, first declare a receiver inside the <application> node as,

MyReceiver.java is the class that will receive the Intent. You will handle the Intent in the onReceive() method of BroadcastReceiver class. You get approx. 5 secs to do what you want inside onReceive(), after that the system will show 'App not responding' dialog to the user, so make sure you don't do any heavy processing inside that method.
Imran Mohd
Ranch Hand

Joined: Mar 02, 2009
Posts: 38
and than you have to start your Activity form the onReceive() method of BroadcastReceiver class
i.e

i don't know how much it is reliable..... but generally i use this...!!!
Fred Grott
Ranch Hand

Joined: Oct 05, 2002
Posts: 346
Thank you both
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AutoStart App on Device BootUP
 
Similar Threads
Android market says "Not Compatible" for Dell XCD 35
Testing simulation
how to automatically lunch my app when windows boots?
logcat?
Is it possible to remotely invoke a midlet?