im using cocos2d-2.0-x-2.0.4
tried to use this, to check if app is on top
public String isAppOnTop()
ActivityManager am = (ActivityManager) getSystemService(Service.ACTIVITY_SERVICE);
tasks = am.getRunningTasks(1);
RunningTaskInfo running = tasks.get(0);
but it doesnt work. for some reason the overlay menu for Recent App or the option/clock overlay menu, both of them are not considered as other app??
Is there a way to detect if Recent App button is pressed? or if there's an overlay menu (for recent app list or option/clock menu) appears on top of the main app?
do I need to use cocos2d-x 3.0?
hope somebody can help me.