Pranav
Pranav

Reputation: 52

Simulate a start up: Android Emulator

I coded an app which starts at the system start up and starts a service which is written in the code. The code is working fine and the service is getting started when the app is installed on a real android device but not on an emulator. I do not have a real device always handy. Any idea how to simulate a start up in an emulator?

Upvotes: 1

Views: 1233

Answers (2)

Pranav
Pranav

Reputation: 52

Starting emulator simulates a boot up. Didn't know it earlier as I was missing the Toast which I had put up on the boot up for some reasons I don't know. When tried on a faster machine, the same code worked like charm. :)

Upvotes: -1

BrantApps
BrantApps

Reputation: 6472

I just found a way to simulate a start-up without having to stop-and-start the emulator. Go to the DDMS perspective (if you are using Eclipse) and "stop" the android.core process. This process respawns (you would know this if you have ever owned a HTC where that essential process seemed to stop wayyy to often) and that process of respawning will effectively reboot the emulator- i.e the BOOT event is fired.

Upvotes: 3

Related Questions