Reputation: 41
So I am working on a logger(xposed module, not mine, I just copied the source and now modifying it for my preference) I am not good at app development so I can't work this out myself. What I am looking for exactly is a way that the name of the output file be changed everyday at 00:00(because that's a new day's start, I am trying to keep everyday's log in a sprays fine) So can anyone please provide a way to do that?
Upvotes: 0
Views: 539
Reputation: 3444
To schedule an operation to be performed at a certain time of day, you'll want to look into using the AlarmManager
class, which allows you to do exactly this. You can find the docs here: http://developer.android.com/reference/android/app/AlarmManager.html
To rename a file that already exists, you'll want to look into using the File
class, specifically the renameTo()
method. You can read more about this in the docs here: http://developer.android.com/reference/java/io/File.html#renameTo(java.io.File)
Hope this helps you get started!
Upvotes: 1