I am currently work on an application which has a service and an activity. They change some file and I want to save which one of them made the last change. Is there anyway else than writing to file again?
Can I create a custom flag like the ones already defined in android like RINGER_MODE_CHANGED_ACTION?
EDIT : I do not want to use SharedPreferences, what I really want to learn is to create custom flags in OS if possible.
You can use Android SharedPreferences to store which of the file made the last change. Here is the tutorial to get you started on SharedPreferences.