I have created a small app, but I want it to execute automatically at a particular time. The time must be entered by the user.
For example :
If my activity is, to start a particular game and I enter 5:30pm as the time, it should run that game at 5:30pm automatically, even if I close the application after I entered time.
Create an alarm and a broadcast reciever for it, put the intent for this in the Android Manifest
Take a look at http://blog.mikesir87.io/2013/04/android-creating-an-alarm-with-alarmmanager/
Just set the alarms for a week in advanced.
For the touch thing try this replace:
With
The reason we dont need to use arg0 or arg1 is that we already know where the touch or click is coming from, in the situation where you have a activity wide click listener (so the activity implements onClickListener) you would use something like this:
To my understanding however I believe you don’t need any of this stuff however correct? You just want your activity to run at these times right?
So if I am correct you just need to do this: