I want to know if my app was executed by another app
I tried several methods but I could not find a solution
I tried this but returns the same value please help me! Code:
public class MainActivity extends Activity {
public static boolean isinint;
@Override
protected void onResume() {
super.onResume();
Intent intent = getIntent();
// check if any application has executed your app
if (intent != null && intent.getType() != null) {
isinint = true;
Toast.makeText(getApplicationContext(), "is:" + isinint, Toast.LENGTH_LONG).show();
} else {
isinint = false;
Toast.makeText(getApplicationContext(), "is:" + isinint, Toast.LENGTH_LONG).show();
}
}
}