1

I am new to android. I need to create an auto startup application. That application will control the files( if we open a image file from Gallery (or) mail attachments, on that time our application give a alert dialog to the user). Please guide to how to create an auto startup application to control all the file format in the android emulator.

Karthick
  • 634
  • 8
  • 19
  • You should go through your questions and 'accept' answers that have been helpful. Do that by clicking the green tickmark next to the answers. This provides people who have helped you with reputation - see the FAQ if you don't know how that works. – Steve Haley May 26 '10 at 11:02
  • possible duplicate of [How to Autostart an Android Application?](http://stackoverflow.com/questions/1056570/how-to-autostart-an-android-application) – Christopher Orr Jun 04 '10 at 14:38

3 Answers3

4

You should use the permission android.permission.RECEIVE_BOOT_COMPLETED and register a BroadcastReceiver for android.intent.action.BOOT_COMPLETED.

Update: I can't find a source, but I'm pretty sure, before an app is able to receive android.intent.action.BOOT_COMPLETED it should at least have been started once since it's installation.

MrSnowflake
  • 4,724
  • 3
  • 29
  • 32
1

You can take a look at Photostream source as it implements BroadcastReceiver approach suggested by MrSnowflake http://code.google.com/p/apps-for-android/

Fedor
  • 43,261
  • 10
  • 79
  • 89
1

Please guide to how to create an auto startup application to control all the file format in the android emulator.

Creating an "auto startup application" can be done as MrSnowflake and Fedor describe.

Creating an "application to control all the file format in the android emulator", fortunately, is impossible, as that would represent a massive security hole.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491