im new to android, i made an application and i want it to run at start up automatically and in the background for sure, can anybody help me with this???? regards
例如:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
int delay = 10000;// in ms
Timer timer = new Timer();
timer.schedule( new TimerTask(){
public void run() {
AudioManager audio=((AudioManager) getSystemService(AUDIO_SERVICE));
audio.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);
iii
iii, delay);
iii
i 希望在启动时和背景中执行该守则