android - call static method of Activity class when it's used in Intent creation -


i glad have chance call static method of activity class whenever it's used create intent. example have static reset method must called before every activity launch, , trick use looks like:

myactivity.reset(); intent intent = new intent(getbasecontext(), myactivity.class); ... startactivity(intent); 

is there way via reflection or somehow else call such static method when class being used?


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -